From 5c931ac8a8c8a1ec83e4ca1e5e6d54844df87eb7 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 21 Jan 2024 16:39:52 +0100 Subject: feat: display info when using deeper nodes --- src/grossmeister/search.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3