]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Don't compensate TT for evaluation drift
[stockfish] / src / search.cpp
index 7bc90b143d10b85a94ff0a4cbf9f214e9d0b3525..ac4d85b69996eb7abadda3cf61fcd9d50ec39cf7 100644 (file)
@@ -1556,7 +1556,7 @@ namespace {
     {
         // Store the score to avoid a future costly evaluation() call
         if (!isCheck && !tte && ei.futilityMargin == 0)
-            TT.store(pos.get_key(), bestValue - ply, VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE);
+            TT.store(pos.get_key(), value_to_tt(bestValue, ply), VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE);
 
         return bestValue;
     }