Fairy-Max – a program that plays chess and chess variants. It uses the xboard/winboard chess-engine protocol to communicate. Apart from ‘regular’ chess (also known as the Mad-Queen variant), it can play Capablanca chess, gothic chess, janus chess, knightmate, cylinder chess, berolina chess, superchess, makruk (Thai chess, and also some of its variants, Cambodian chess (Ouk), asean chess and ai-wok), courier chess, Seirawan chess, Spartan chess, falcon chess, great shatranj, team-mate chess, charge of the light brigade, king of the hill, bifurcator chess, Los-Alamos chess, Mexican chess, Ciccolini’s chess, grande acedrex, wildebeest chess (almost), shuffle chess without castling and chess with different armies (all combinations of the FIDE, Clobberers, Nutters and Rookies armies). Fairy-Max can be easily configured by the user to play other variants as well, by modifying the ini file. This ini file describes the rules of movement of the participating pieces and the initial board setup.
Fairy-Max can also play shatranj, but in this case is not aware of the shatranj rule that a bare king loses. So it might play sub-optimally in the late end-game. A version of Fairy-Max adapted to implement the baring rule (and the rule that stalemate is a win) is available under the name shamax. Grande Acedrex and Courier Chess might also have had a baring rule, so you may want to play these with shamax instead of fairymax too.
Similarly, a version of Fairy-Max adapted to play Xiang Qi (Chinese Chess) is included in the fairymax package as well, under the name maxqi.
fairymax is a derivative of the world’s (once) smallest chess program (source-code wise), micro-Max. The latter measures less that 2000 characters, (about 100 code lines), and has a computer rating of around 2050 on the CCRL rating list. Although this is about 1000 rating points behind the world champion, micro-Max still makes a quite tough opponent even for club players, although it is not unbeatable.
The main difference between micro-Max and Fairy-Max is that the latter loads its move-generator tables, which specify how the various pieces move, from an external file, so it can be easily adapted to incorporate un-orthodox pieces. For ease of use of the artificial-intelligence, Fairy-Max is equipped with I/O routines that allow it to run with the xboard graphical user interface.
For some variants even the name is unknown to XBoard, and they are all grouped under the catchall name ‘fairy’. Which variant is played by Fairy-Max when XBoard is set to ‘fairy’, can be determined by a combobox control in the XBoard ‘Engine Settings’ menu dialog. This currently applies to the various army combinations of chess with different armies. After having set this Variant fairy selects option, activating XBoard’s New game menu when already in variant fairy, or selecting fairy from the New variant menu dialog will then start the selected game.
Fairymax supports multi-PV mode: by specifying a non-zero multi-PV margin in the Engine-Settings dialog of XBoard, Fairy-Max will not only print the principal variation for the best move, but also for every move that approaches the score of this best move to within the set margin. (If it does not find the best move on the first try, this might lead to printing of a few extra lines below the threshold.) Fairy-Max now also supports analysis mode, and exclusion of moves from the analysis.
The fmax.ini file from which Fairy-Max by default takes the piece and game definitions is a self-documenting text file, which contains instructions for how to define new pieces and chess variants. In addition it contains an extensive list of pre-defined pieces, including many not occurring in any of the pre-defined variants, which the user can draw on to define his own variants.
Amongst the move types supported by Fairy-Max are normal leaper and slider moves, (e.g. knight and rook), divergent moves (i.e. capture and non-capture moves can be different), hoppers (which jump over other pieces, such as the Chinese cannon or the grasshopper), lame leapers (the move of which can be blocked on squares they cannot move to, such as the Chinese horse and elephant), limited-range sliders (upto range 5), and any combination thereof, in every possible direction. The board width is configurable upto a width of 14 files, and cylindrical boards (where left and right edge connect) are supported as well. The board height can be configured up to 16 ranks.