Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only cut via SNMP under some conditions. #194

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ impl Board {
// clear out the next set of killer moves.
t.killer_move_table[height + 1] = [None; 2];

let tt_move = tt_hit.and_then(|hit| hit.mov);
let tt_capture = matches!(tt_move, Some(mv) if self.is_capture(mv));

// whole-node pruning techniques:
if !NT::ROOT && !NT::PV && !in_check && excluded.is_none() {
// razoring.
Expand All @@ -808,9 +811,12 @@ impl Board {
// this is a generalisation of stand_pat in quiescence search.
if !t.ss[height].ttpv
&& depth <= info.conf.rfp_depth
&& static_eval - Self::rfp_margin(info, depth, improving) > beta
&& static_eval - Self::rfp_margin(info, depth, improving) >= beta
&& (tt_move.is_none() || tt_capture)
&& beta > -MINIMUM_TB_WIN_SCORE
&& static_eval < MINIMUM_TB_WIN_SCORE
{
return (static_eval + beta) / 2;
return beta + (static_eval - beta) / 3;
}

let last_move_was_null = self.last_move_was_nullmove();
Expand Down Expand Up @@ -863,9 +869,6 @@ impl Board {
}
}

let tt_move = tt_hit.and_then(|hit| hit.mov);
let tt_capture = matches!(tt_move, Some(mv) if self.is_capture(mv));

// TT-reduction (IIR).
if NT::PV && tt_hit.map_or(true, |tte| tte.depth + 4 <= depth) {
depth -= i32::from(depth >= info.conf.tt_reduction_depth);
Expand Down
Loading