lichess.org
Donate

Working with Chess Variant Engines

Chess engineAnalysisSoftware DevelopmentChess variant
An introduction to the wonderful and fascinating world of chess variant engines

Introduction

I have written on a couple engines so far, so here's a post on GUIs to work with these engines in! This post will be heavily focused on engines that provide support for chess variants, but if you're looking to get into standard engines, you may find some useful tips in here as any GUI which supports chess variants will of course support standard chess. Now you may be asking yourself, why would you want GUIs to run engines in; isn't the Lichess analysis page enough? The short answer is no, the Lichess analysis page is not enough. As far as engines go, you are limited to one, which is whatever Stockfish version Lichess is hosting at the moment. This engine will run slower on Lichess than it would run locally, and on top of this you can't configure the engine. So, long story short, if you want to run an engine other than the one hosted on Lichess, configure any engine exactly as you want, or simply improve performance, you will need a GUI.

Useful GUIs

Since we are going to be focusing on programs which are compatible with chess variant engines, our options are already limited. On top of our options being limited by the number of programs existing, some of them are quite old, and others are just downright tilting to work with.

Winboard

Winboard has been the go to for engine analysis in variants for many years. It is widely compatible with variants, and with Winboard you can analyze any variant the engine you loaded plays. On top of this, Winboard comes with 33 variants which you can analyze without having an engine loaded. At this point you may be asking why any other program would ever be wanted, and the answer to that is that Winboard is very old and is showing its age. It can be clunky at times, and its GUI is not the best at all. However, if you need a GUI to analyze that random, unknown variant you found, Winboard is probably what you're looking for. Winboard can both analyze moves manually and run engine vs human or engine vs engine matches.

  • You can get Winboard from its website; however, some users may run into trouble with some of the releases there.

LiGround

LiGround is a GUI which can be expected to dominate the scene for variants analysis in a few years. It has by far the most user friendly GUI which looks quite sharp and displays the useful information (see image)

liground screen
Analyzing with LiGround

So, why hasn't everyone switched to LiGround yet? Well, it's a work in progress that's relatively new. Until the last release, you couldn't switch engines, but now you can load custom engines. Stockfish engines seem to work just fine, but I have run into issues using LiGround with CrazyAra engines; it just bugs out sometimes. It should also be noted that the import PGN feature doesn't work yet for variants. Despite it being a work in progress and still in its early stages, LiGround has already received considerable attention, and once more bugs are fixed, it will be extremely popular.

Cutechess

Cutechess is the go to for engine vs engine games. It comes with both a GUI and a CLI, and you may run a very wide variety of engine tournaments with either; however, some people prefer the CLI since you can run multiple games at once. The downside to the CLI is that you cannot see the games being played, so if you want to see the games being played, you should use the GUI. The GUI is fairly easy to navigate, and tournaments are relatively easy to start. You may even set default parameters for tournaments and games in the settings, which is very useful when you are going to run many engine matches over time and want the results to be comparable.

Running Engine vs Engine Matches

Since analyzing moves with an engine in a GUI seems very self explanatory to me, I am going to skip that and go straight to engine vs engine matches. Running engine vs engine matches have some interesting aspects which the average user is definitely not going to be familiar with.

Cutechess screenshot
Setting up an engine vs engine match with Cutechess

Opening Books

Opening books are necessary to diversify the positions and prevent the engines from playing the same lines over and over again. Diversified positions lead to much better results on which engine is stronger, which is often times the goal of engine vs engine matches. Opening books come in a few file formats. These include PGN, BIN, and EPD. PGN opening books are just many games in a single PGN file which will be randomly chosen and the moves played out, and polyglot opening books (BIN file format) also play a sequence of moves from the starting position. It should be noted that polyglot opening books can be tricky in variants as most software that prepares polyglot opening books runs into issues in variants due to the variant rules resulting in moves which would be illegal in standard chess. EPD opening books consist of FEN strings from which an FEN will be chosen and used as the starting position for each game. Note: often times engine vs engine matches will be configured to play the same opening twice so each engine gets to play the same starting position once as white and black; this can further reduce undesired effects on testing strength.

There is no large collection of PGN or polyglot opening books readily available for chess variants, but there is a large collection of EPD opening books available.

Opening Book Links

Ordo

Engine vs engine matches are often done to find out how strong the engines are. This creates a demand for a way to measure strength. Turns out, there's a convenient program that is widely used in engine testing, and it is convenient for everyone to use the same measurement system. Enter Ordo! When you run Ordo, it will calculate the Elo difference between the engines as well as white's advantage; both are very useful in variant engine vs engine testing. After downloading Ordo and unpacking it, your folder should look something like this

Ordo folder
Ordo folder's contents

Now, you will have to open ordo_example.bat and edit it to set your settings (left clicking this file won't open an editor; right click on it and then click edit. I will include my settings in a pastebin down below which you may use as an example (or just copy paste and edit as needed if you like). However, it should be noted that each time you want to calculate new elo differences, you will have to open rating.txt and delete the current contents. To run the program, you do not open ordo-win64; you simply left click ordo_example.bat.

Ordo Links

Getting Involved

If you made it this far, I will assume your inner nerd liked reading about working with chess engines. Turns out, you're not the only one! The Fairy-Stockfish discord server is a community which is very into all things chess variant engine, so that would be a nice place to start if you're looking to meet like minded people. This discord server also contains many resources for you to further dive into.