Module pabi::chess

source ·
Expand description

Implementation of chess environment, its rules and specifics.

Modules§

  • Mappings of occupied squares to the attacked squares for each piece. The mappings are pre-calculated where possible to provide an efficient way of generating moves.
  • Bitboard-based representation for crate::chess::position::Position. Bitboards utilize the fact that modern processors operate on 64 bit integers, and the bit operations can be performed simultaneously. This results in very efficient calculation of possible attack vectors and other meaningful features that are required to calculate possible moves and evaluate position. The disadvantage is complexity that comes with bitboard implementation and inefficiency of some operations like “get piece type on given square” (efficiently handled by Square-centric board implementations that can be used together bitboard-based approach to compensate its shortcomings).
  • Chess primitives commonly used within crate::chess.
  • generated 🔒
  • Provides fully-specified Chess Position implementation: stores information about the board and tracks the state of castling, 50-move rule draw, etc.
  • Zobrist hashing-related utilities`.