Skip to content
Fabian Fichter edited this page Jan 2, 2020 · 53 revisions

Online

Pychess-variants

On Pychess-variants you can play various chess variants against Fairy-Stockfish, e.g., Xiangqi, Shogi, Makruk, and more.

GUIs

For offline usage, download the latest release or compile it from source and use it together with one of the GUIs listed below.

XBoard/WinBoard

Fairy-Stockfish also supports the CECP/XBoard protocol, so it can easily be used in XBoard/WinBoard. On Windows, it is recommended to use the WinBoard version with enlarged buffer size that is able to process long variant lists, since otherwise WinBoard might crash when loading the engine.

Setup steps on Windows

  1. Download the Fairy-Stockfish executable from the latest release.
  2. Download WinBoard and extract the zip archive.
  3. Open the Winboard folder and double click the winboard.exe.
  4. Click on Engines>Edit Engine List...
  5. Add one line similar to "Fairy-SF" -fcp "C:\fairy-stockfish.exe" (adjust the path to where you put the .exe in step 1). Click on commit changes and OK.
  6. Click on Engines>Load New 1st Engine... and double click on Fairy-SF.
  7. Via File>New Variant... you should now be able to select variants supported by Fairy-Stockfish.
  • In releases up to 10.3, Fairy-Stockfish does not support the XBoard protocol, so a UCI2WB adapter needs to be used.

  • Variants with custom boards (e.g., board sizes other than 8x8 or with drop rules) should also work, but there are some exceptions in which case the variant can only be played when using Fairy-Stockfish as the second engine and the first engine has to define the board.

  • If a custom variant uses non-standard castling or promotion, Test Legality under Options>General... might need to be disabled in order to allow the input of such special moves.

Setup reported to be working for custom variants by @LittleMagician

  1. Download WinBoard latest vr
  2. Install Winboard but uncheck all boxes except xiangqi so that unnecessary engines aren't installed.
  3. Download the engine stockfish-windows-amd64.exe and also download variants.ini
  4. Move your downloaded engine and variants.ini to the folder containing winboard.exe located at This PC C:\WinBoard-4.8.0\WinBoard
  5. Open variants.ini and add the variants you wish from https://github.com/ianfab/Fairy-Stockfish/wiki/Variant-configuration by copying and pasting the code into the variants.ini notepad.
  6. Now Open Winboard.exe and click ok at start up.
  7. Under Engine go to Edit Engine List then copy and paste this line: "engine name" -fcp "stockfish-windows-amd64.exe"
  8. For working variants paste the following line: "variant name" -fcp "stockfish-windows-amd64.exe load variants.ini" /variant=indiangreat
  • Indian Great is the only variant that currently works with the line you copied from step 8 and for indian great to work * legality must be unchecked at all times.
  • Because Legality isn't ckecked you're able to make illegal moves but if you do the engine will stop working and won't reply to your move. If you make an illegal move accidentally you'll have to restart the game by clicking New Game.
  1. To play a different custom variant on Edit Engine List just copy and paste the following line: "Myvariants" -fcp "stockfish-windows-amd64.exe load variants.ini"
  2. Next under Engine load MYvariants.
  3. Go to Options then General and uncheck Test Legality.
  4. To access the variants from your variants.ini file go to Engine #1 Settings and on the drop down of UCI_Variant select the variant you wish to play.
  5. Once loaded you must enable Test Legality again since it was unchecked so that the variant could be loaded correctly.

Cutechess

Cutechess supports almost all of the built-in variants supported by Fairy-Stockfish, except for Shogi variants. It is very well suited for playing games (engine/human), but analysis functionality is very limited.

Engines can be added via "Tools>Settings". Select the "Engines" tab, click on "+" and select the engine executable via the "Browse" dialog.

PyChess

PyChess also supports some of the variants, including Crazyhouse, Losers, Giveaway, Three-check, King of the Hill, ASEAN, Makruk, and Sittuyin.

Shogi GUIs (USI-compatible)

Fairy-Stockfish can be used in gShogi and other USI compatible GUIs to play Shogi by adding it as a USI engine. In case of problems make sure in the engine configuration that the options Protocol and UCI_Variant are set to their defaults for the USI protocol, namely usi and shogi, respectively, and that you downloaded the large-board version (fairy-stockfish-largeboard...).

Xiangqi GUIs (UCCI-compatible)

Fairy-Stockfish can be used in Xiangqi GUIs by adding it as a UCCI engine. In case of problems make sure in the engine configuration that the options Protocol and UCI_Variant are set to their defaults for the UCCI protocol, namely ucci and xiangqi, respectively, and that you downloaded the large-board version (fairy-stockfish-largeboard...).

CLI & API

Command line

Fairy-Stockfish supports the UCI, UCCI, USI, and CECP/XBoard protocol. 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.

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.

Python wrapper

A python wrapper is maintained at https://github.com/gbtami/Fairy-Stockfish.