Fairy-Max 5.0a released

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
hgm
Posts: 28326
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Fairy-Max 5.0a released

Post by hgm »

I just released a new and drastically modified version of Fairy-Max. Several new features were added, and the limits of its configurability have been greatly extended, without detectably hurting its playing strength. As a result of these new capabilities, seven new pre-configured Chess variants could be added. Not all variants will work with WinBoard 4.8.0, though: some involve initial Pawn triple pushes, and WinBoard 4.8.0 does not know you can e.p. capture the Pawns making those. This applies to Mexican Chess and Wildebeest Chess. WinBoard 4.8.0 also does not show enough engine-defined variants in its New Variant dialog that you can see these, but they would be selectable through a -variant command-line argument. All this will be cured in WinBoard 4.9.

Improvements over version 4.8V are:
  • Analyze mode is now supported, with the possibility to exclude moves from analysis. (Multi-PV was already supported.)
  • Repetition of positions from the search tree (as opposed to game history) are now also recognized, so sacrificial perpetuals can be planned for.
  • Checkmating a bare King has been improved, in particular in end-games involving color-bound pieces.
  • A persistent-hash file has been added, as well as engine-defined options to save positions in it.
  • The number of board ranks is no longer hard-coded as 8, but can be configured to any value up to 16.
  • Pawns can be configured to start on any rank.
  • Fairy-Max still only considers a single promotion choice, but in a special mode this can be the piece that started on the promotion square, and thus differ for each board file.
  • Pawns making an initial triple push on a 10-rank board can now be e.p. captured on both skipped squares.
  • It is also possible to give a Pawn a double-push from 3d rank plus a triple push from 2nd rank.
  • In castling the King can now also be configured to move 4 squares towards the Rook, instead of just 2 or 3.
  • Stalemate can be configured to be a win, rather than a draw.
  • Los-Alamos Chess (6x6 without Bishops) has been added as a pre-configured engine-defined variant.
  • Janus Chess (10x8 with two extra Archbishops) has been added as a pre-configured engine-defined variant.
  • Roman Chess (10x10 with two extra non-royal Kings) has been added as a pre-configured engine-defined variant.
  • Ciccolini's Chess (10x10 with two extra Zebras and 'Color-bound Queens' instead of Bishops) has been added as a pre-configured engine-defined variant.
  • Mexican Chess (10x10 with two extra Camels) has been added as a pre-configured engine-defined variant.
  • Wildebeest Chess (11x10 with two extra Zebras and one extra Gnu) has been added as a pre-configured engine-defined variant (well, almost).
  • Grande Acedrex (12x12 with bent sliders and range-3 leapers next to Rooks and Bishops) has been added as a pre-configured engine-defined variant.
The Windows binary can be downloaded from http://hgm.nubati.net/Fairy-Max.zip . I changed the assignment of pieces in this package to WinBoard piece images a bit from what it should really be in Fairy-Max 5.0, so that it would not use pieces not available in WinBoard 4.8.0. Source code can be found in my on-line git repository.


An example where it recognizes a perpetual as draw, so it can prefer it over capturing the hanging Rook:
8 
7 
6 
5 
4 
3 
2 
1 
abcdefgh

1kr4q/8/2p5/3p2r1/8/2P1QP2/1P2P1P1/5K2 w

Code: Select all

  9	 -0.02 	35928  	0:00.05	e3b6 b8a8 b6a6 a8b8 a6b6 
  8	 -0.02 	22381  	0:00.03	e3b6 b8a8 b6a6 a8b8 a6b6 
  7	 -0.02 	10159  	0:00.01	e3b6 b8a8 b6a6 a8b8 a6b6 
  6	 -0.02 	4041    	0:00.00	e3b6 b8a8 b6a6 a8b8 a6b6 
  5	 -0.02 	3564    	0:00.00	e3b6 b8a8 b6a6 a8b8 a6b6 
  4	 -0.02 	2876    	0:00.00	e3b6 b8a8 b6a6 a8b8 a6b6 
  4	 -2.46 	1729    	0:00.00	e3g5 h8h1 f1f2 h1a1 g5g3 
  3	 -2.21 	627      	0:00.00	e3g5 h8h1 f1f2 h1d1 
  2	 -2.24 	25        	0:00.00	e3g5 h8h7 
  1	 -2.36 	11        	0:00.00	e3g5 
