Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 6.26 KB

README.md

File metadata and controls

46 lines (37 loc) · 6.26 KB

Chess variant standards

This is an overview of standards used for chess variants. Most standards are taken over from chess with minor extensions and modifications, but the differences often are not documented, so this page tries to fill this gap.

Game records

PGN

The Portable Game Notation is a standard for recording chess games, see its specification. For chess variants it can be naturally extended by generalizing the move and position notation, i.e., SAN and FEN. The main addition is the Variant header tag containing the capitalized variant name in order to specify the variant the game record is using.

Position description

FEN

The Forsyth-Edwards Notation for standard chess is specified in the PGN standard. For chess variants FEN can be naturally extended by allowing arbitrary piece characters and board sizes. For specific rule modifications some extensions and modifications are required, such as for check counting, S-Chess gating, counting rules, and the like.

See the FEN subpage for details.

SFEN

The specification of the Shogi Forsyth-Edwards Notation is part of the USI protocol specification.

EPD

The Extended Position Description for chess variants does not have any variant-specific modifications other than applying all the changes as for FEN. Apart from that the EPD specification defined in the PGN standard for chess applies. It is recommended to add a variant operation in order to specify the variant name.

Move description

SAN

The Short/Standard Algebraic Notation for standard chess is specified in the PGN standard. For chess variants there are several extensions in order to represent special moves, such as piece drops and gating.

  • Piece drops like in crazyhouse are indicated by adding an @ before the target square, e.g., P@f7.
  • Drops of pieces in promoted state such as in kyoto shogi, are denoted using a +, e.g., +P@a3.
  • S-Chess style gating moves are indicated by adding the capital gating piece character after a /, e.g., Qd2/E. If gating happens to a square other than the origin square, the square is indicated after the gating piece, like Qa4/Pd4. This is also the case when the gating would otherwise be ambiguous, such as in case of castling due to the option of gating on king or rook, e.g., 0-0/Eh1.

Coordinate notation

The pure coordinate notation is specified as part of the UCI protocol (also here). For chess variants it requires extensions in order to describe piece drops, gating, and shogi-style piece promotions.

  • Piece drops like in crazyhouse are indicated by replacing the origin square by the capital letter of the dropped piece and @, e.g., P@f7.
  • Drops of pieces in promoted state such as in kyoto shogi, are denoted using a +, e.g., +P@a3.
  • Shogi style piece promotions are denoted with a +, e.g., b2h8+. Corresponding demotions are denoted with a -.
  • S-Chess style gating moves use the same notation as promotions to indicate the gated piece, e.g., d1d2e. For castling if gating happens on the rook square, it is encoded as rook captures king, e.g., h1e1h. In games where the gating happens on arbitrary squares, e.g., game of the amazons, the square is indicated after the gating piece, like a4a5pd5.
  • When a castling move is ambiguous because the king could pseudo-legally move to the target square without castling, such as in Diana chess, the "king captures rook" chess960 castling notation is used.

Engine protocols

UCI

The Universal Chess Interface is a chess engine protocol specified here (older version). For chess variants it only requires an additional convention which UCI option to use to set the variant, which is UCI_Variant, and it uses the generalized FEN and coordinate notation as described above. The UCI_Chess960 option for chess variants is used as a general switch to Chess960 style castling rules and notation in both the FEN (KQkq -> AHah) and coordinate notation (e1g1 -> e1h1). Note that as for standard chess UCI a position command is required before starting a search, i.e., updating UCI_Variant is not required to set up the new variant yet.

USI

The Universal Shogi Protocol is a dialect of the UCI protocol for Shogi defined in the USI protocol specification.

UCCI

The Universal Chinese Chess Interface is a dialect of the UCI protocol for Xiangqi. It skips the name and value keywords in the reporting of options and instead requires option names not to contain spaces in order to disambiguate parsing of tokens. It uses a move coordinate notation using ranks 0-9 instead of 1-10.

UCI-cyclone

The UCI-cyclone protocol is a modification of the UCI protocol for Xiangqi. It uses a move coordinate notation using ranks 0-9 instead of 1-10 and it skips the position keyword in commands to set up the board position.

CECP

There are several specifications of the Chess Engine Communication Protocol here, here, and here. It by the specification already supports chess variants.