Skip to content

Commit dabaf22

Browse files
committed
Revert futility pruning patches
reverts 09b6d28 and dbd7f60 that significantly impact mate finding capabilities. For example on ChestUCI_23102018.epd, at 1M nodes, the number of mates found is nearly reduced 2x without these depth conditions: sf6 2091 sf7 2093 sf8 2107 sf9 2062 sf10 2208 sf11 2552 sf12 2563 sf13 2509 sf14 2427 master 1246 patched 2467 (script for testing at https://github.com/official-stockfish/Stockfish/files/6936412/matecheck.zip) closes #3641 fixes #3627 Bench: 5467570
1 parent a1a83f3 commit dabaf22

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/search.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,10 @@ namespace {
779779
? ss->staticEval > (ss-4)->staticEval || (ss-4)->staticEval == VALUE_NONE
780780
: ss->staticEval > (ss-2)->staticEval;
781781

782-
// Step 7. Futility pruning: child node (~50 Elo)
782+
// Step 7. Futility pruning: child node (~50 Elo).
783+
// The depth condition is important for mate finding.
783784
if ( !PvNode
785+
&& depth < 9
784786
&& eval - futility_margin(depth, improving) >= beta
785787
&& eval < VALUE_KNOWN_WIN) // Do not return unproven wins
786788
return eval;
@@ -989,7 +991,7 @@ namespace {
989991
// Calculate new depth for this move
990992
newDepth = depth - 1;
991993

992-
// Step 13. Pruning at shallow depth (~200 Elo)
994+
// Step 13. Pruning at shallow depth (~200 Elo). Depth conditions are important for mate finding.
993995
if ( !rootNode
994996
&& pos.non_pawn_material(us)
995997
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
@@ -1023,6 +1025,7 @@ namespace {
10231025

10241026
// Futility pruning: parent node (~5 Elo)
10251027
if ( !ss->inCheck
1028+
&& lmrDepth < 7
10261029
&& ss->staticEval + 174 + 157 * lmrDepth <= alpha)
10271030
continue;
10281031

0 commit comments

Comments
 (0)