The Chess Variant Pages
Custom Search




[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Later Reverse Order Earlier
This item is a computer program
It belongs to categories: Orthodox chess, 
It was last modified on: 2008-07-31
 By H. G.  Muller. Fairy-Max: an AI for playing user-defined Chess variants. A chess engine configurable for playing a wide variety of chess variants.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on 2019-09-17 UTC

On my Linux system on an Intel PC I never had any such problems with XBoard + Fairy-Max. Which is the essential change that finally made it work for you? The fflush(stdin)?


x-board user wrote on 2019-09-17 UTC

I use fairymax all the time, since I'm not a great player, but it's challenging enough that it's still hard to beat.  Unfortunately, it seemed to block indefinitely while talking to X-board.  I was curious what was happening since I'm interested in chess engines.  There is a large section on stream blocking, etc on the X-board site. I managed to fix the problem, and happy to report it played gnu-chess in a game on an ARM chromebook computer running the latest linux OS.

I pasted the resulting code here:

https://pastebin.com/Fd4cNpRV


H. G. Muller wrote on 2018-10-06 UTC

> Can anyone let me know what I'm doing wrong?

Ugh, I completely missed this question, and considering the date I suppose it is no longer relevant. Still, for people that might run into a similar problem: what is wrong is that you defined piece number 8, which is present in the initial setup, with ID 'H', but that there is no 'H' in the list of pieces given in the 'Game' line

Game: fun01 # PNBRQ.....AKpnbrq.....ak # fairy
 

This list of piece IDs is essential for the WinBoard GUI (to which Fairy-Max will send it) to know which piece image to associate with each piece. Each position correspond with a certain image, the first 5 being the standard image for P, N, B, R and Q, and the last for each color always representing a King. The list now defines the piece 'A' (which does not occur in your variant at all), but not 'H'. As a result WinBoard will choke on the initial position that Fairy-Max sends it, as this will contain 'H' pieces which WinBoard doesn't know what image to use for. Replacing the A and a by H and h would solve this, and display the H as a spiked helmet. By putting the H and h in a different position in the string, (e.g. by changing the number of dots, but keep the length for white and black equal!), you would get other images for H, h.

Note that the latest versions of Fairy-Max and WinBoard would allow you append the lines

#
# H& ADGH

to the definition, which communicate the moves of the H piece (in Betza notation) to WinBoard, so that it will properly highlight the possible destination squares of the piece when you grab it, and can test legality of engine moves. (Otherwise legality testing would have to be switched off, because WinBoard might have other ideas of how the piece with the chosen image can move than Fairy-Max.)


V. Reinhart wrote on 2017-01-25 UTC

I'm trying to use fairy max to play a game with 4 new pieces at the corners (the new piece is a hawk and it jumps 2 or 3 squares in any direction). The game definition is below (in fmax.ini). When I run this game black's pieces are shown in wrong locations, and the game immedietly results in a stalemate. (I have legality checking turned off, but I get errors either way). Can anyone let me know what I'm doing wrong? thanks.

// variant - [new piece at corners]
Game: fun01 # PNBRQ.....AKpnbrq.....ak # fairy
8x8
8 4 5 7 3 5 4 8
8 4 5 7 3 5 4 8
p:74 -16,24 -16,6 -15,5 -17,5
p:74  16,24 16,6 15,5 17,5
k:-1  1,34 -1,34 1,7 16,7 15,7 17,7 -1,7 -16,7 -15,7 -17,7
n:259 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7
b:296 15,3 17,3 -15,3 -17,3
R:444 1,3 16,3 -1,3 -16,3
Q:851 1,3 16,3 15,3 17,3 -1,3 -16,3 -15,3 -17,3
H:900 -16,7 -32,7 1,7 2,7 16,7 32,7 -1,7 -2,7 -15,7 -30,7 17,7 34,7 15,7 30,7 -17,7 -34,7
 


H. G. Muller wrote on 2015-03-09 UTC
> Is there a ready made setup for chess with different armies ?

Do you mean in the jocly.com bot, or in the WinBoard+Fairy-Max download? In the latter you can select various CwDA battles in the Engine Settings dialog for the "Variant fairy selects" option, and then choosing variant 'fairy' from the WinBoard New Variant dialog should give you those armies.

pallab basu wrote on 2015-03-09 UTCExcellent ★★★★★
Is there a ready made setup for chess with different armies ? Thanks for answering,

Michel Gutierrez wrote on 2014-12-03 UTCExcellent ★★★★★

For those interested, Fairy-Max is now being used as a remotely connected bot player on the Jocly platform. It offers regular orthodox Chess, Makruk, Capablanca, Cylinder Chess, Shatranj, and Courier. XiangQi is also available via the Max-Qi engine from the same author as Fairy-Max.

To play one of those variants, go to https://www.jocly.com/#/open-tables and click on an open table to start the game, or invite user HGMBot to play. Since the bot is connected to Jocly as a regular user, you'll need your own Jocly account (free) to play this AI.

Prefer Firefox, Chrome or Safari (with WebGL enabled) to get a 3D interface for playing. If 2D is good for you, any modern browser will work, including those from mobile devices.


H. G. Muller wrote on 2014-10-29 UTC
Well, thanks! Unfortunately I don't keep separate web pages on piece values. What I learn about them I usually publish here. Not all comments here can be appropriately associated with an article, however. (The Piececlopedia is far from complete.) And unassociated commands are almost impossible to find back here, if they don't disappear at all.

I remeber having published something here about divergent pieces (mKcN, mNcK, mQcN, mNcQ), and on another occasion there was a topic in which both Mats Winther and I published about the value of bifurcator pieces.

Recently I did an investigation on sliders that skip the first square, either completely, or allowing captures or rifle captures to them. This in connection with the weird 'Heavenly Tetrarchs' piece of Tenjiku Shogi. But the results never got any further than the 'Talk page' of the Wikipedia article about Tenjiku.

Michael Nelson wrote on 2014-10-29 UTCExcellent ★★★★★
A question for you, H. G.: is there a document somewhere describing your latest research into the value of chess pieces?

The Excellent is both for Fairy-Max itself, and for your work on Chess engines and piece value.

H. G. Muller wrote on 2013-02-20 UTC
I made a nice addition to the capabilities of Fairy-Max. There were still two unused bits in the field specifying the mode rights of each move direction, and I use them now to specify a delay of the first toggle event. Normally non-hoppers indicate in their primary move rights what they can do (capture, non-capture and continuation in all combinations), and with their secondary move rights which of those have to change after every step. For simple sliders or leapers the latter are not used, as nothing has to change. (They either have continuation, and keep it on every step, so they are sliders with unlimited range, or they haven't, and then there is no second step, and thus also nothing to toggle.

But range-2 sliders would specify continuation in their primary move rights, and toggle it off after one step. (Lame leapers like the Xiangqi Elephant would do the same, but in addition sot specify any capture/non-capure rights with the first step, and toggle those on for the second step, as well as toggling continuation off.).

The new interpretation of the so far unused bits would postpone the first toggle 1, 2 or 3 steps. So applied to the old encoding for a range-2 slider, it would extend the range to 3, 4 or 5 before the continuation is toggled off and the last step is made.

M Winther wrote on 2012-12-31 UTC
Indeed, Game Courier runs on Android. It would be neat if one didn't have to scroll every time when making a new move, because the board doesn't fit in the window. 
I am curious how much money the Android app developers earn, when selling their programs on play.google.com and elsewhere. The apps are cheap, but sometimes there are half a million downloads, because Android is so widely used. Many of the apps have glitches that are very, very frustrating. It is not possible to download a decent painting program, for instance. If it's possible to earn some money, it could motivate that one learns Android programming. /Mats

H. G. Muller wrote on 2012-12-30 UTC
I thought that Game Courier is web based. So you should be able to use it through the standard browser app. I made a similar turn-based server for Seirawan Chess, and had no problem at all to use it from Android. It would also be quite trivial to provide a second access page with a layout especially tailored for good dislay on a smartphone.

I agree it would be good to have a dedicated Android client that could also be used locally with engines. I asked Aart if he would be willing to let me patch his Chess for Android to implement some other variants, but he did not jump to the occasion.

So I guess we are on our own. Problem is that I never programmed on Android, and would not even know how to make a 'Hello World' program. So I would have to learn it,and acquire the necessary development software. I did already buy a Galaxy Gio for the purpose. My plan is to write an Android front-end for WinBoard.

Earl wrote on 2012-12-30 UTC
Does anyone know if Windows 8 can run Zillions?  I'd like to get a netbook or a tablet and take it on the road with Zillions games loaded up.  Anyone have any success doing this yet?

M Winther wrote on 2012-12-30 UTC
Maybe it is time to create variant software for Android, too, because it us used so widely, today. Soon Android will be in every TV set, too, and people will surf the web on the TV. Today, there are apps for chessbase online database (a remarkable tool) and Playchess.com, ICC, etc. It would be great if an Android version of game courier could be created, too. 
/Mats

H. G. Muller wrote on 2012-12-27 UTC
I think that only means you can play normal Chess against it. I don't believe Chess for Android supports anything else. Much to my chagrin. It should be very easy to support at least the 8x8 variants, such as Knightmate, Spartan, Berolina, Cylinder...

M Winther wrote on 2012-12-27 UTC
Aha, I can always turn down the volume. What does it mean that "Chess for Android" can run your FairyMax engine? Are chess variants playable on Android?
http://www.aartbik.com/MISC/eng.html
/Mats

H. G. Muller wrote on 2012-12-27 UTC
Well, although I made the engine, (which I distribute myself as WinBoard engine for PC), I am not involved at all in the development of the GUI of the app. I just sent the developer the source code for setting up and searching a position (which I already had made available earlier to the HOXChess developer for the iPhone). This was kind of a 'fire and forget' event, and I am not sure I still have the e-mail address of the guy.

M Winther wrote on 2012-12-24 UTC
H.G., I noticed that it's you who have made the engine for HD Chinese Chess or Action Chinese Chess for Android. I like the program, but I hate the sound effects. They are really disturbing. I turned off the music, which is absolutely horrible, but the sound effects are still there, and they hurt my ears. Could you see to that they are altered? Moreover, I would much prefer another skin than the metallic. /Mats

H. G. Muller wrote on 2009-08-31 UTC
Sure, they are there to be used. :-) They can be obtained from my website: http://home.hccnet.nl/h.g.muller/dwnldpage.html . TJChess10x8, SMIRF, BigLion80, Archbishop and Cancellor should also be able to play this variant. TSCP unfortunately can't, as it does not supports setting up a position, and this partiular position cannot be reached from its fixed opening position by a sequence of legal moves.

Sam Trenholme wrote on 2009-08-31 UTC

Mr. Muller:

I would like to have a computer chess contest for a 10x8 chess setup I made a few years ago:

Schoolbook chess

Is it OK if I use your engines (Joker80, FairyMax) as contestants in this contest?

Thank you for your time,

- Sam


Graeme Neatham wrote on 2009-07-10 UTC

Thanks for the info and pointer to MaxQi. I've downloaded the source for MaxQi - if I get anywhere with adapting the code I'll make the source available on my magpies site.


H. G. Muller wrote on 2009-07-10 UTC
I am occasionally still doing some work on Fairy-Max, but I have way too many programming projects. Lately work on Fairy-Max was limitd to making derivatives of it dedicated to a specific variant with unique properties. MaxQi for playing Xiangqi was one result of this (included in the Debian package). Currently I am working on implementing drop moves in Fairy-Max, to make it play Twilight Chess.

The 8-rank restriction is not very easy to lift. The board size is unfortunately very much intertwined with the promotion evaluation code, which uses properties of the specific bit patterns of the rank numbers to derive the bonuses of 64 'centiPawn' for pushing a Pawn from 5th to 6th or 6th to 7th rank. This is a legacy of its micro-Max ancestry, where compctness of the code was the only criterion. So the promotion evaluation would have to be re-written when the number of ranks is different.

Fairy-Max also uses the most-significant bit of the toSquare as a flag to indicate the move is valid, and on boards with more than 8 ranks this bit would be needed for the rank number. I already did solve that in MaxQi, which needs of course more than 8 ranks, with its 9x10 board. Xiangqi has no promotion, of course, so I did not have to deal with that. MaxQi is a bit of an odd-ball version of Fairy-Max, though, because I layed out the board sideways, to facilitate the testing for eye-to-eye Kings. Despite
that it would still be a better starting point for making an 8+ ranks 
Fairy-Max, rotating back the board so that the original fmax.ini files 
can be understood again (this only affects the code for board setup and
translation of input and output moves to square numbers in the interface),
and newle written promotion code can then be added.

Unfortunately micro-Max was not designed for easy code maintenance...

Graeme Neatham wrote on 2009-07-09 UTCExcellent ★★★★★

Is Fairy-Max still being developed? I am using it as the engine in my MAGPIES project, and was wondering if the 8-rank restriction was likely to be removed in the near future. If not then no matter, I'll try adapting the code myself.


23 comments displayed

Later Reverse Order Earlier

Permalink to the exact comments currently displayed.