Skip to content

Commit

Permalink
disable razoring when try to find short win only when tthit
Browse files Browse the repository at this point in the history
test f20
  • Loading branch information
dhbloo committed Jul 17, 2024
1 parent 6a077fd commit 47d35e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Rapfi/search/ab/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,9 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth
}

// Step 7. Razoring with VCF (~55 elo)
if (!PvNode && eval + razorMargin<Rule>(depth) < alpha) {
if (!PvNode
&& (alpha < VALUE_MATE_IN_MAX_PLY || !ttHit) // We are not searching for a short win
&& eval + razorMargin<Rule>(depth) < alpha) {
return vcfsearch<Rule, NonPV>(board, ss, alpha, alpha + 1);
}

Expand Down

0 comments on commit 47d35e7

Please sign in to comment.