Function jja::stockfish::stockfish_hash

source ·
pub fn stockfish_hash(position: &dyn Position) -> u64
Expand description

Computes the Stockfish compatible Zobrist hash of a given chess position.

This function uses the Zobrist hashing algorithm to compute a unique hash for the given position. Zobrist hashing is commonly used in board games such as chess to implement transposition tables, a form of caching that allows the engine to avoid calculating the same position more than once.

Arguments

  • position: A reference to the position to compute the hash for. The position is expected to implement the Position trait.

Returns

  • A u64 value representing the hash of the position.