Command line - fairy-stockfish/Fairy-Stockfish GitHub Wiki
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:
xboardto set the protocol.variant kyotoshogito select the variant.- (Optional)
dto print a board representation. - E.g.,
b1b2+to make your first move. goto ask the engine to play its first move.- 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
gocommand.
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
ucito set the protocolsetoption name UCI_Variant value seirawanto select the variant.position startposto 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.go movetime 1000to ask the engine to search.
See http://wbec-ridderkerk.nl/html/UCIProtocol.html for the documentation of the UCI protocol.
USI
usito set the protocolsetoption name UCI_Variant value minishogito select the variant. Can be skipped for playing shogi (the default).position startposto 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.go movetime 1000to ask the engine to search.
UCCI
uccito set the protocolsetoption UCI_Variant minixiangqito select the variant. Can be skipped for playing xiangqi (the default).position startposto 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.go movetime 1000to ask the engine to search.
UCI-cyclone
The UCI-cyclone protocol is supposed to be only used for Xiangqi.
ucito set the protocolstartposto set up the starting position. Important: Skipping thepositionkeyword indicated to the engine that it should use the UCI-cyclone dialect instead of standard UCI.go movetime 1000to ask the engine to search.