pub trait TranspositionTable<T: Eq + Hash + Game> {
// Required methods
fn get(&self, board: &T) -> Option<i32>;
fn insert(&mut self, board: T, score: i32);
fn has(&self, board: &T) -> bool;
}Expand description
A transposition table for a game. Transposition tables implement caching for minimax algorithms.
Transposition tables should optimally be O(1) for get, has, and insert.
The best structure for this is a HashMap.
all HashMaps already implement TranspositionTable.