diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-01-27 15:29:08 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-01-27 15:29:08 +0300 |
commit | 0388a79799902e5640c28f43d29f1597a14b0f24 (patch) | |
tree | fc506e742e93f55e05f901fc0356d4f13d66543d /src/board/engine.rs | |
parent | 616f36cefb22b12ade205198c42885888a14ea6b (diff) | |
download | chessnost-0388a79799902e5640c28f43d29f1597a14b0f24.tar.gz |
fix: correctly update aspiration window
Diffstat (limited to 'src/board/engine.rs')
-rw-r--r-- | src/board/engine.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |