-
-
Notifications
You must be signed in to change notification settings - Fork 200
Command line
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.
E.g., to begin a game of Kyoto shogi after starting Fairy-Stockfish, enter:
-
xboard
to set the protocol. -
variant kyotoshogi
to select the variant. - (Optional)
d
to print a board representation. - E.g.,
b1b2+
to make your first move. -
go
to 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
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
to set the protocol -
setoption name UCI_Variant value seirawan
to select the variant. -
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. -
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
to set the protocol -
setoption name UCI_Variant value minishogi
to select the variant. Can be skipped for playing shogi (the default). -
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. -
go movetime 1000
to ask the engine to search.
-
ucci
to set the protocol -
setoption UCI_Variant minixiangqi
to select the variant. Can be skipped for playing xiangqi (the default). -
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. -
go movetime 1000
to ask the engine to search.
The UCI-cyclone protocol is supposed to be only used for Xiangqi.
-
uci
to set the protocol -
startpos
to set up the starting position. Important: Skipping theposition
keyword indicated to the engine that it should use the UCI-cyclone dialect instead of standard UCI. -
go movetime 1000
to ask the engine to search.