diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-01-19 17:14:55 +0100 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-01-19 17:14:55 +0100 |
commit | 4c858092277054ddf59adf84809e7a7f91dfe47b (patch) | |
tree | 0eb31a02d1bdf70b32ed7e31205458ca4b1fe043 /src/grossmeister/search.rs | |
parent | 313522f154dccd30d7c5f01589ed6f2c35c5e551 (diff) | |
download | chessnost-4c858092277054ddf59adf84809e7a7f91dfe47b.tar.gz |
fix: save unmodified score in transposition table
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 5 |
1 files 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 { |