Skip to content

Commit

Permalink
Tweaking the futility pruning formula
Browse files Browse the repository at this point in the history
Huge credit goes also to candirufish,
as the idea was first tried by him, and then tuned by me at multiple phases.

Tweaking the futility pruning formula to be a bit more selective about when pruning is applied.
Adjust the value added to the static eval based on the bestValue relative to ss->staticEval. If bestValue is significantly lower, we add a larger value.

Passed STC:
LLR: 2.98 (-2.94,2.94) <0.00,2.00>
Total: 37120 W: 9590 L: 9266 D: 18264
Ptnml(0-2): 130, 4301, 9385, 4603, 141
https://tests.stockfishchess.org/tests/view/6544cf90136acbc573523247

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 49632 W: 12381 L: 12033 D: 25218
Ptnml(0-2): 30, 5429, 13549, 5779, 29
https://tests.stockfishchess.org/tests/view/65453bc1136acbc573523a3c

closes #4861

bench: 1107118
  • Loading branch information
FauziAkram authored and vondele committed Nov 4, 2023
1 parent b4b704e commit 7f97ba7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,10 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
lmrDepth = std::max(lmrDepth, -1);

// Futility pruning: parent node (~13 Elo)
if (!ss->inCheck && lmrDepth < 13 && ss->staticEval + 77 + 124 * lmrDepth <= alpha)
if (!ss->inCheck && lmrDepth < 13
&& ss->staticEval + (bestValue < ss->staticEval - 62 ? 123 : 77)
+ 127 * lmrDepth
<= alpha)
continue;

lmrDepth = std::max(lmrDepth, 0);
Expand Down

0 comments on commit 7f97ba7

Please sign in to comment.