Skip to content

Commit

Permalink
disable razoring when try to find shorter win
Browse files Browse the repository at this point in the history
test f20, s15, r15
  • Loading branch information
dhbloo committed Jul 16, 2024
1 parent 77b33dd commit 38a2759
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Rapfi/search/ab/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,8 @@ 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 // 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 38a2759

Please sign in to comment.