diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-01-29 15:54:28 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-01-29 15:54:28 +0300 |
commit | 247e614a6a69a4113c2653d440471c384c86bf85 (patch) | |
tree | c793801b1ef10828974d95c14a16a500e332482c | |
parent | 34faf4abf56502e97fdeaf4a0d825cff75085b61 (diff) | |
download | chessnost-247e614a6a69a4113c2653d440471c384c86bf85.tar.gz |
fix: correct zero-window size in PV-search
-rw-r--r-- | src/board/engine.rs | 3 |
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 { |