From 5de3198f9d668ac93a90d7f9eb95ca77133058c3 Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Thu, 19 Feb 2026 15:49:31 -0500 Subject: [PATCH] chore: clamp pvs depth reduction to 0 No functional change according to bench but not 100% sure. bench: 877749 --- engine/src/search.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/search.rs b/engine/src/search.rs index 1b0bd191..3c5ee9e3 100644 --- a/engine/src/search.rs +++ b/engine/src/search.rs @@ -558,7 +558,7 @@ impl<'a, Log: LogLevel> Search<'a, Log> { }; // Calculate the reduced depth - let reduced_depth = depth.saturating_sub(reduction); + let reduced_depth = depth.saturating_sub(reduction).max(0); // Search with a null window at a reduced depth let mut temp_score = -self.negamax::(board, reduced_depth, ply + 1, -alpha_use - 1, -alpha_use, &mut local_pv);