aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2024-01-19 17:14:55 +0100
committereug-vs <eugene@eug-vs.xyz>2024-01-19 17:14:55 +0100
commit4c858092277054ddf59adf84809e7a7f91dfe47b (patch)
tree0eb31a02d1bdf70b32ed7e31205458ca4b1fe043
parent313522f154dccd30d7c5f01589ed6f2c35c5e551 (diff)
downloadchessnost-4c858092277054ddf59adf84809e7a7f91dfe47b.tar.gz
fix: save unmodified score in transposition table
-rw-r--r--src/grossmeister/search.rs5
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 {