DIR Return Create A Forum - Home
---------------------------------------------------------
The Chess Variant Forum
HTML https://chessvariantforum.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: General Discussion
*****************************************************
#Post#: 191--------------------------------------------------
How to download Fairy-Max?
By: Asher Hurowitz Date: January 23, 2018, 11:11 am
---------------------------------------------------------
I was told that there was this amazing software that could play
custom variants and wanted to use it among other things and
general personal usage for the current forum design contest.
Where can I download this program?
Thanks!
#Post#: 199--------------------------------------------------
Re: How to download Fairy-Max?
By: HGMuller Date: January 23, 2018, 3:56 pm
---------------------------------------------------------
The most recent version is packaged together with the WinBoard
GUI beta version, which can be downloaded from
HTML http://hgm.nubati.net/WinBoard-AA.zip
. Just unzip the file in a
location of your choice, and start the winboard.exe in the
WinBoard folder contained in it. This is Windows software, btw;
if you run on Linux or a Mac, you would have to use XBoard.
Note that Fairy-Max is an engine, i.e. not equiped with any
graphical interface, and is designed to run under the
WinBoard/XBoard GUI. It is configurable for a range of variants
of various board sizes, and supports a wide variety of piece
moves (leapers, riders, hoppers). It doesn't support any side
effects (other than castling or e.p. capture). The variant can
be defined in the fmax.ini file, which also contains an
explanation on how to do this. Unfortunately the definition
format is not very user-friendly.
Fairy-Max is not unique as a user-configurable chess-variant
engine, BTW; there are other engines, also running under
WinBoard, which can also be configured. Often in a more
user-friendly way. In particular, I want to mention Daniel
Shawul's engine Nebiyu, and Evert Glebbeek's engine Sjaak II. If
you have downloaded the WinBoard package mentioned above, you
should be able to also download these, and set up WinBoard to
use them through the Load Engine dialog.
#Post#: 203--------------------------------------------------
Re: How to download Fairy-Max?
By: GothicChessInventor Date: January 23, 2018, 4:39 pm
---------------------------------------------------------
[quote author=Asher Hurowitz link=topic=42.msg191#msg191
date=1516727471]
I was told that there was this amazing software that could play
custom variants...
[/quote]
Are you thinking of the Zillions of Games engine?
#Post#: 210--------------------------------------------------
Re: How to download Fairy-Max?
By: HGMuller Date: January 24, 2018, 9:03 am
---------------------------------------------------------
As there were already questions about this in another thread
(where it was a bit off-topic), it might be a good idea to
explain that here.
For one, the package consist of a GUI (WinBoard), responsible
for displaying the board, entering the moves through mouse
clicks, stepping through games, saving games on files or reading
them back for review. This acts as a 'front end' for an AI,
a.k.a. engine, (Fairy-Max), which is responsible for thinking uo
good moves. To implement a new variant so that you can play it
against the computer requires both the GUI and the engine to be
made aware of the rules.
Note that WinBoard can also be used as front end for other
engines than Fairy-Max. I fact there are thousands of engine
that can be used as AI for WinBoard. Most of those only play
orthodox Chess, of course. Some are dedicated to another
variant, such as Chinese Chess or Shogi. Some engines can play
various variants, e.g. Pulsar can play orthodox Chess, Suicide
Chess, Atomic Chess, Shatranj, Crazyhouse and Three-checks. Of
interest here are engines that can be configured by the user for
playing any variant within a certain range of parameters (like
maximum board size, maximum number of pieces). There even exist
several of those, e.g. Fairy-Max, Nebiyu and Sjaak II. WinBoard
is able to play two engines that support the same variant
against each other, or even conduct tournaments for more than
two such engines.
Configuring WinBoard
In principle it is possible to configure WinBoard for a new
variant without involvement of any engine, e.g. to use it as a
viewer for games played between humans. This can be done through
a number of options. These can be specified in the 'Additional
options' field of WinBoard's startup dialog. But it is more
convenient to write them all in a file, say xxx.ini. Then you
would only have to type @xxx as 'Additional option', and
WinBoard would insert the contents of the file in that place.
Otherwise you would have to retype all the options everytime you
want to start WinBoard for that variant.
A variant has to be specified to WinBoard as a modification of
some other, standard variant of which it knows the rules. Unless
overruled, the game rules will be those of that 'parent
variant'. Things like wheher stalemate is a draw, king baring is
a win, captures are mandatory, capturing pieces explode, pieces
in hnd can be gated onto evacuated first-rank squares and such
currently can only be specified through the parent variant. Game
properties that can be overruled are board size, participating
pieces, how the pieces move, start position, whether pieces can
be hold in hand. E.g. the following xxx.ini could be used to
define a game on a 10x10 board with an Elephant and a Cannon as
extra pieces
-variant capablanca
-boardWidth 10
-boardHeight 10
-pieceToCharTable "PNBRQ.E....CKpnbrq.e....ck"
-fen
"rnbcqkebnr/pppppppppp/10/10/10/10/10/10/PPPPPPPPPP/RNBCQKEBNR w
KQkq - 0 1"
-men "C:mRcpR;E:FAsmW"
Here 'capablanca' is a variant known to WinBoard, with rules
similar to orthodox Chess, very suitable as parent variant for
western Chess variants. The board width and heigt speaks for
itself. The pieceToCharTable is a list that for each image
WinBoard supports indicates which piece in the game will use
that image ('.' indicating the corresponding image is not used
in the game. The order of the letters in this string corresponds
to the following images:
HTML https://www.gnu.org/software/xboard/whats_new/4.9.0/Pieces.png
The last piece of each color is always King, all other letters
are images starting at the upper-left, and unmetioned images are
supposed not to participate. So i this case the orthodox pieces
are selected, in adition to an Elephant (using ID = E) and a
Cannon (using ID = C). The -fen option then defines the start
position in terms of these piece IDs.
Finally the -men option defines how pieces move; for each ID it
specifies a move in Betza notation after the following colon
(':'); the different pieces are separated by semicolons (';').
In this case only the Cannon and the Elephant moves are
specified. For pieces that are not specified in the -men option,
WinBoard will use the default move for the corresponding image.
For the orthodox pieces this is of course what you would expect.
(And for the Cannon, which is described here as the piece from
Chinese Chess, moving as Rook and capturing as a Rook hopper,
the default move would probably have been sufficient as well.)
The Elephant is described as moving and capturing one or two
squares diagonally, or moving one step left or right, which
definitely is different from what WinBoard would think without
this move override.
Next time more about configuring Fairy-Max.
#Post#: 223--------------------------------------------------
Re: How to download Fairy-Max?
By: ebinola Date: January 24, 2018, 3:37 pm
---------------------------------------------------------
Plugging that into an .ini file just spits out this for me. Not
sure what's going on here. :/
EDIT: Also, how do shogi-like promotions work? Say if I wanted a
variant where a gold can promote to a goldrider, how would I go
around doing that?
#Post#: 232--------------------------------------------------
Re: How to download Fairy-Max?
By: HGMuller Date: January 25, 2018, 4:24 am
---------------------------------------------------------
Just to make sure: the WinBoard version you are using is 4.9.xxx
? (Visible in the Help -> About WinBoard menu.) From you
screenshot it is obvious that WinBoard must have seen the
-boardHeight 10 option, but it seems to have ignored the FEN,
and uses the default setup for Capablanca. (Because that still
fits the specified width; the Pawn placement follows the board
height, when trying to fit a position on a board of non-standard
size.)
Older WinBoard versions do not support the -fen option (you
would have to specify a -loadPositionFile (-lpf for short) with
the FEN for the position in it, which was a bit cumbersome). So
this could be a possible explanation.
As for Shogi promotions: In the pieceToCharTable you can define
an image as a two-character combination ^X , which then
indicates that image should be used for the promoted form of X
(and by inference that X can promote when reaching the promotion
zone). In FEN and SAN WinBoard would use the notation +X for
such pieces. Note, however, that Fairy-Max does not support
promotion of pieces other than Pawn. But Sjaak II might.
#Post#: 234--------------------------------------------------
Re: How to download Fairy-Max?
By: ebinola Date: January 25, 2018, 11:58 am
---------------------------------------------------------
Ah, I've been using 4.8! I couldn't find a download link for
4.9. Thanks!
EDIT: Oh, and one more thing... how would I go about adding
extra royal pieces to a game, like the drunken elephant?
#Post#: 237--------------------------------------------------
Re: How to download Fairy-Max?
By: HGMuller Date: January 25, 2018, 1:37 pm
---------------------------------------------------------
WinBoard 4.9 is currently only available as a beta version, at
HTML http://hgm.nubati.net/WinBoard-AA.zip
.
You can use -variant chu as parent variant, and use the second
King (shown in black) as the promoted version of the Elephant.
#Post#: 255--------------------------------------------------
Re: How to download Fairy-Max?
By: HGMuller Date: January 26, 2018, 1:15 pm
---------------------------------------------------------
I just updated the WinBoard-AA package (at the above link), to
fix a problem in WinBoard with setting up positions in
combination with an engine, and enhance Fairy-Max to allow Pawns
with initial double push on more advanced ranks than the second,
iron pieces, and board widths up to 14.
Configuring Fairy-Max
A game definition in Fairy-Max consists of a list of definitions
of the participating pieces, preceded by the game name, board
size and initial setup. Such definitions can be written in the
fmax.ini file, one after the other. A piece definition takes a
single line. E.g. for a Rook, this would be
R:500 16,3 -16,3 1,3 -1,3
The leading 'R' gives the name under which the piece is known,
used to send a posiion the user sets up in the GUI to the
engine. The '500' after the colon is the piece value that
Fairy-Max should assume for this piece (in centi-Pawn). That 'R'
is used as name, rather than 'r', indicates to Fairy-Max the
piece should not be drawn towards the center. The remaining
pairs of numbers are the 'board step' and the 'mode'. The board
step is 16 times the rank step, plus the file step. Stepping in
the direction of 1st rank or h-file (on 8x8 boards) would be
considered positive. So the first two pairs specify single steps
along a file, the last two single steps along a rank.
The 3 for 'mode' means the move is an unlimited-range slide that
can both be used for moving (to an empty square) and capturing.
The mode always is the sum of the individual capabilities, 1
meaning the move can capture, 2 meaning it can move (to empty),
and 4 meaning it must stop after this step (i.e. the move is a
leap rather than a slide). With this we can see a Knight and a
(white) Shatranj Pawn should be defined as:
N:325 31,7 33,7 14,7 18,7 -31,7 -33,7 -14,7 -18,7
P:60 -16,6 -15,5 -17,5
Pieces with asymmetric moves, like Pawns, must be defined
separately for white and black. To this end a piece ID can be
used multiple times. The first definition for that ID is then
used for white pieces of this type, the last definition for
black pieces. Fairy-Max will consider the first two pieces that
are defined (number 1 and 2) to be Pawns, meaning it will assume
they promote when they reach the promotion rank. In its own
thinking Fairy-Max will always promote Pawns to piece number 7.
So it will never consider under-promotion, and you should make
sure that the most-likely promotion choice is defined as piece
number 7. (For orthodox Chess this would of course be Queen.)
Otherwise the order of the definitions is arbitrary, although
performance benefits a bit if they are ordered from low to high
value. Under-promotions from the opponent will be accepted.
Absolute royalty is indicated by specifying the value of a piece
as -1. Such pieces may not be left in check, and loss of any of
them would mean loss of the game.
There can be at most 15 different piece types in a variant.
Initial moves (that only virgin pieces can do) must be defined
separately from the 'normal' moves, and will all have a 'mode'
that ends on '4', and has a digit before that to indicate what
the second step of this move can do. (This digit will be added
to the '4'.) That means Pawn double pushes would need mode 24
(the 2 indicating it can only move, not capture with this double
push). Initial moves of a royal piece are assumed to be
castlings with the corner piece (whatever type that may be, as
long as it is virgin as well).
Initial setup
Each variant you define should have a 'default starting
position'. This position suffers some restrictions: it must
consist of a back rank filled with pieces, and somewhere in
front of it a rank filled with Pawns. Positions that do not fit
this requirement can be set up through the GUI; the default
position then only affects which of the pieces in the externally
fed position will be considered virgin. Any Pawn on or behind
the Pawn rank of the default start position will be considered
virgen, and any back-rank piece that is in the same place as it
would be in the default start position.
The default start position is specified in 2 lines directly
above the piece definitions, one for the white back rank, the
next for the black back rank. It will contain the piece-type
numbers (corresponding to the order of the definition lines),
separated by spaces, for each square on the back rank. Normally
the second rank would be filled with Pawns automatically.
Board dimensions
Above the specification of the start position we have a line
that specifies the board size, as two numbers separated by 'x'.
E.g. 10x8 . The first number is the board width (number of
files), the second the board height (number of ranks). The
maximum number of ranks is 16. The maximum number of files is
14, but only if there are no pieces that leap more than 2 files
laterally. If pieces are present that can make larger sideway
leaps, the board needs to be correspondingly narrower to prevent
them from leaving the board o one edge, and appearing in it at
the other.
You can also define Pawn rank and depth of the promotion zone
here, by writing '=N' behind the board size if you want the
Pawns to start on the Nth rank. E.g. 8x8=3 for Makruk, where
Pawns start on 3rd rank. Then the depth of the promotion zone
will also be assumed to be 3 ranks deep. If you just want to
move up the Pawns, but keep the zone a single rank deep, you
would have to specify a negative N.
Header
At the top of the definition there will be a line specifying the
name of the variant, preceded by the word Game, a colo and a
space. Like
Game: capablanca
In this form the name must be a standard variant known to
WinBoard, or WinBoard would not allow you to select it. However,
if you changed the board size in WinBoard (through the
-boardWidth or -boardHeight option), WinBoard will change the
standard name by prefixing the board size. E.g. it knows that
variant capablanca is normally played on a 10x8 board, so if you
overrode that by specifying 10x10, the variant gets called
10x10+0_capablaca, and must be defined as such in Fairy-Max:
Game: 10x10+0_capablanca
Above that you can put an arbitrary number of comment lines,
startig with '//'. They are basically just for the convenience
of the user writing the defiition. Although Fairy-Max will show
a button in its Engine Settings dialog in the GUI that you can
press in order to see the last such line before the definition
proper. So you could use that to give a short description of the
variant.
Example
The fmax.ini file already contains many examples, but a simple
one is that for Knightmate:
[font=courier]// The King (Unicorn) moves as a Knight, and vice
versa. The Unicorn can castle!
Game: knightmate
8x8
6 4 5 7 3 5 4 6
6 4 5 7 3 5 4 6
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 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7
m:222 1,7 16,7 15,7 17,7 -1,7 -16,7 -15,7 -17,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
[/font]
#Post#: 260--------------------------------------------------
Re: How to download Fairy-Max?
By: GothicChessInventor Date: January 26, 2018, 6:50 pm
---------------------------------------------------------
[quote author=HGMuller link=topic=42.msg255#msg255
date=1516994159]
A game definition in Fairy-Max consists of a list of definitions
of the participating pieces, preceded by the game name, board
size and initial setup. Such definitions can be written in the
fmax.ini file, one after the other. A piece definition takes a
single line. E.g. for a Rook, this would be
R:500 16,3 -16,3 1,3 -1,3
The leading 'R' gives the name under which the piece is known,
used to send a posiion the user sets up in the GUI to the
engine. The '500' after the colon is the piece value that
Fairy-Max should assume for this piece (in centi-Pawn). That 'R'
is used as name, rather than 'r', indicates to Fairy-Max the
piece should not be drawn towards the center. The remaining
pairs of numbers are the 'board step' and the 'mode'. The board
step is 16 times the rank step, plus the file step. Stepping in
the direction of 1st rank or h-file (on 8x8 boards) would be
considered positive. So the first two pairs specify single steps
along a file, the last two single steps along a rank.
[/quote]
You're going to have to explain these numbers in more detail
H.G.
*****************************************************
DIR Next Page