]> git.sesse.net Git - stockfish/commitdiff
Adjust futility pruning base in qsearch
authorMichael Chaly <Vizvezdenec@gmail.com>
Sun, 6 Aug 2023 23:32:38 +0000 (02:32 +0300)
committerStéphane Nicolet <cassio@free.fr>
Mon, 7 Aug 2023 05:24:11 +0000 (07:24 +0200)
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

index dc439ed00e5d3ca55439235e83c9581cefa8c48d..24f54c32bb35537231576690f35e4bb479f70667 100644 (file)
@@ -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,