From 5c2111cc30b283aa5b7e1cc1c1e9d7c52e1e910b Mon Sep 17 00:00:00 2001 From: Michael Chaly Date: Mon, 7 Aug 2023 02:32:38 +0300 Subject: [PATCH] Adjust futility pruning base in qsearch Current master used value from transposition table there if it existed, this patch uses minimum between this tt value and the static eval instead (this thus is closer to the main search function, which uses the static eval). Passed STC: https://tests.stockfishchess.org/tests/view/64cd57285b17f7c21c0d6a8c LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 252544 W: 64671 L: 64039 D: 123834 Ptnml(0-2): 839, 29207, 65575, 29785, 866 Passed LTC: https://tests.stockfishchess.org/tests/view/64cf6c915b17f7c21c0d9fcb LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 60150 W: 15374 L: 15012 D: 29764 Ptnml(0-2): 24, 6321, 17024, 6681, 25 closes https://github.com/official-stockfish/Stockfish/pull/4725 Bench: 1573024 --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index dc439ed0..24f54c32 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1495,7 +1495,7 @@ moves_loop: // When in check, search starts here if (bestValue > alpha) alpha = bestValue; - futilityBase = bestValue + 200; + futilityBase = std::min(ss->staticEval, bestValue) + 200; } const PieceToHistory* contHist[] = { (ss-1)->continuationHistory, (ss-2)->continuationHistory, -- 2.39.2