Add variant falcon
[fairymax.git] / fairymax.pod
1 =head1 NAME
2
3 fairymax - xboard-compatible chess and chess-variant engine 'Fairy-Max'
4
5
6 =head1 SYNOPSIS
7
8 B<fairymax> [hashSize] [iniFile]
9
10 B<shamax> [hashSize] [iniFile]
11
12 B<maxqi> [hashSize] [iniFile]
13
14
15 =head1 DESCRIPTION
16
17 B<fairymax> is a program that plays chess and chess variants. 
18 It uses the xboard/winboard chess-engine protocol to communicate.
19 Apart from 'regular' chess (also known as the Mad-Queen variant),
20 it can play Capablanca chess, gothic chess, knightmate, cylinder chess, 
21 berolina chess, superchess, makruk (Thai chess), courier chess,
22 Seirawan Chess, Spartan chess and chess with Different Armies.
23 Fairy-Max can be easily configured by the user to play other variants as well,
24 by modifying the ini file.
25 This ini file describes the rules of movement
26 of the participating pieces and the initial board setup.
27
28 Fairy-Max can also play shatranj, 
29 but in this case is not aware of the shatranj rule that a bare king loses.
30 So it might play sub-optimally in the late end-game.
31 A version of Fairy-Max adapted to implement the baring rule is
32 available under the name B<shamax>.
33
34 Similarly, a version of Fairy-Max adapted to play Xiang Qi (Chinese Chess)
35 is included in the fairymax package as well, under the name B<maxqi>.
36
37 B<fairymax> is a derivative of the world's (once) smallest chess program 
38 (source-code wise), micro-Max.
39 The latter measures less that 2000 characters, (about 100 code lines),
40 and has a computer rating of around 2050 on the CCRL rating list.
41 Although this is about 1000 rating points behind the world champion,
42 micro-Max still makes a quite tough opponent even for club players,
43 although it is not unbeatable.
44
45 The main difference between micro-Max and Fairy-Max is that the latter loads
46 its move-generator tables, which specify how the various pieces move,
47 from an external file, so it can be easily adapted to incorporate un-orthodox pieces.
48 For ease of use of the artificial-intelligence, Fairy-Max is equipped with
49 I/O routines that allow it to run with the xboard graphical user interface.
50
51 See xboard(6) for instructions about how to use B<fairymax> through xboard. To
52 start up quickly, you just need the command: B<xboard -fcp fairymax>.
53 However, XBoard might not support symbols for every unorthodox piece in board sizes
54 different from B<bulky>, B<middling> and B<petite>.
55 It might thus be advisable to specify a board size as well, e.g.
56 B<xboard -fcp shamax -boardSize middling -variant shatranj> 
57 to get correct display of the elephant and general pieces in shatranj.
58 Note that to be able to play the chess variants,
59 you will need xboard 4.3.14 or later.
60
61 Some of the variants Fairy-Max plays are only partially supported by XBoard,
62 and can only be played whith the legality-testing function of the latter switched off.
63 (This applies to cylinder chess, berolina chess, great shatranj, Spartan chess
64 and chess with different armies.)
65 For some variants even the name is unknown to XBoard,
66 and they are all grouped under the catchall name 'fairy'.
67 Which variant is played by Fairy-Max when XBoard is set to 'fairy',
68 can be determined by a combobox control in the XBoard 'Engine Settings' menu dialog.
69
70 Fairymax supports multi-PV mode: by specifying a non-zero multi-PV margin in the
71 Engine-Settings dialog of XBoard, Fairy-Max will not only print the
72 principal variation for the best move, but also for every move that approaches
73 the score of this best move to within the set margin.
74 (If it does not find the best move on the first try, this might lead to printing
75 of a few extra lines below the threshold.)
76
77 The fmax.ini file from which Fairy-Max by default takes the piece and game definitions
78 is a self-documenting text file,
79 which contains instructions for how to define new pieces and chess variants.
80 In addition it contains an extensive list of pre-defined pieces,
81 incuding many not occurring in any of the pre-defined variants,
82 which the user can draw on to define his own variants.
83
84 Amongst the move types supported by Fairy-Max are normal leaper and slider moves,
85 (e.g. knight and rook),
86 divergent moves (i.e. capture and non-capture moves can be different)
87 hoppers (which jump over other pieces, such as the Chinese cannon or the grasshopper),
88 lame leapers (the move of which can be blocked on squares they cannot move to,
89 such as the Chinese horse and elephant),
90 and any combination thereof,
91 in every possible direction.
92 The board width is configurable upto a width of 14 squares,
93 and cylindrical boards (where left and right edge connect) are supported as well.
94
95 =head1 OPTIONS
96
97 =over 8
98
99 =item B<hashSize>
100
101 If the first argument to fairymax is numeric,
102 it is taken as an indicator for the amount of memory Fairy-Max is allowed to use
103 for its internal hash table.
104 The default value for this argument, 22, would result in a memory usage of 48MB.
105 Each next-higher number doubles the memory usage, each next-lower halves it.
106 Running with less than 6MB (i.e. argument 19) is not recommended.
107 When fairymax is running under xboard 4.3.15 the hash-table size can be set 
108 through the xboard menus,
109 making this argument superfluous.
110
111 =item B<iniFile>
112
113 A second or non-numeric first argument is taken as a filename.
114 Fairy-max will use the mentioned file in stead of its default fmax.ini file
115 to define the movement of pieces and initial setup of the variants.
116 This makes it easier to define your own variants.
117
118 =back
119
120
121 =head1 SEE ALSO
122
123 xboard(6)
124
125 http://www.chessvariants.org/index/msdisplay.php?itemid=MSfairy-max
126
127 http://home.hccnet.nl/h.g.muller/max-src2.html
128
129 http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=50387
130
131
132 =head1 AUTHOR
133
134 B<Fairy-Max> was written by H.G.Muller <h.g.muller@hccnet.nl>.
135
136 This manual page was generated with pod2man(1).