From 247e614a6a69a4113c2653d440471c384c86bf85 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 29 Jan 2023 15:54:28 +0300 Subject: fix: correct zero-window size in PV-search --- src/board/engine.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/board/engine.rs') 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 { -- cgit v1.2.3