Fairy-Max 4.8_O released

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

Moderators: hgm, Rebel, chrisw

Dann Corbit
Posts: 12550
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Fairy-Max 4.8_O released

Post by Dann Corbit »

If the code is new, why is the timestamp on the file from 2010?
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Fairy-Max 4.8_O released

Post by MikeB »

code is not new, the post was from 2010. Rather than start new thread , I just used an existing one.
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 4.8_O released

Post by hgm »

Which version are you compiling? We are at 4.8V, nowadays. This version of Fairy-Max is in the OSX App bundle for XBoard compiled by Joshua Pettus, and no one ever complaint about it.
Henk
Posts: 7221
Joined: Mon May 27, 2013 10:31 am

Re: Fairy-Max 4.8_O released

Post by Henk »

Maybe Fairy-Max proofs that in principle not much chess knowledge is needed to get to ELO 2000. Don't know what maximum ELO is possible when only counting Material. Biggest problem is perhaps King Safety.
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 4.8_O released

Post by hgm »

Well, Fairy-Max is not entirely without Pawn-structure or King-safety eval. Pawn pushes are penalized if a Pawn two files left or right of the from-square is missing. Some rudimentary King-safety awareness comes from the fact that before the end-game King moves are penalized, so that it doesn't like to expose its King to checks that could force it to move. And it gets some points for keeping the Pawn directly in front of it in place. (Or rather, moves with that Pawn get penalized.)
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Fairy-Max 4.8_O released

Post by MikeB »

hgm wrote:Which version are you compiling? We are at 4.8V, nowadays. This version of Fairy-Max is in the OSX App bundle for XBoard compiled by Joshua Pettus, and no one ever complaint about it.
Where's the latest source? Also - I was able to compile micro max for the Mac and that does castle - is micro max stronger than fairy max ? I think it is - but I was looking this last night - was just focusing on getting it to compile. Also where is the latest source for micro max. Micro max "sees" almost 2m nps on machine - that was with just basic optimizations. Exe size is 19kb - so may be the strongest engine (ELO)per byte. Nice programming !
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 4.8_O released

Post by hgm »

I think that PikoSzachy has an executable size of only 8.5KB and is some 500 Elo stronger than micro-Max. But it uses an executable compressor. Micro-Max was optimized for Elo per character of source code. (For the stand-alone version; I did not see any point in minimizing a WB protocol driver.)

Micro-Max and Fairy-Max are nearly the same; the latter started out just as a micro-Max that loaded its move-generator tables from a file, so that it could easily be configured to play variants where pieces moved differently. After that I generalized the move generator by adding an extra table that specified what a move could do (slide or leap, capture or non-capture) rather than deducing that from the piece type. And allowed the board to be wider than 8 files, by using a more complex test for when pieces stray off board. And allow specification 'hopper' moves, that must jump over something. And allow the step direction to change, after a given number of steps or when hopping.

So there are a lot of extra if-statements in the move generator to test for and handle all these exotic move types, which presumably slow Fairy-Max down a little compared to micro-Max. While for normal Chess the only difference is really that it searches Pawn double-pushes before single pushes, (as a consequence of the generalized method for specifying initial moves that only virgin pieces can do), while micro-Max does that the other way around. As double pushes are generally better, that might make up for the slower move generation.

I have not worked om micro-Max for years, the most recent sources are still on my old website. Up-to-date Fairy-Max sources are in my on-line git repository. I still work on that regularly, but not really with the goal of improving its strength (which I consider about optimal), but for expanding its repertoire of exotic moves, non-standard win conditions etc. Only recent improvement of its search process is that it now can mate with Bishop and Knight (which of couse brings unmeasurable Elo.)
Henk
Posts: 7221
Joined: Mon May 27, 2013 10:31 am

Re: Fairy-Max 4.8_O released

Post by Henk »

Skipper counting material only. Fairy-Max much too strong.

[pgn]
[Event "Computer Chess Game"]
[Site "HP"]
[Date "2015.12.18"]
[Round "-"]
[White "Fairy-Max 4.8S"]
[Black "SkipperWinb"]
[Result "1-0"]
[TimeControl "120"]
[Annotator "1. +0.04 1... +0.00"]

