Everything you need to know about Fairy-Stockfish

Sort:
NobuKenko

I. What is Fairy-Stockfish?

Fairy-Stockfish is a chess variant engine derived from Stockfish designed for the support of fairy chess variants and easy extensibility with more games. It can play various regional, historical, and modern chess variants as well as games with user-defined rules.

The goal of Fairy-Stockfish is to create an engine supporting a large variety of chess-like games, equipped with the powerful search of Stockfish.

In Chess.com, Custom Games Admins (CGAs) often use Fairy-Stockfish to evaluate 2-player New Custom Variants (NCVs).

II. How to use Fairy-Stockfish

You can play it online on https://fairyground.vercel.app. For analysis purpose, use it online on https://fairyground.vercel.app/advanced.html.

To analyze a custom position, first import that custom position's .ini file. If you don't have one, create it yourself.

1. How to create .ini file

.ini files are required elements to be able to analyze custom positions. .ini files are composed of 2 parts: Variant name, and Rule configurations

a) Variant name

Variant name is specified as a section in square brackets, followed by its rule configurations.

Eg: [Minihouse], [Rookmate], ...

b) Rule configurations

Rule configurations are the most important element in a .ini file. It is a set of rule definition and additional options, and can be divided into 3 parts:

  • Board and pieces: set the number of files (maxFile), ranks (maxRank), mapping of piece characters to images (pieceToCharTable), pieces' movement.
  • Rules definition options: the main part of Rule configurations, including promotions, dropping, explosion on capture, double step, triple step, en peasant, castling, check allowance, giveaway, enclosure, walls, gating, passing, stalemate rules, n-move rules, King of the Hill, etc.
  • Setup: set the starting position (startFen)

You can use almost anything to create .ini files, as long as the files are in .ini type. I normally use Replit to create .ini files myself.

Eg: Some of my .ini files (find it inside these 2 links)

https://replit.com/@chessfan725/Python#main.py

https://replit.com/@CheLiu4/Variants#main.py

Learn more at: https://github.com/fairy-stockfish/Fairy-Stockfish/blob/master/src/variants.ini

After importing custom position's .ini file, choose your position from VARIANT. To analyze the position, tick the box at the left of Analyse, then click Go.

2. Evaluation results

Evaluation results of a position is the line of result after Fairy-Stockfish analyzed that position. It is composed of many parts, but these 3 are important to know:

  • Depth: the depth number that Fairy-Stockfish analyzed. The more the number, the better.
  • Score: the evaluation score, using centipawn as a unit. Note that if the score is positive, that means the player that is having the move has an advantage.
  • Pv: the sequence of best moves in the position, the more the depth, the more accurate the sequence.

Learn more at: https://www.chessprogramming.org/Depth, https://www.chessprogramming.org/Score, and https://www.chessprogramming.org/Principal_Variation


Now that's everything you need to know about Fairy-Stockfish. Learn more at: https://fairy-stockfish.github.io/ and https://www.chessprogramming.org

Thanks for reading.

ChessMasterGS

Temporarily pinning for a few days since this has been a popular topic on variants.world recently!

NobuKenko

Now everything is set.

xxPlayer1014xx

Is it possible to make an INI file with Word? If so, how do I do it?

NobuKenko
BFDICHESS wrote:

Is it possible to make an INI file with Word? If so, how do I do it?

After some non-serious research, I found that Microsoft Word doesn't use .ini files. But you can use Notepad to open and edit it.

xxPlayer1014xx

I still don't understand how to make a .ini file, so can you please help me evaluate 'Rowchess'?

Lucas1009991

i have a question: what is this option for and how to use it?

NobuKenko
Lucas1009991 wrote:

i have a question: what is this option for and how to use it?

It is an option to upload a set of .svg images to define pieces' graphics. Those .svg images must have a name form of [colour][+][notation].svg. It doesn't required to analyze the position, because there's already a default set.

Lucas1009991
NobuKenko wrote:
Lucas1009991 wrote:

i have a question: what is this option for and how to use it?

It is an option to upload a set of .svg images to define pieces' graphics. Those .svg images must have a name form of [colour][+][notation].svg. It doesn't required to analyze the position, because there's already a default set.

Okay, thank you

ChastityWhiteRose

Is Fairy-Stockfish capable of doing all the chess variants available on chess.com including duck chess and fog of war or is something different used to implement those on this site?

ChessMasterGS
ChastityWhiteRose wrote:

Is Fairy-Stockfish capable of doing all the chess variants available on chess.com including duck chess and fog of war or is something different used to implement those on this site?

Fairy Stockfish can't play Fog of War, afaik. I wouldn't consider it the most practical anyway since Fog of War is basically just a variation on capture the king, when you really boil it down.

As for Duck Chess, Fairy Stockfish does handle it, and it should theoretically work fairly well.

Lucas1009991

Also, you can’t make these pieces on fairy stockfish:

alfil-rider

dabbaba-rider

alibaba-rider

and the biggest board size possible for fairy stockfish is 12 files and 10 ranks

Algy9000

If I use Edit position and Edit rules on Chess.com, how do I import it into Fairy Stockfish? Is it possible to take the information generated in Edit Position such as

R-0,1,0,1-0,1,0,1-0,1,0,1-0,0,0,0-0-{'pawnBaseRank':4,'wb':true,'dim':'8x8'}-
x,x,x,x,x,x,x,x,x,x,x,x,x,x/
x,x,x,x,x,x,x,x,x,x,x,x,x,x/
x,x,x,x,x,x,x,x,x,x,x,x,x,x/
x,x,x,yR,yN,yI,yK,yF,yI,yN,yR,x,x,x/
x,x,x,yP,yP,yP,yP,yP,yP,yP,yP,x,x,x/
x,x,x,8,x,x,x/
x,x,x,8,x,x,x/
x,x,x,8,x,x,x/
x,x,x,8,x,x,x/
x,x,x,rP,rP,rP,rP,rP,rP,rP,rP,x,x,x/
x,x,x,rR,rN,rI,rK,rF,rI,rN,rR,x,x,x/
x,x,x,x,x,x,x,x,x,x,x,x,x,x/
x,x,x,x,x,x,x,x,x,x,x,x,x,x/
x,x,x,x,x,x,x,x,x,x,x,x,x,x

and import it directly into Fairy Stockfish? Or does it have to be converted to some other format?

KingsSacrificingGotta

pin this again

JolePrime

can someone teach me how i can make promotion that works like shogi (aka difrent peices can promote to other difrent peices), im tryna make a big shogi variant btw
(also how do i have a option that lets me make it so peices promote when they capture a peice)
(also i need big help with making a peice be able to be a king in the checkmate department fr)

VishTheFish771

1. Not possible
2. Also not possible
3. Not sure what this means

KingsSacrificingGotta

3.royal non-king

wolyn

@JolePrime
promotedPieceType = s:g p:q
piecePromotionOnCapture = true
mobilityRegionWhiteKing = d1 d2 e1 e2