]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Introduce futility pruning for captures
[stockfish] / src / search.cpp
index a3d4a329a1f7c4075f68e7e5261104d679cbbffc..55c520a4b0fcb65db715dbd65beea3fcedc6c08e 100644 (file)
@@ -1049,6 +1049,13 @@ moves_loop: // When in check, search starts from here
                   && captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] < 0)
                   continue;
 
+              // Futility pruning for captures
+              if (   !givesCheck
+                  && lmrDepth < 6
+                  && !ss->inCheck
+                  && ss->staticEval + 270 + 384 * lmrDepth + PieceValue[MG][type_of(pos.piece_on(to_sq(move)))] <= alpha)
+                  continue;
+
               // See based pruning
               if (!pos.see_ge(move, Value(-194) * depth)) // (~25 Elo)
                   continue;