]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Increase reduction for captures.
[stockfish] / src / search.cpp
index ad5b364d41d780db779c6b2ce88fa7524987acad..eb30d9fac8cd50c9cfc72ec1309e30a014579376 100644 (file)
@@ -1189,10 +1189,17 @@ moves_loop: // When in check, search starts from here
               // Decrease/increase reduction for moves with a good/bad history (~30 Elo)
               r -= ss->statScore / 16434;
           }
-
-          // Increase reduction for captures/promotions if late move and at low depth
-          else if (depth < 8 && moveCount > 2)
-              r++;
+          else
+          {
+            // Increase reduction for captures/promotions if late move and at low depth
+            if (depth < 8 && moveCount > 2)
+                r++;
+
+            // Unless giving check, this capture is likely bad
+            if (   !givesCheck
+                && ss->staticEval + PieceValue[EG][pos.captured_piece()] + 200 * depth <= alpha)
+                r++;
+          }
 
           Depth d = Utility::clamp(newDepth - r, 1, newDepth);