1. Nh3 {+0.04/8} a6 {+0.00/20 2.5} 2. d4 {+0.08/8 2.1} a5 {+0.00/18 2.4} 3.
Bf4 {+0.08/8 4} g6 {+0.00/17 2.3} 4. Nc3 {+0.01/8 8} Nc6 {+0.00/17 2.3} 5.
d5 {+0.05/8 1.5} Nb8 {+0.00/16 2.3} 6. Qd2 {+0.00/8 2.9} d6 {+0.00/16 2.2}
7. O-O-O {+0.15/8 1.8} Nf6 {+0.00/16 2.2} 8. e4 {-0.03/7 1.4} Qd7
{+0.00/14 2.1} 9. Ng5 {+0.02/6 1.3} h6 {+0.00/14 2.1} 10. Nf3 {-0.06/8 1.8}
Rh7 {+0.00/13 2.0} 11. Bc4 {+0.02/6 1.3} c6 {+0.00/12 2.0} 12. e5
{-0.01/7 4} dxe5 {+0.00/12 1.9} 13. Nxe5 {+0.03/7 1.5} Qd8 {-0.40/12 2.0}
14. Qe2 {+0.08/6 1.2} c5 {+0.00/10 1.9} 15. d6 {+0.38/7 1.8} Nbd7
{-2.86/9 1.8} 16. Nb5 {+3.94/8 1.2} Nh5 {-5.93/10 1.8} 17. Nc7+
{+5.33/9 1.8} Qxc7 {-6.14/11 1.8} 18. dxc7 {+6.48/9 1.0} Nhf6
{-6.14/10 1.8} 19. Qd3 {+7.82/7 1.5} e6 {-10.13/10 1.7} 20. Bxe6
{+8.93/8 1.0} Be7 {-11.98/10 1.7} 21. Nxd7 {+10.85/8 1.5} Bxd7
{-14.33/10 2.0} 22. Bxd7+ {+13.94/10 1.5} Kf8 {-15.25/13 2.0} 23. Qf3
{+13.89/10 1.2} Nxd7 {-15.05/9 1.9} 24. Rxd7 {+14.67/10 1.7} Re8
{-16.89/9 1.9} 25. Rxe7 {+19.82/10 1.2} Rxe7 {-999.99/9 1.8} 26. c8=Q+
{+79.94/10 1.0} Kg7 {-999.99/11 1.8} 27. Qd8 {+79.95/10 0.9} h5
{-999.99/12 1.8} 28. Qc3+ {+79.96/12 1.1} f6 {-999.99/15 1.7} 29. Qxe7+
{+79.97/28 0.4} Kg8 {-999.99/17 1.7} 30. Qd8+ {+79.98/28 0.1} Kf7
{-999.99/20 1.6} 31. Qcxf6# {+79.99/28 0.1}
{Xboard adjudication: Checkmate} 1-0
[/pgn]
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Fairy-Max 4.8_O released

Post by MikeB »

Appreciate your detailed response. I must have pulled an older source that did for Fairy Maxnot have castling. With respect to Micro, using a compressor. Is probably "cheating" ( "tongue in cheek") but if that what it takes , maybe I can get micro down to 5kb so you could have that title too!

I was looking for an engine rated around 1900 just to play against personally. Micro fits the bill perfectly. Does the current fairy max accept positions pasted into winboard and does it have an analysis mode ?
User avatar
hgm
Posts: 27837
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Fairy-Max 4.8_O released

Post by hgm »

Fairy-Max has up-to-date support of WB protocol. (I believe micro-Max still was a WB v1 engine.)

But unfortunately there is no support for analysis mode in Fairy-Max. Analysis is a form of pondering, and Fairy-Max doesn't have that either. It would require monitoring input during search. Perhaps I should add this, one of these days. It already does have a form of multi-PV (controlled through a centi-Pawn margin).

And indeed, Fairy-Max has just about the right strength for making it fun to play against it.