]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Extra bonus for capture creating a huge fail high
[stockfish] / src / search.cpp
index b87c689479d2a7909667a591d31c49b6b6cc21d4..220bf55f9beac657f10dd69eec43e0416454ea28 100644 (file)
@@ -1166,7 +1166,8 @@ moves_loop: // When in check, search starts from here
         if (!pos.capture_or_promotion(bestMove))
             update_quiet_stats(pos, ss, bestMove, quietsSearched, quietCount, stat_bonus(depth));
         else
-            update_capture_stats(pos, bestMove, capturesSearched, captureCount, stat_bonus(depth));
+            update_capture_stats(pos, bestMove, capturesSearched, captureCount,
+                                 stat_bonus(depth + bool(bestValue > beta + KnightValueMg) * ONE_PLY));
 
         // Extra penalty for a quiet TT move in previous ply when it gets refuted
         if ((ss-1)->moveCount == 1 && !pos.captured_piece())