Skip to content

Commit

Permalink
simplify razoring
Browse files Browse the repository at this point in the history
bench 1449898
  • Loading branch information
xu-shawn committed Jan 15, 2025
1 parent c085670 commit 5daeb70
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,11 +773,10 @@ Value Search::Worker::search(
opponentWorsening = ss->staticEval + (ss - 1)->staticEval > 2;

// Step 7. Razoring (~1 Elo)
// If eval is really low, check with qsearch if we can exceed alpha. If the
// search suggests we cannot exceed alpha, return a speculative fail low.
// If eval is really low, skip search entirely and return the qsearch value.
// For PvNodes, we must have a guard against mates being returned.
if (!PvNode && eval < alpha - 462 - 297 * depth * depth)
return qsearch<NonPV>(pos, ss, alpha - 1, alpha);
return qsearch<NonPV>(pos, ss, alpha, beta);

// Step 8. Futility pruning: child node (~40 Elo)
// The depth condition is important for mate finding.
Expand Down

0 comments on commit 5daeb70

Please sign in to comment.