]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Revert futility pruning patches
[stockfish] / src / search.cpp
index af8ddaba5a420887d0c5a98907b7ca975d4b802d..c48b74bcc76ddc0761cdb9c44d961dffa4b0f2c0 100644 (file)
@@ -779,8 +779,10 @@ namespace {
                ? ss->staticEval > (ss-4)->staticEval || (ss-4)->staticEval == VALUE_NONE
                : ss->staticEval > (ss-2)->staticEval;
 
-    // Step 7. Futility pruning: child node (~50 Elo)
+    // Step 7. Futility pruning: child node (~50 Elo).
+    // The depth condition is important for mate finding.
     if (   !PvNode
+        &&  depth < 9
         &&  eval - futility_margin(depth, improving) >= beta
         &&  eval < VALUE_KNOWN_WIN) // Do not return unproven wins
         return eval;
@@ -989,7 +991,7 @@ moves_loop: // When in check, search starts here
       // Calculate new depth for this move
       newDepth = depth - 1;
 
-      // Step 13. Pruning at shallow depth (~200 Elo)
+      // Step 13. Pruning at shallow depth (~200 Elo). Depth conditions are important for mate finding.
       if (  !rootNode
           && pos.non_pawn_material(us)
           && bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
@@ -1023,6 +1025,7 @@ moves_loop: // When in check, search starts here
 
               // Futility pruning: parent node (~5 Elo)
               if (   !ss->inCheck
+                  && lmrDepth < 7
                   && ss->staticEval + 174 + 157 * lmrDepth <= alpha)
                   continue;