fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
603 stars 189 forks source link

How to play with the CLI version in Fairy Stockfish #601

Closed ARNAV69420 closed 1 year ago

ARNAV69420 commented 1 year ago
arnav@arnav-IdeaPad-Gaming-3-15ARH05:~/Fairy-Stockfish-master/src$ ./stockfish load variants.ini
Fairy-Stockfish 210323 LB by Fabian Fichter
ucci
id name Fairy-Stockfish 210323 LB
id author Fabian Fichter

option Debug_Log_File type string default 
option Threads type spin default 1 min 1 max 512
option hashsize type spin default 16 min 1 max 33554432
option Clear_Hash type button
option Ponder type check default false
option MultiPV type spin default 1 min 1 max 500
option Skill_Level type spin default 20 min -20 max 20
option Move_Overhead type spin default 10 min 0 max 5000
option Slow_Mover type spin default 100 min 10 max 1000
option nodestime type spin default 0 min 0 max 10000
option UCI_Chess960 type check default false
option UCI_Variant type combo default xiangqi var 3check var 3check-crazyhouse var 4x5chess var 4x6chess var 5check var 5x6chess var 6x6atom var active var advancedpawn var ai-wok var almost var amazon var amazons var anti-losalamos var antichess var armageddon var asean var ataxx var atomic var atomic-giveaway var atomic-giveaway-hill var breakthrough var breakthrough5 var breakthrough6 var breakthrough7 var bughouse var cambodian var capablanca var capahouse var caparandom var capture var captureall var centaur var centaurking var cfour var chancellor var chaturanga var chess var chessGC var chessgi var chigorin var clobber var clobber10 var codrus var coffeehouse var coregal var cornerrook var courier var crazyhouse var crossing var diana var dobutsu var doublearmy var dragon var duck var embassy var empire var euroshogi var extinction var fairy var fischerandom var flipello var flipello10 var flipello6 var flipersi var gardner var gemini var giveaway var gorogoro var gothhouse var gothic var grand var grandhouse var grasshopper var gustav3 var hoppelpoppel var horde var indiangreat var isolation var isolation7x7 var janggi var janggicasual var janggihouse var janggimodern var janggitraditional var janus var jesonmor var joust var judkins var karouk var kinglet var kingofthehill var knightmate var koedem var kyotoshogi var loop var losalamos var losers var maharajah var maharajah2 var makhouse var makpong var makruk var manchu var mansindam var micro var microchess var mini var minishogi var minixiangqi var modern var newzealand var nightrider var nocastle var nocheckatomic var normal var okisakishogi var omicron var opulent var orda var ordamirror var pandemonium var paradigm var pawnsmassacre var pawnsonly var peasant var placement var pocketknight var raazuvaa var racingkings var screen var seirawan var semitorpedo var shako var shatar var shatranj var shinobi var shogi var shogun var shoshogi var shouse var sittuyin var snailtrail var suicide var supply var synochess var tencubed var threekings var tictactoe var torishogi var upsidedown var weak var wildebeest var xiangqi var xiangqihouse var yarishogi
option UCI_AnalyseMode type check default false
option UCI_LimitStrength type check default false
option UCI_Elo type spin default 1350 min 500 max 2850
option UCI_ShowWDL type check default false
option SyzygyPath type string default <empty>
option SyzygyProbeDepth type spin default 1 min 1 max 100
option Syzygy50MoveRule type check default true
option SyzygyProbeLimit type spin default 7 min 0 max 7
option Use_NNUE type check default true
option EvalFile type string default <empty>
option TsumeMode type check default false
option VariantPath type string default <empty>
option usemillisec type check default true
ucciok

So, I want to run one of the variants (which is listed here). Can someone help how to run this in the command line? Like I want to do something, where it can have a start colour like it can be black or white. Then I feed moves accordingly. Is this possible?

ianfab commented 1 year ago

See https://github.com/fairy-stockfish/Fairy-Stockfish/wiki/Command-line. Only the CECP protocol is practicable for manual human usage, so you can have a look at the example in that section.

ARNAV69420 commented 1 year ago

I implemented one of the variants as follows:

[chessGC:chess]
pawn = p:mfFcfW
startFen = rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 3+3 0 1
checkCounting = true

My variant needed to have pawns which move diagonally and capture forward. and there is no Castling Rules and Enpassent. Is this the right way to do it? I actually used the fairyfishgui. To load the engine and this variant file. But it played simple chess, when even the pawns can move double in the start. Is this the correct way to go about it?

ianfab commented 1 year ago

You need to remove the existing pawn piece, like pawn = - otherwise it has to guess which of the two p pieces you mean in the start FEN.

Edit: I misread. I thought you were using a custom piece. You can't override the betza notation for existing piece types.

ARNAV69420 commented 1 year ago
customPiece1 = p:mfFcfW
knight = n
bishop = b
rook = r
queen = q
king = k
promotedPieceType = p:q
promotionRank = 8
mandatoryPiecePromotion = true
castling = false
startFen = rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 3+3 0 1
checkCounting = true

I used something like this, But in this the Pawn is not promoting. Can you suggest some changes which would be the best to implement promotion for the custom piece. Also, how strong would be Fairy chess with such user defined rules. Can NNUE also be used in it?

ianfab commented 1 year ago

As mentioned, you need to reset/remove the pawn, i.e., pawn = -.

Issues in general are for bug reports and feature request. For usage questions please use either discord or github discussions.