aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grossmeister/search.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs
index baa91d0..d9dbdf1 100644
--- a/src/grossmeister/search.rs
+++ b/src/grossmeister/search.rs
@@ -269,13 +269,17 @@ impl Grossmeister {
if depth > 0 {
if let Some(transposition) = self.transposition() {
if let Some(mov) = transposition.mov {
+ debug_assert!(transposition.depth >= depth, "TTable node should be at least as deep as we expect");
+ if transposition.depth > depth {
+ println!("info string found higher-depth {:?}-node ({}) than expected ({}). Good for us?", transposition.node_type, transposition.depth, depth);
+ }
let ep_target_before = self.board.ep_target;
let castling_rights_before = self.board.castling_rights;
let hash_before = self.board.hash;
let captured = self.board.make_move(mov);
pv.push(mov);
- let mut subtree_pv = self.reconstruct_pv(depth - 1);
+ let mut subtree_pv = self.reconstruct_pv(transposition.depth - 1);
pv.append(&mut subtree_pv);
self.board.unmake_move(mov, captured, ep_target_before, castling_rights_before, hash_before);