From 7755ec638a1fbef2bb87f7cf0378e01dc650c17c Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 26 Jan 2023 16:33:06 +0300 Subject: feat: include All-nodes in transposition table --- src/board/engine.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/board/engine.rs') diff --git a/src/board/engine.rs b/src/board/engine.rs index 821e65a..8bd409b 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -181,6 +181,14 @@ impl Board { node_type: NodeType::PV, score, }); + } else { + self.transposition_table[(self.hash % TTABLE_SIZE) as usize] = Some(TranspositionTableItem { + hash: self.hash, + best_move: mov, + depth: depth_left, // TODO: should be actual depth searched + node_type: NodeType::All, + score, + }); } } else { self.unmake_move(mov, captured_piece, ep_target_before, castling_rights_before, hash_before); -- cgit v1.2.3