An example of 'knowledgeless' bare-king mating, (which does not know beforehand in what corners checkmate is possible, but simply assumes it must be the other corner if it doesn't see a mate once it has driven a bare King into one), at 40 moves/40 sec against Stockfish that had 15x more time (and does apparently know what corner to flee to):



Some XBoard screenshots displaying the new variants:

Image
Los-Alamos Chess (aka Anti-clerical Chess)

Image
Janus Chess

Image
Roman Chess

Image
Mexican Chess

Image
Ciccolini's Chess

Image
Wildebeest Chess

Image
Grande Acedrex (historic variant from 1283AD)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Fairy-Max 5.0a released

Post by Evert »

hgm wrote:I just released a new and drastically modified version of Fairy-Max. Several new features were added, and the limits of its configurability have been greatly extended, without detectably hurting its playing strength. As a result of these new capabilities, seven new pre-configured Chess variants could be added. Not all variants will work with WinBoard 4.8.0, though: some involve initial Pawn triple pushes, and WinBoard 4.8.0 does not know you can e.p. capture the Pawns making those.
Interesting. You would need those for Omega Chess too (could it play that now?). I seem to recall that there is some other variant where this comes up, because I remember implementing this in SjaakII. Can't find it though, so maybe that was for Omega afterall.
This applies to Mexican Chess and Wildebeest Chess. WinBoard 4.8.0 also does not show enough engine-defined variants in its New Variant dialog that you can see these, but they would be selectable through a -variant command-line argument. All this will be cured in WinBoard 4.9.
Hurrah!

Congratulations on the new version; I'll update tomorrow (although I was already running a recent Git version anyway, having it identify as 5.0a will be nice).
User avatar
hgm
Posts: 28326
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 5.0a released

Post by hgm »

Evert wrote:Interesting. You would need those for Omega Chess too (could it play that now?). I seem to recall that there is some other variant where this comes up, because I remember implementing this in SjaakII. Can't find it though, so maybe that was for Omega afterall.
Yes, the development version of XBoard does that. Indeed I added that for Omega. In Fairy-Max it was also a hassle, as its search passes a single e.p.-square parameter to the daughter node. Because it was an int I could reserve some bits to indicate which bits it should ignore in the comparison between to-square and e.p.-square, and set those on triple pushes. At first I had a bug that in variants with triple pushes, when you also had a double-push from 3rd rank (as in Wildebeest Chess), it would e.p. capture the doubly pushed Pawn on its from-square!
royb
Posts: 557
Joined: Thu Mar 09, 2006 12:53 am

Re: Fairy-Max 5.0a released

Post by royb »

Is there a Linux binary or Linux source that I might compile to produce a binary?

Thanks!
User avatar
hgm
Posts: 28326
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 5.0a released

Post by hgm »

Yes there is, and in the first post I already gave a link to the source repository. (But I messed up the /url tag, so it did not display properly.) The sorce repository is at

http://hgm.nubati.net/cgi-bin/gitweb.cgi

Just go to the fairymax section there and click 'snapshot' behind the latest commit. This will download a tar ball. The source tree includes a Linux Makefile. So you can build it by

make
sudo make install

It should compile it with just 2x two warnings (on ignoring the return result of fscanf). It will even install .eng files and a logo according to the plugin standard, so that GUIs can automatically use it.
Max
Posts: 247
Joined: Tue Apr 13, 2010 10:41 am

Re: Fairy-Max 5.0a released

Post by Max »

hgm wrote:[*] Analyze mode is now supported, with the possibility to exclude moves from analysis. (Multi-PV was already supported.)
Get some inconsistent results in analyze mode with my mac compile (gcc -O2 fairymax.c -o fairymax).

$ ./fairymax
tellics say Fairy-Max 5.0a
tellics say by H.G. Muller
new
post
analyze
..
quit

1st run

Code: Select all

 1     -5        0          7 a2a4
 1     -3        0          9 a2a3
 1     14        0         11 b2b4
 1     27        0         13 d2d4
 2     15        0         27 d2d4 d7d5
 3      7        0        360 d2d4 d7d5 b1c3
 3     10        0        685 g2g4 d7d5 f2f3
 3     19        0        872 h2h3 c7c5 c2c4
 3     23        0       1021 b1c3 c7c5 d2d4
 4      1        0       1919 b1c3 d7d5 d2d4 b8c6
 4      3        0       5565 c2c3 d7d5 d2d4 b8c6
 5     -3        1       7563 c2c3 d7d5 d2d4 b8c6 c1f4
 5      5        1      13354 c2c4 d7d5 c4d5 d8d5 d2d4
 5     25        3      24012 d2d4 d7d5 c1f4 b8c6 b1c3
 6     14        5      40865 d2d4 d7d5 c1f4 b8c6 b1c3 c8f5
 7      7       19     172279 d2d4 d7d5 c1f4 b8c6 b1c3 c8f5 g1f3
 7      9       40     362426 d2d3 d7d5 c1e3 b8c6 b1d2 c8f5 c2c4
 7     14       57     525383 f2f4 d7d5 b1c3 b8c6 g1f3 c8f5 a2a4
 7     17       81     741251 c2c4 g8f6 d2d3 d7d5 b1d2 b8c6 g1f3
 8     -8      104     955322 c2c4 g8f6 b1c3 d7d5 d2d3
 8     11      150    1369561 d2d4 d7d5 c1f4 b8c6 b1c3 c8f5 g1f3 g8f6
 8     12      246    2258567 g1f3 d7d5 b1c3 b8c6 d2d4 c8e6 c1f4
 9     -1      385    3527969 g1f3 d7d5 c2c3 b8c6 d2d4 c8f5 c1f4 g8f6 b1d2
 9     16      722    6571044 g1h3 d7d5 c2c3 c7c5 d2d4 b8d7 c1f4 d8b6 d1d2
2nd run

Code: Select all

 1      9        0          7 a2a4
 1     11        0          9 a2a3
 1     16        0         11 b2b4
 1     19        0         13 c2c4
 1     21        0         15 e2e4
 1     27        0         17 g1f3
 2      7        0         25 g1f3 c7c5
 2     13        0         53 c2c4 c7c5
 3      2        0        366 c2c4 d7d5 b2b3
 3     26        0        626 c2c3 c7c5 d2d4
 4      5        0       1309 c2c3 d7d5 d2d4 b8c6
 4      6        0       2964 f2f4 d7d5 b1c3 c7c5
 5     19        1      12326 f2f4 d7d5 b1c3 c7c5 g1f3
 5     23        3      25831 c2c3 d7d5 d2d4 b8c6 c1f4
 6    -14        4      34695 c2c3 d7d5 d2d4 b8c6 c1f4 c8f5
 6      5       11      99657 c2c4 d7d6 f2f4 c8f5 b1c3 c7c5
 7     27       41     375022 c2c4 g8f6 d2d3 d7d5 b1d2 b8c6 g1f3
 8    -13       73     673543 c2c4 c7c5 d2d3 d7d6 b1c3 b8c6 c1f4 c8f5
 8     14      111    1025392 c2c3 d7d5 d2d4 b8c6 c1f4 c8f5 b1d2 g8f6
 9      9      237    2156528 c2c3 d7d5 d2d4 b8c6 c1f4 c8f5 b1d2 g8f6 g1f3
 9     18      395    3600684 c2c4 c7c5 d2d3 b8c6 c1d2 d7d5 b1c3 g8f6 g1f3
3rd run

Code: Select all

 1      3        0          7 a2a4
 1      9        0          9 a2a3
 1     17        0         11 b2b4
 1     20        0         13 c2c3
 1     21        0         15 b1c3
 2     10        0         23 b1c3 c7c5
 2     13        0         84 d2d3 c7c5
 3     22        0        358 d2d3 c7c5 c2c4
 3     24        0        518 b1c3 c7c5 d2d4
 4      4        0       1418 b1c3 d7d5 d2d4 b8c6
 4      6        0       3725 c2c3 d7d5 d2d4 b8c6
 5      7        1       7231 c2c3 d7d5 d2d4 b8c6 c1f4
 5     13        2      14978 c2c4 d7d5 c4d5 d8d5 d2d4
 5     27        3      27410 d2d4 d7d5 b1c3 b8c6 c1f4
 6      2        5      40503 d2d4 d7d5 b1c3 b8c6 c1f4 c8f5
 6      6       18     161190 c2c4 d7d6 d2d4 b8c6 b1c3 c8f5
 7     17       40     357013 c2c4 g8f6 d2d3 d7d5 b1d2 b8c6 g1f3
 7     20       53     476418 c2c3 d7d5 d2d4 b8c6 c1f4 c8f5 b1d2
 8    -12       79     716387 c2c3 d7d5 d2d4 b8c6 c1f4 c8f5 b1d2 g8f6
 8     11      113    1039275 c2c4 c7c5 d2d3 d7d6 b1c3 c8f5 c1f4 b8c6
 9      5      368    3320891 c2c4 c7c5 d2d3 d7d6 b1c3 b8c6 c1f4 c8f5
 9     24      884    7918179 d2d4 b8c6 g1f3 g8f6 c2c3 d7d6 c1f4 f6d5 f4g5
Is that expected?
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk
User avatar
hgm
Posts: 28326
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 5.0a released

Post by hgm »

I guess it is, as Fairy-Max randomizes during the first six half-moves of a game. On later moves it should be 100% reproducible.

Perhaps the randomization should be switched off during analysis? It is poorly implemented anyway, as it also does not react to the CECP command "random".
Max
Posts: 247
Joined: Tue Apr 13, 2010 10:41 am

Re: Fairy-Max 5.0a released

Post by Max »

hgm wrote:Perhaps the randomization should be switched off during analysis?
Yepp, I vote for this :)
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk
User avatar
hgm
Posts: 28326
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 5.0a released

Post by hgm »

OK, I did that (in the source repository). I also made the randomization subject to the CECP 'random' command now.

In fact I have already found (and fixed) 3 other imperfections since the release: it was not using the CECP standard for printing mate scores, doing 'undo' messed up the game history to the extent where it would think the undone move would lead to a rep-draw, and it would spontaneously drop out of analyze mode when analyzing a position where it was checkmated, so that when you backed up from there, it would not start analyzing again.

I guess I should make a bug-fix release pretty soon...
Daniel Anulliero
Posts: 769
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: Fairy-Max 5.0a released

Post by Daniel Anulliero »

Hg , can you put the link of your "bare king vs Nbk ?
Great thanks !

Congratulations for you 5.0 release 😊