aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-01-29 09:01:47 +0300
committereug-vs <eugene@eug-vs.xyz>2023-01-29 09:01:47 +0300
commit687761c819c87fb64be4d4ca4fa470151e3bd774 (patch)
tree22dff3df0321bf0bc3fea2c264bc10884a308050 /src
parentb3b6fa6959332a3b1ed8a8e8efb0c08cd3693c85 (diff)
downloadchessnost-687761c819c87fb64be4d4ca4fa470151e3bd774.tar.gz
feat: change default window size 0.25 -> 0.5
Diffstat (limited to 'src')
-rw-r--r--src/board/engine.rs6
1 files 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)");