-
-
Notifications
You must be signed in to change notification settings - Fork 202
Variant configuration
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.
You can either provide the configuration file at startup, e.g., stockfish.exe load variants.ini
/./stockfish load variants.ini
(Windows/Unix), or you can load it at runtime by setting the VariantPath
UCI option to the path of your configuration file. For usage in GUIs the former option is recommended, because variants need to be known to the GUI at engine startup.
In order to validate your variants.ini, run stockfish.exe check variants.ini
/./stockfish check variants.ini
on the command line, which should point you to potentially problematic parts of your configuration.
If you want to test your variant in a GUI, you can use FairyFishGUI, which can also load variants.ini files.
This is a collection of user-defined variant configurations that can be copied into a variants.ini. See the default variants.ini for more examples. Feel free to add sections for variants you configured in order to share them with other users (just click on edit at the top).
https://yawnoc.github.io/crowded-xiangqi
# Chinese Chess on half the board (5 × 9 intersections)
# Pawns (soldiers) are set to display as archbishops (via pieceToCharTable)
# so that WinBoard/XBoard won't disappear them on the last rank.
# https://github.com/ianfab/Fairy-Stockfish/issues/180#issuecomment-692910150
[crowdedxiangqi:xiangqi]
pieceToCharTable = .N.R.ABP.K.C...........n.r.abp.k.c..........
maxRank = 5
startFen = rnbakabnr/pcp1p1pcp/9/PCP1P1PCP/RNBAKABNR w - - 0 1
mobilityRegionBlackKing = d3 e3 f3 d4 e4 f4 d5 e5 f5
mobilityRegionBlackFers = d3 e3 f3 d4 e4 f4 d5 e5 f5
mobilityRegionBlackElephant = *1 *2 *3 *4 *5
soldierPromotionRank = 4
https://en.wikipedia.org/wiki/Dragonfly_(chess_variant)
# Two rules have been removed from the original definition (Removing captured pawns and special pawn promotion)
# Credits to Procyon for the definition
[dragonfly:chess]
maxFile = 7
maxRank = 7
pocketSize = 7
castlingKingsideFile = f
castlingQueensideFile = b
pieceDrops = true
capturesToHand = true
promotionRank = 7
promotionPieceTypes = nbr
doubleStep = false
dropNoDoubled = p
dropNoDoubledCount = 0
startFen = rbbknnr/ppppppp/7/7/7/PPPPPPP/RBBKNNR[] w - - 0 1
# The objective of the game is to lose both rooks
# Credits to Procyon for the definition
[kamikazerooks:chess]
extinctionValue = win
extinctionPieceTypes = r
# Win by campmate. No checks allowed
# Credits to Procyon for the definition
[racingchess:chess]
flagPiece = k
whiteFlag = *8
blackFlag = *1
flagMove = true
checking = false
https://vchess.club/#/variants/Doublearmy
# Same as chess, but both armies are doubled. The second King is a Commoner.
[doublearmy:chess]
pieceToCharTable = PNBRQ.....C...........Kpnbrq.....c...........k
commoner = c
startFen = rnbqkbnr/pppppppp/rnbqcbnr/pppppppp/PPPPPPPP/RNBQCBNR/PPPPPPPP/RNBQKBNR w KQkq - 0 1
# Same as chess, but captures are mandatory.
[capture:chess]
mustCapture = true
https://www.pychess.org/variants/gorogoroplus
[gorogoroplus:gorogoro]
startFen = sgkgs/5/1ppp1/1PPP1/5/SGKGS[LNln] w 0 1
lance = l
shogiKnight = n
promotedPieceType = l:g n:g