FAIRYMAX(6)

πŸ’– FAIRYMAX(6) β€” ok bestie, sit down, we're talking about the fairy chess engine πŸ’–

So like. This is fairymax, section 6 of the manual (games, babes πŸŽ€). And it's a whole moment. Let me walk you through it.


✨ NAME ✨

fairymax β€” an xboard-compatible chess and chess-variant engine called 'Fairy-Max'. That's it. That's the name. Iconic.


🌸 SYNOPSIS 🌸

fairymax [hashSize] [iniFile]

shamax [hashSize] [iniFile]

maxqi [hashSize] [iniFile]

Three little binaries, three little vibes. Argue about it below. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so fairymax</p> is a program that plays chess and chess variants. It talks to the outside world using the xboard/winboard chess-engine protocol β€” that's how it communicates, that's the whole deal.

Besides 'regular' chess (which is also known as the Mad-Queen variant, cute), 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
  • chess with different armies (all combinations of the FIDE, Clobberers, Nutters and Rookies armies)

like?? the range?? she contains multitudes, no cap. 😭

And Fairy-Max can be easily configured by the user to play other variants too, by modifying the ini file. That ini file describes the rules of movement of the participating pieces and the initial board setup. So it's not even locked in β€” she's flexible.

okay but the shatranj tea real quick 🍡

Fairy-Max can also play shatranj, but in this case it is not aware of the shatranj rule that a bare king loses. So it might play sub-optimally in the late end-game. Not a girlboss fail, just a knowledge gap.

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. Got it? Got it.

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. Slay.

the family tree lore 🌈

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. Yes bestie, under 2000 characters. 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. Little engine that could, fr fr. πŸ”₯

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. πŸ’…

running her through xboard

See xboard(6) for instructions about how to use fairymax through xboard. To start up quickly, you just need the command:

xboard -fcp fairymax
⚠️ Note that to be able to play the chess variants, it is recommended to use the latest XBoard version, as some of the recently added variants will use features not supported by older XBoard versions (in particular allowing an engine to reconfigure XBoard's ideas on the initial setup and how the pieces move). Problems with older XBoard versions might range from only being able to play the variant with legality testing switched off, inability to display some of the unorthodox pieces in board sizes other than Bulky, Middling or Petite, not recognizing variants with non-standard names, to refusing even names that by now are standard XBoard variants. 😭 so like, update. please.

the 'fairy' catchall thing

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. 🧚

multi-PV mode era πŸ‘‘

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. she's been working on herself. πŸ’œ

the fmax.ini file

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, incuding many not occurring in any of the pre-defined variants, which the user can draw on to define his own variants. (yes, "incuding". we're keeping it exactly as written, bestie β€” never edit the source.) πŸ™ˆ

move types, the technical part (still cute tho)

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. 🌸


πŸŽ€ OPTIONS πŸŽ€

hashSize

If the first argument to fairymax is numeric, it is taken as an indicator for the amount of memory Fairy-Max is allowed to use for its internal hash table. The default value for this argument, 22, would result in a memory usage of 48MB. Each next-higher number doubles the memory usage, each next-lower halves it.

πŸ’€ Running with less than 6MB (i.e. argument 19) is not recommended. Don't do it. Respect the girl's memory needs.

When fairymax is running under xboard 4.3.15 or later the hash-table size can be set through the xboard menus, making this argument superfluous. So like, you can skip it if you're on modern xboard. ✨

iniFile

A second or non-numeric first argument is taken as a filename. Fairy-Max will use the mentioned file in stead of its default fmax.ini file to define the movement of pieces and initial setup of the variants. This makes it easier to define your own variants. πŸ¦‹ (again: "in stead". keeping it. don't come for me.)

INTERACTIVE OPTIONS

Fairy-Max also supports some options that can only be set interactively, though XBoard's engine settings menu dialog. These include:

  • a setting to further define -variant fairy, (e.g. which armies to pit against each other in chess with different armies)
  • whether makruk is to be played with Thai or Cambodian rules (the latter requiring XBoard's legality testing to be switched off!)
  • enable resigning, and set a score threshold for when Fairy-Max should do it
  • define the already mentioned multi-PV margin

An 'Info' button in the settings dialog makes XBoard pop up a window with some info about the currently selected variant. πŸ’–

Persistent hash

Some of the interactive options can be used to store the current position in a file bearing the name of the variant being played, with the extension .hash added to it, during analysis. Positions in that file will be loaded into Fairy-Max' hash table before every game, protected from overwrite. This can be used to create an opening or end-game book for the variant.

The Save in hash file button is convenient for saving the occasional position. For saving many positions in a row the option Automatic pesistent-hash dialog can be ticked. (yes, "pesistent-hash". it's literally spelled that way. we do not fix. πŸ™ˆ) This pops up a dialog at the start of every analysis search, in which the user then just has to press 'OK' to put the score from the analysis into the hash file. If a number is typed in that dialog before pressing 'OK', the position will be saved with that score (in centi-Pawn) rather than the score determined by the engine's own analysis. This can for instance be used to discourage opening lines the engine overrates.

The file will be created in the current directory, but at the start of a game both this file, as well as one in Fairy-Max' private data files, will be loaded. The install does contain such a persistent hash file for makruk, to help Fairy-Max find the checkmate in the 'difficult' corners of the KMMMK and KNMMK (with like M) end-games. πŸ‘‘


⭐ AVAILABILITY ⭐

At http://hgm.nubati.net/cgi-bin/gitweb.cgi the source code can be obtained. go get her. πŸ’…


🌈 SEE ALSO 🌈


πŸ’œ STANDARDS πŸ’œ

WinBoard, xboard(6) interface ("Chess Engine Communication Protocol"). she follows the rules, periodt.


πŸ’– AUTHOR πŸ’–

H.G.Muller <h.g.muller@hccnet.nl>.

This manual page was generated with pod2man(1). (automated queen behavior ✨)


okay bestie that's the whole page, every last flag, file, number and spelling preserved exactly, because that's the one rule that matters most. 🫢

perl v5.40.1, dated 2026-01-20, filed under FAIRYMAX(6) β€” mwah, love you, go play some gothic chess πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from