Skip to content
Fabian Fichter edited this page Jul 23, 2022 · 5 revisions

Fairy-Stockfish supports the UCI, UCCI, UCI-cyclone, USI, and CECP/XBoard protocol. It tries to comply with the chess variant standards outlined in https://fairy-stockfish.github.io/chess-variant-standards/. A variant can be selected via the UCI_Variant option in UCI/UCCI/USI or with the variant command in CECP. For variants that are not supported by any GUI, the CECP protocol is the least verbose for manual use via the command line. For programmatic use, the UCI protocol is the recommended choice.

CECP

E.g., to begin a game of Kyoto shogi after starting Fairy-Stockfish, enter:

  1. xboard to set the protocol.
  2. variant kyotoshogi to select the variant.
  3. (Optional) d to print a board representation.
  4. E.g., b1b2+ to make your first move.
  5. go to ask the engine to play its first move.
  6. Repeat steps 3.-4. in order to show the board and play moves. The engine will reply automatically to your moves once you sent one go command.

See https://www.gnu.org/software/xboard/engine-intf.html for more info on the CECP/XBoard protocol, e.g., on how to set the time control or the like.

UCI

  1. uci to set the protocol
  2. setoption name UCI_Variant value seirawan to select the variant.
  3. position startpos to set up the starting position. Note: The position command is strictly required after setting a new variant, otherwise the engine will continue to play the previously set position, i.e., also the previous variant.
  4. go movetime 1000 to ask the engine to search.

See http://wbec-ridderkerk.nl/html/UCIProtocol.html for the documentation of the UCI protocol.

USI

  1. usi to set the protocol
  2. setoption name UCI_Variant value minishogi to select the variant. Can be skipped for playing shogi (the default).
  3. position startpos to set up the starting position. Note: The position command is strictly required after setting a new variant, otherwise the engine will continue to play the previously set position, i.e., also the previous variant.
  4. go movetime 1000 to ask the engine to search.

UCCI

  1. ucci to set the protocol
  2. setoption UCI_Variant minixiangqi to select the variant. Can be skipped for playing xiangqi (the default).
  3. position startpos to set up the starting position. Note: The position command is strictly required after setting a new variant, otherwise the engine will continue to play the previously set position, i.e., also the previous variant.
  4. go movetime 1000 to ask the engine to search.

UCI-cyclone

The UCI-cyclone protocol is supposed to be only used for Xiangqi.

  1. uci to set the protocol
  2. startpos to set up the starting position. Important: Skipping the position keyword indicated to the engine that it should use the UCI-cyclone dialect instead of standard UCI.
  3. go movetime 1000 to ask the engine to search.