1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use crate::moves::Move;
/// https://www.chessprogramming.org/Node_Types
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum NodeType {
/// Principal variation node - exact score
PV,
/// Fail-high
Cut,
/// Fail-low
All,
}
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct TranspositionTableItem {
/// Zobrist hash of this position
pub hash: u64,
pub mov: Move,
pub depth: u8,
pub score: f32,
pub node_type: NodeType,
}
pub const TTABLE_SIZE: u64 = 2u64.pow(24);
pub type TranspositionTable = Vec<Option<TranspositionTableItem>>;
|