Skip to content

Commit d89730d

Browse files
Vizvezdenecvondele
authored andcommitted
Do not overwrite valuable TT data after probcut.
This patch allows an engine to write probcut data only in case the probcut search depth is greater than transposition table depth. passed STC https://tests.stockfishchess.org/tests/view/5f0b52e959f6f035328949a6 LLR: 2.97 (-2.94,2.94) {-0.50,1.50} Total: 52544 W: 10145 L: 9880 D: 32519 Ptnml(0-2): 853, 6097, 12121, 6334, 867 passed LTC https://tests.stockfishchess.org/tests/view/5f0bd94c59f6f035328949f3 LLR: 2.93 (-2.94,2.94) {0.25,1.75} Total: 49576 W: 6164 L: 5863 D: 37549 Ptnml(0-2): 297, 4371, 15218, 4538, 364 closes #2815 bench 4578298
1 parent c3092c5 commit d89730d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/search.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,12 @@ namespace {
925925

926926
if (value >= probcutBeta)
927927
{
928-
tte->save(posKey, value_to_tt(value, ss->ply), ttPv,
929-
BOUND_LOWER,
930-
depth - 3, move, ss->staticEval);
928+
if ( !(ttHit
929+
&& tte->depth() >= depth - 3
930+
&& ttValue != VALUE_NONE))
931+
tte->save(posKey, value_to_tt(value, ss->ply), ttPv,
932+
BOUND_LOWER,
933+
depth - 3, move, ss->staticEval);
931934
return value;
932935
}
933936
}

0 commit comments

Comments
 (0)