]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Don't compensate TT for evaluation drift
[stockfish] / src / search.cpp
index 12259bafb6f595f5c05c5bba550367aa6b4f866c..ac4d85b69996eb7abadda3cf61fcd9d50ec39cf7 100644 (file)
@@ -916,7 +916,7 @@ namespace {
         else
         {
             if (   newDepth >= 3*OnePly
-                && i >= MultiPV + LMRPVMoves - 2 // Remove -2 and decrease LMRPVMoves instead ?
+                && i >= MultiPV + LMRPVMoves
                 && !dangerous
                 && !moveIsCapture
                 && !move_is_promotion(move)
@@ -1109,7 +1109,7 @@ namespace {
     {
       assert(move_is_ok(move));
 
-      bool singleReply = (isCheck && mp.number_of_moves() == 1);
+      bool singleReply = (isCheck && mp.number_of_evasions() == 1);
       bool moveIsCheck = pos.move_is_check(move, dcCandidates);
       bool moveIsCapture = pos.move_is_capture(move);
 
@@ -1366,7 +1366,7 @@ namespace {
     {
       assert(move_is_ok(move));
 
-      bool singleReply = (isCheck && mp.number_of_moves() == 1);
+      bool singleReply = (isCheck && mp.number_of_evasions() == 1);
       bool moveIsCheck = pos.move_is_check(move, dcCandidates);
       bool moveIsCapture = pos.move_is_capture(move);
 
@@ -1540,10 +1540,10 @@ namespace {
         // Use the cached evaluation score if possible
         assert(ei.futilityMargin == Value(0));
 
-        staticValue = tte->value();
+        staticValue = tte->value() + ply;
     }
     else
-        staticValue = evaluate(pos, ei, threadID);
+        staticValue = evaluate(pos, ei, threadID) + ply;
 
     if (ply == PLY_MAX - 1)
         return evaluate(pos, ei, threadID);
@@ -2185,7 +2185,7 @@ namespace {
     // Case 5: Discovered check, checking piece is the piece moved in m1
     if (   piece_is_slider(pos.piece_on(t1))
         && bit_is_set(squares_between(t1, pos.king_square(pos.side_to_move())), f2)
-        && !bit_is_set(squares_between(t2, pos.king_square(pos.side_to_move())), t2))
+        && !bit_is_set(squares_between(t1, pos.king_square(pos.side_to_move())), t2))
     {
         Bitboard occ = pos.occupied_squares();
         Color us = pos.side_to_move();