Board Representation (chess) - Requirements

Requirements

A full description of a chess position, i.e. the position "state", should contain the following elements:

  • The location of each piece on the board
  • Whose turn it is to move
  • Status of the 50-move draw rule. The name of this is sometimes a bit confusing, as it is 50 moves by each player, and therefore 100 half-moves, or ply. For example, if the previous 80 half-moves passed without a capture or a pawn move, the fifty-move rule will kick in after another twenty half-moves.
  • Whether either player is permanently disqualified to castle, both kingside and queenside.
  • If an en passant capture is possible.

Board representation typically does not include the status of the threefold repetition draw rule. To determine this rule, a complete history of the game from the last irreversible action (capture, pawn movement, or castling) needs to be maintained, and so, is generally tracked in separate data structures.

Read more about this topic:  Board Representation (chess)