From b7b7800e2b752c93131e03c31d7456f18b392a7c Mon Sep 17 00:00:00 2001 From: Taras Vuk <117687515+TarasVuk@users.noreply.github.com> Date: Sun, 22 Oct 2023 08:36:43 +0200 Subject: [PATCH] Simplify futilityBase formula This patch replaces std::min(ss->staticEval, bestValue) with ss->staticEval in the futilityBase formula. Original idea by Vizvezdenec: https://tests.stockfishchess.org/tests/view/64ce66795b17f7c21c0d85f3 Passed STC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 116928 W: 29925 L: 29793 D: 57210 Ptnml(0-2): 399, 13558, 30446, 13634, 427 https://tests.stockfishchess.org/tests/view/653285aade6d262d08d385dd Passed LTC: LLR: 2.96 (-2.94,2.94) <-1.75,0.25> Total: 50868 W: 12947 L: 12757 D: 25164 Ptnml(0-2): 30, 5414, 14355, 5606, 29 https://tests.stockfishchess.org/tests/view/65336ffbde6d262d08d39ba0 closes https://github.com/official-stockfish/Stockfish/pull/4837 bench: 1241996 --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 43f0c872..43d78892 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1451,7 +1451,7 @@ Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth) { if (bestValue > alpha) alpha = bestValue; - futilityBase = std::min(ss->staticEval, bestValue) + 200; + futilityBase = ss->staticEval + 200; } const PieceToHistory* contHist[] = {(ss - 1)->continuationHistory, -- 2.39.2