From 687761c819c87fb64be4d4ca4fa470151e3bd774 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 29 Jan 2023 09:01:47 +0300 Subject: feat: change default window size 0.25 -> 0.5 --- src/board/engine.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/board/engine.rs b/src/board/engine.rs index 3977258..2c294a3 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -384,7 +384,7 @@ impl Board { let mut depth = 1; let mut alpha = -INFINITY; let mut beta = INFINITY; - let window_size = 0.25; + let window_size = 0.5; let mut gradual_widening_counter = 0; while depth <= max_depth { @@ -411,13 +411,13 @@ impl Board { println!("Alpha cutoff {} <= {:?}", search_result.0, (alpha, beta)); gradual_widening_counter += 1; beta = alpha; - alpha = search_result.0 - window_size * 4.0f32.powi(gradual_widening_counter); + alpha = search_result.0 - window_size * 2.0f32.powi(gradual_widening_counter); continue; } else if search_result.0 >= beta { // Beta-cutoff println!("Beta cutoff {:?} <= {}", (alpha, beta), search_result.0); gradual_widening_counter += 1; alpha = beta; - beta = search_result.0 + window_size * 4.0f32.powi(gradual_widening_counter); + beta = search_result.0 + window_size * 2.0f32.powi(gradual_widening_counter); continue; } else { panic!("Can this ever be possible? (probably not)"); -- cgit v1.2.3