aboutsummaryrefslogtreecommitdiff
path: root/src/board
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-01-29 15:54:28 +0300
committereug-vs <eugene@eug-vs.xyz>2023-01-29 15:54:28 +0300
commit247e614a6a69a4113c2653d440471c384c86bf85 (patch)
treec793801b1ef10828974d95c14a16a500e332482c /src/board
parent34faf4abf56502e97fdeaf4a0d825cff75085b61 (diff)
downloadchessnost-247e614a6a69a4113c2653d440471c384c86bf85.tar.gz
fix: correct zero-window size in PV-search
Diffstat (limited to 'src/board')
-rw-r--r--src/board/engine.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs
index d24b5bb..f2f6d10 100644
--- a/src/board/engine.rs
+++ b/src/board/engine.rs
@@ -320,7 +320,8 @@ impl Board {
} else {
// After we have PV-node (that raised alpha) all other nodes will be searched
// with zero-window first to confirm this assumption
- let result = self.negamax_search(-(alpha + 0.0001), -alpha, depth_left - 1, &mut killer_moves, deadline);
+ // TODO: changing 0.001 -> 0.0001 leads to a weird bug
+ let result = self.negamax_search(-(alpha + 0.001), -alpha, depth_left - 1, &mut killer_moves, deadline);
// In case some of the other nodes raises alpha, then it's true PV node now,
// let's research with full window to find its exact value
if -result.0 > alpha {