From: gabe Date: Fri, 6 Oct 2023 20:59:22 +0000 (+0200) Subject: Avoid recomputing moveCountPruning X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=f7fbc6880efae2ec9d97d6f1d65e2ad00547e32c Avoid recomputing moveCountPruning In search, when moveCountPruning becomes true, it can never turn false again. Passed STC https://tests.stockfishchess.org/tests/view/652075ceac57711436728aac LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 136448 W: 34923 L: 34472 D: 67053 Ptnml(0-2): 420, 15094, 36767, 15501, 442 closes https://github.com/official-stockfish/Stockfish/pull/4823 Non functional change --- diff --git a/src/search.cpp b/src/search.cpp index a5b5c101..69d8decf 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -984,7 +984,8 @@ moves_loop: // When in check, search starts here && bestValue > VALUE_TB_LOSS_IN_MAX_PLY) { // Skip quiet moves if movecount exceeds our FutilityMoveCount threshold (~8 Elo) - moveCountPruning = moveCount >= futility_move_count(improving, depth); + if (!moveCountPruning) + moveCountPruning = moveCount >= futility_move_count(improving, depth); // Reduced depth of the next LMR search int lmrDepth = newDepth - r;