From 4c858092277054ddf59adf84809e7a7f91dfe47b Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 19 Jan 2024 17:14:55 +0100 Subject: fix: save unmodified score in transposition table --- src/grossmeister/search.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index 4d990f6..0df0628 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -120,7 +120,7 @@ impl Grossmeister { if score >= beta { transposition.mov = Some(mov); - transposition.score = beta; + transposition.score = score; transposition.node_type = NodeType::Cut; self.store_transposition(transposition); @@ -138,7 +138,7 @@ impl Grossmeister { transposition.node_type = NodeType::PV; } else if transposition.node_type == NodeType::All { transposition.mov = None; - transposition.score = alpha; + transposition.score = score; transposition.node_type = NodeType::All; } } else { @@ -172,6 +172,7 @@ impl Grossmeister { return 0.0 } + // Mate distance pruning let mating_score = Grossmeister::MDP(&mut alpha, &mut beta, root_distance); if mating_score != 0.0 { -- cgit v1.2.3