diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-01-21 16:39:52 +0100 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-01-21 16:39:52 +0100 |
commit | 5c931ac8a8c8a1ec83e4ca1e5e6d54844df87eb7 (patch) | |
tree | 86c3c748664073d640c0477e59636a3a946e10af /src/grossmeister/search.rs | |
parent | 9a5ec69554a5b93bb57d3f35828751d4d2241958 (diff) | |
download | chessnost-5c931ac8a8c8a1ec83e4ca1e5e6d54844df87eb7.tar.gz |
feat: display info when using deeper nodes
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 6 |
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); |