Zobrist

dicechess.engine.domain.Zobrist
object Zobrist

Deterministic Zobrist hashing for Dice Chess game states.

Includes piece placement, active color, castling rights, en passant target squares, and canonical remaining dice pool combinations.

Attributes

Source
Zobrist.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Zobrist.type

Members list

Value members

Concrete methods

def computeKey(state: GameState): Long

Computes the complete Zobrist key for state from scratch.

Computes the complete Zobrist key for state from scratch.

Attributes

Source
Zobrist.scala
def dicePoolKey(d1: Int, d2: Int, d3: Int): Long

Returns the canonical Zobrist key component for a dice pool.

Returns the canonical Zobrist key component for a dice pool.

Multisets are canonicalized (sorted), ensuring List(1, 3) and List(3, 1) produce the exact same key.

Attributes

Source
Zobrist.scala
inline def dicePoolKey(flags: GameFlags): Long

Attributes

Source
Zobrist.scala
inline def pieceIndex(color: Color, pieceType: PieceType): Int

Maps (color, pieceType) to an index in [0, 11]

Maps (color, pieceType) to an index in [0, 11]

Attributes

Source
Zobrist.scala
inline def pieceKey(color: Color, pieceType: PieceType, sq: Square): Long

Returns the Zobrist key component for a piece on a square.

Returns the Zobrist key component for a piece on a square.

Attributes

Source
Zobrist.scala

Concrete fields

val ActiveColorKey: Long

XOR key applied when active color is Black

XOR key applied when active color is Black

Attributes

Source
Zobrist.scala
val CastlingTable: Array[Long]

Castling rights table: 16 possible 4-bit combinations

Castling rights table: 16 possible 4-bit combinations

Attributes

Source
Zobrist.scala
val DicePoolTable: Array[Long]

Dice pool multiset table: 343 combinations for sorted (slot1, slot2, slot3)

Dice pool multiset table: 343 combinations for sorted (slot1, slot2, slot3)

Attributes

Source
Zobrist.scala
val EnPassantTable: Array[Long]

En passant target squares table: 64 squares

En passant target squares table: 64 squares

Attributes

Source
Zobrist.scala
val PieceTable: Array[Array[Long]]

Piece placement table: 12 piece types (6 White, 6 Black) x 64 squares

Piece placement table: 12 piece types (6 White, 6 Black) x 64 squares

Attributes

Source
Zobrist.scala