aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-01-25 06:52:24 +0300
committereug-vs <eugene@eug-vs.xyz>2023-01-25 06:52:24 +0300
commitf6b3eae09ef3a8191c02cf462623032670cc5d13 (patch)
tree7b4e9b0769500782eb63451ecae55d84ed48ed62 /src
parent5efe1af18bd92533154d02a90cf2181452809087 (diff)
downloadchessnost-f6b3eae09ef3a8191c02cf462623032670cc5d13.tar.gz
feat: only include PV nodes in transposition table
Diffstat (limited to 'src')
-rw-r--r--src/board/engine.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs
index f7139e5..6543d1d 100644
--- a/src/board/engine.rs
+++ b/src/board/engine.rs
@@ -156,22 +156,6 @@ impl Board {
principal_variation = Vec::with_capacity(depth_left as usize);
principal_variation.push(mov);
principal_variation.append(&mut subtree_pv);
-
- 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::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);