Skip to content

Commit 0ef5d05

Browse files
Vizvezdenecvondele
authored andcommitted
Adjust best value after a pruned quiet move
Logic somewhat similar to how we adjust best value after pruned captures in qsearch, but in search this patch does it after pruned quiet moves and also to not full scale of futility value but to smth in between best value and futility value. Passed STC: https://tests.stockfishchess.org/tests/view/6601cf900ec64f0526c55c30 LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 59936 W: 15722 L: 15369 D: 28845 Ptnml(0-2): 182, 7097, 15112, 7340, 237 Passed LTC: https://tests.stockfishchess.org/tests/view/66029b2d0ec64f0526c566f1 LLR: 2.96 (-2.94,2.94) <0.50,2.50> Total: 118362 W: 29953 L: 29460 D: 58949 Ptnml(0-2): 68, 13159, 32249, 13622, 83 closes #5141 bench 1772608
1 parent e636f73 commit 0ef5d05

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/search.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -995,12 +995,17 @@ Value Search::Worker::search(
995995

996996
lmrDepth += history / 5637;
997997

998+
Value futilityValue =
999+
ss->staticEval + (bestValue < ss->staticEval - 59 ? 141 : 58) + 125 * lmrDepth;
1000+
9981001
// Futility pruning: parent node (~13 Elo)
999-
if (!ss->inCheck && lmrDepth < 15
1000-
&& ss->staticEval + (bestValue < ss->staticEval - 59 ? 141 : 58)
1001-
+ 125 * lmrDepth
1002-
<= alpha)
1002+
if (!ss->inCheck && lmrDepth < 15 && futilityValue <= alpha)
1003+
{
1004+
if (bestValue <= futilityValue && abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY
1005+
&& futilityValue < VALUE_TB_WIN_IN_MAX_PLY)
1006+
bestValue = (bestValue + futilityValue * 3) / 4;
10031007
continue;
1008+
}
10041009

10051010
lmrDepth = std::max(lmrDepth, 0);
10061011

0 commit comments

Comments
 (0)