From aab8b0e8ea5851b2b5a55de719ef1b897b456e53 Mon Sep 17 00:00:00 2001 From: cosmobobak Date: Sat, 7 Sep 2024 16:56:50 +0100 Subject: [PATCH] more snmp conditions Bench: 12288767 --- src/search.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/search.rs b/src/search.rs index d971d763..680651ee 100644 --- a/src/search.rs +++ b/src/search.rs @@ -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. @@ -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(); @@ -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);