]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Remove Capture Extension
[stockfish] / src / search.cpp
index 8a4db35185921776e4288e02e83c8744c2c35db7..eb0ac5bbd02c856c2a9d85989af21f22eafcacf5 100644 (file)
@@ -1037,6 +1037,16 @@ moves_loop: // When in check, search starts here
                   && captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] < 0)
                   continue;
 
+              // Futility pruning for captures
+              if (   !pos.empty(to_sq(move))
+                  && !givesCheck
+                  && !PvNode
+                  && lmrDepth < 6
+                  && !ss->inCheck
+                  && ss->staticEval + 342 + 238 * lmrDepth + PieceValue[EG][pos.piece_on(to_sq(move))] 
+                   + captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] / 8 < alpha)
+                  continue;
+
               // SEE based pruning
               if (!pos.see_ge(move, Value(-218) * depth)) // (~25 Elo)
                   continue;
@@ -1113,12 +1123,6 @@ moves_loop: // When in check, search starts here
               extension = -2;
       }
 
-      // Capture extensions for PvNodes and cutNodes
-      else if (   (PvNode || cutNode)
-               && captureOrPromotion
-               && moveCount != 1)
-          extension = 1;
-
       // Check extensions
       else if (   givesCheck
                && depth > 6