Skip to content

Commit

Permalink
Corrplexity for futility pruning
Browse files Browse the repository at this point in the history
Add corrhist-based term to futility margin

Inspired by a recent patch of Shawn Xu, this tweak increases the margin
over beta needed to futility prune based on the correction history, with
an offset.
  • Loading branch information
Ergodice authored and PikaCat-OuO committed Jan 6, 2025
1 parent 93e0606 commit 54f04cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ Value Search::Worker::search(
if (!ss->ttPv && depth < 16
&& eval - futility_margin(depth, cutNode && !ss->ttHit, improving, opponentWorsening)
- (ss - 1)->statScore / 159
+ (ss->staticEval == eval) * (40 - std::abs(correctionValue) / 131072)
>= beta
&& eval >= beta && (!ttData.move || ttCapture) && !is_loss(beta) && !is_win(eval))
return beta + (eval - beta) / 3;
Expand Down

0 comments on commit 54f04cb

Please sign in to comment.