aboutsummaryrefslogtreecommitdiff
path: root/src/grossmeister/search.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/grossmeister/search.rs')
-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 {