layout | title | permalink |
---|---|---|
page |
Variants |
/variants/ |
Fairy-Stockfish has a large variety of variants already built in and can be extended further using a variant configuration file.
- Xiangqi, Manchu, Minixiangqi, Supply chess
- Shogi, Shogi variants
- Janggi
- Makruk, ASEAN, Makpong, Ai-Wok
- Ouk Chatrang, Kar Ouk
- Sittuyin
- Shatar, Jeson Mor
- Shatranj, Courier
- Capablanca, Janus, Modern, Chancellor, Embassy, Gothic, Capablanca random chess
- Grand, Shako, Centaur, Tencubed, Opulent
- Chess960, Placement/Pre-Chess
- Crazyhouse, Loop, Chessgi, Pocket Knight, Capablanca-Crazyhouse
- Bughouse, Koedem
- Seirawan, Seirawan-Crazyhouse
- Amazon, Chigorin, Almost chess
- Hoppel-Poppel, New Zealand
- Antichess, Giveaway, Suicide, Losers, Codrus
- Extinction, Kinglet, Three Kings, Coregal
- King of the Hill, Racing Kings
- Three-check, Five-check
- Los Alamos, Gardner's Minichess
- Atomic
- Horde, Maharajah and the Sepoys
- Knightmate, Nightrider, Grasshopper
- Minishogi, EuroShogi, Judkins shogi
- Kyoto shogi, Microshogi
- Dobutsu shogi, Goro goro shogi
- Tori shogi
- Yari shogi
- Okisaki shogi
- Sho shogi
User-defined variants can be added via an INI-style configuration file and be loaded at runtime without needing to recompile the program. See the variants.ini in the repository for documentation and examples of variant configuration.
Let's say we want to replace the bishops in chess with knight+bishop compound pieces, also referred to as archbishops. The configuration could look as follows:
# we name our variant "testvariant" and let it inherit all the rules from chess
[ourtestvariant:chess]
# now we add the archbishop and assign it "a" as an abbreviation
archbishop = a
# since bishops are obsolete now, we remove them. This isn't strictly required, but recommended.
bishop = -
# we also need to update the promotion rules accordingly
promotionPieceTypes = nrqa
# and now let's define the new starting position
startFen = rnaqkanr/pppppppp/8/8/8/8/PPPPPPPP/RNAQKANR w KQkq - 0 1
And that's already it. We can now e.g. go to the Fairy-Stockfish playground to test it directly in the browser. Just paste the above configuration to a file and load that file in the variants.ini
section. After selecting ourtestvariant
you should be able to play the variant against the Fairy-Stockfish or let it play against itself.