From c14f4877cf8067e0913a6db4ab05fef9a853c1d0 Mon Sep 17 00:00:00 2001 From: Vizvezdenec Date: Thu, 2 Apr 2020 06:33:53 +0300 Subject: [PATCH] Increase reduction for captures. The idea behind this patch is that if static eval is really bad so capturing of current piece on spot will still produce a position with an eval much lower than alpha then our best chance is to create some kind of king attack. So captures without check are mostly worse than captures with check and can be reduced more. passed STC https://tests.stockfishchess.org/tests/view/5e8514b44411759d9d098543 LLR: 2.94 (-2.94,2.94) {-0.50,1.50} Total: 46196 W: 9039 L: 8781 D: 28376 Ptnml(0-2): 750, 5412, 10628, 5446, 862 passed LTC https://tests.stockfishchess.org/tests/view/5e8530134411759d9d09854c LLR: 2.94 (-2.94,2.94) {0.25,1.75} Total: 23462 W: 3228 L: 2988 D: 17246 Ptnml(0-2): 186, 2125, 6849, 2405, 166 close https://github.com/official-stockfish/Stockfish/pull/2612 bench 4742598 --- src/search.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index ad5b364d..eb30d9fa 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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); -- 2.39.2