]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Use explicit logic for pruning
[stockfish] / src / search.cpp
index 112e149dc1cd7c6a297daa5b02eed7d9e009921e..81b3f29f335119e4aa7945f689fb68205dca7279 100644 (file)
@@ -919,7 +919,7 @@ moves_loop: // When in check search starts from here
 
       // Step 13. Pruning at shallow depth
       if (  !rootNode
-          &&  bestValue > VALUE_MATED_IN_MAX_PLY)
+          && bestValue > VALUE_MATED_IN_MAX_PLY)
       {
           if (   !captureOrPromotion
               && !givesCheck
@@ -941,6 +941,7 @@ moves_loop: // When in check search starts from here
 
               // Futility pruning: parent node
               if (   lmrDepth < 7
+                  && !inCheck
                   && ss->staticEval + 256 + 200 * lmrDepth <= alpha)
                   continue;
 
@@ -950,6 +951,7 @@ moves_loop: // When in check search starts from here
                   continue;
           }
           else if (   depth < 7 * ONE_PLY
+                   && !extension
                    && !pos.see_ge(move, Value(-35 * depth / ONE_PLY * depth / ONE_PLY)))
                   continue;
       }