From 0388a79799902e5640c28f43d29f1597a14b0f24 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 27 Jan 2023 15:29:08 +0300 Subject: fix: correctly update aspiration window --- src/board/engine.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/board/engine.rs') diff --git a/src/board/engine.rs b/src/board/engine.rs index 58c9eb5..985dfb7 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -306,10 +306,12 @@ impl Board { beta = search_result.0 + window_size; } else if search_result.0 <= alpha { // Alpha-cutoff println!("Alpha cutoff {} <= {:?}", search_result.0, (alpha, beta)); + beta = alpha; alpha = search_result.0 - window_size * 4.0; continue; } else if search_result.0 >= beta { // Beta-cutoff println!("Beta cutoff {:?} <= {}", (alpha, beta), search_result.0); + alpha = beta; beta = search_result.0 + window_size * 4.0; continue; } else { -- cgit v1.2.3