version 1.4.46b
[polyglot.git] / polyglot.man
1 .\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 'br\}
42 .\"
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
44 .ie \n(.g .ds Aq \(aq
45 .el       .ds Aq '
46 .\"
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD.  Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
51 .ie \nF \{\
52 .    de IX
53 .    tm Index:\\$1\t\\n%\t"\\$2"
54 ..
55 .    nr % 0
56 .    rr F
57 .\}
58 .el \{\
59 .    de IX
60 ..
61 .\}
62 .\"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
65 .    \" fudge factors for nroff and troff
66 .if n \{\
67 .    ds #H 0
68 .    ds #V .8m
69 .    ds #F .3m
70 .    ds #[ \f1
71 .    ds #] \fP
72 .\}
73 .if t \{\
74 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75 .    ds #V .6m
76 .    ds #F 0
77 .    ds #[ \&
78 .    ds #] \&
79 .\}
80 .    \" simple accents for nroff and troff
81 .if n \{\
82 .    ds ' \&
83 .    ds ` \&
84 .    ds ^ \&
85 .    ds , \&
86 .    ds ~ ~
87 .    ds /
88 .\}
89 .if t \{\
90 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96 .\}
97 .    \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 .    \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 .    \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
112 \{\
113 .    ds : e
114 .    ds 8 ss
115 .    ds o a
116 .    ds d- d\h'-1'\(ga
117 .    ds D- D\h'-1'\(hy
118 .    ds th \o'bp'
119 .    ds Th \o'LP'
120 .    ds ae ae
121 .    ds Ae AE
122 .\}
123 .rm #[ #] #H #V #F C
124 .\" ========================================================================
125 .\"
126 .IX Title "POLYGLOT 6"
127 .TH POLYGLOT 6 "2009-09-05" "" ""
128 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
130 .if n .ad l
131 .nh
132 .SH "NAME"
133 PolyGlot \-  Winboard protocol to UCI protocol adapter
134          \-  book engine for Polyglot books 
135          \-  a collection of utilities for creating and analyzing opening books
136          \-  a utility for analyzing epd files
137          \-  a perft counter
138 .SH "SYNOPSIS"
139 .IX Header "SYNOPSIS"
140 polyglot [configfile] [\-noini] [\-ec engine] [\-ed enginedirectory] [\-en enginename] [\-log] [\-lf logfile] [\-hash value] [\-bk book] [\-pg <name>=<value>]* [\-uci <name>=<value>]*
141 .PP
142 polyglot make-book [\-pgn inputfile] [\-bin outputfile] [\-max\-ply ply] [\-min\-game games] [\-min\-score score] [\-only\-white] [\-only\-black] [\-uniform]
143 .PP
144 polyglot merge-book \-in1 inputfile1 \-in2 inputfile2 [\-out outputfile]
145 .PP
146 polyglot info-book [\-bin inputfile] [\-exact]
147 .PP
148 polyglot dump-book [\-bin inputfile] \-color color [\-out outputfile]
149 .PP
150 polyglot [configfile] epd-test [engineoptions] [\-epd inputfile] [\-min\-depth depth] [\-max\-depth depth] [\-max\-time time] [\-depth\-delta delta]
151 .PP
152 polyglot perft [\-fen fen] [\-max\-depth depth]
153 .SH "DESCRIPTION"
154 .IX Header "DESCRIPTION"
155 .SS "PolyGlot as adapter and book engine"
156 .IX Subsection "PolyGlot as adapter and book engine"
157 PolyGlot is a \*(L"\s-1UCI\s0 adapter\*(R".  It connects a \s-1GUI\s0 interface (such as
158 XBoard, Winboard, Arena or Chessbase) to a \s-1UCI\s0 chess engine.
159 .PP
160 By specifying an opening book (in PolyGlot book format) chess engines can
161 transparently use such books.
162 .PP
163 PolyGlot understands the two main \s-1GUI\s0 protocols: \s-1UCI\s0 and
164 xboard. Normally the protocol will be auto detected but this can be
165 overridden in the configuration file.
166 .PP
167 In xboard mode PolyGlot fully translates between the xboard and \s-1UCI\s0 protocols.
168 In addition it tries to solve known problems with other adapters.
169 For instance, it detects and reports draws by fifty-move rule,
170 repetition, etc ... It also supports Chess960.
171 .PP
172 When in \s-1UCI\s0 mode PolyGlot mostly passes commands from the \s-1GUI\s0
173 to the engine and vice versa, except that it will play book moves on
174 behalf of the engine when the occasion arises.
175 .PP
176 The engine options are exported as \s-1UCI\s0 options in \s-1UCI\s0
177 mode and as \*(L"feature option=\*(R" commands in xboard mode. The latter form
178 an extension of the xboard protocol as defined by H.G. Muller.
179 .PP
180 Options which normally appear in the [PolyGlot] section of the
181 config file (see below) are exported as options with their name prefixed
182 by \*(L"Polyglot\*(R". This makes it easy to filter them in the \s-1GUI\s0.
183 .PP
184 \&\s-1NOTE:\s0 Not all options are exported, only those that make sense in the
185 given mode.
186 .SS "Book making utilities"
187 .IX Subsection "Book making utilities"
188 PolyGlot supports the \*(L"PolyGlot opening book format\*(R". This is the
189 defacto standard non-proprietary opening book format. It is fully documented
190 here
191 .PP
192 http://alpha.uhasselt.be/Research/Algebra/Toga/book_format.html
193 .PP
194 Roughly speaking a PolyGlot opening book is a collection of triples
195 (position, move, weight). A \*(L"position\*(R" is represented by a 64\-bit
196 Zobrist hash key. The weight is proportional to the probability the move should
197 be played.
198 .PP
199 Other opening book formats such as ChessBase's .ctg format and Arena's
200 \&.abk format are undocumented and proprietary. They can only be used 
201 by their own GUIs.
202 .PP
203 PolyGlot can compile a pgn file into a binary PolyGlot book and furthermore
204 it can merge two such binary books into a third one.
205 .PP
206 PolyGlot can also extract some useful information from PolyGlot books. The utility
207 \&\*(L"dump-book\*(R" dumps the \*(L"lines\*(R" in a book for a given color. By definition
208 a line is a sequence of moves (from the starting position) in which
209 the given color makes only book moves and the other color makes 
210 arbitrary moves (i.e. not necessarily book moves).
211 .PP
212 Since a PolyGlot book is built up from positions and not lines there
213 may be (and there usually are) many positions in the book that are not
214 on a \*(L"line\*(R" as defined in the previous paragraph. It is convenient
215 to call such positions \*(L"isolated\*(R" positions. The utility \*(L"info-book\*(R"
216 counts such isolated positions.
217 .PP
218 Some of the isolated positions are provably unreachable and they
219 could in principle be deleted from the book. For example if a book
220 contains only the move \*(L"e4\*(R" in the starting position but also the
221 position after \*(L"d4 d5\*(R" then this last position is provably unreachable
222 since it requires white to make a non-book move when a book move is
223 available. Such situations arise frequently from the priority rules
224 in merging books.
225 .PP
226 Unfortunately not all isolated positions are provably unreachable and
227 it is difficult to identify the latter. If invoked with \*(L"\-exact\*(R" the
228 utility info-book will attempt to count the isolated positions which
229 require a player to make a non-book move when a book move is available.
230 Due to the possibility of transpositions this is not a fool proof method.
231 .SS "Epd test mode"
232 .IX Subsection "Epd test mode"
233 In epd test mode, PolyGlot will search positions in an epd file and
234 record the number of times the right best move was found.  The
235 arguments specify when to stop the search in any given position.
236 .SS "Perft counts"
237 .IX Subsection "Perft counts"
238 A perft count is the number of legal move sequence in a given position
239 up to a given depth. PolyGlot can perform such perft counts. It
240 is however much slower than other more dedicated programs.
241 .SH "OPTIONS"
242 .IX Header "OPTIONS"
243 When PolyGlot is invoked as an adapter of in epd-test mode it gets its
244 options from a config file and then from the command line.  The
245 default config file is \*(L"polyglot.ini\*(R" but an alternative one may be
246 optionally included as first argument. The config file format is
247 described below.
248 .PP
249 The following engine options may be specified on the command line.
250 .IP "\fB\-noini\fR" 4
251 .IX Item "-noini"
252 Do not use a config file, even if one was specified on the command line.
253 .IP "\fB\-pg\fR" 4
254 .IX Item "-pg"
255 The argument is a string of the form <name>=<value>. This option will
256 set the Polyglot option <name> to <value>.
257 .IP "\fB\-uci\fR" 4
258 .IX Item "-uci"
259 The argument is a string of the form <name>=<value>. This option will
260 set the engine option <name> to <value>.
261 .IP "\fB\-ec\fR" 4
262 .IX Item "-ec"
263 This sets the EngineCommand.
264 .IP "\fB\-ed\fR" 4
265 .IX Item "-ed"
266 This sets the EngineDir.
267 .IP "\fB\-en\fR" 4
268 .IX Item "-en"
269 This sets the EngineName.
270 .IP "\fB\-hash\fR" 4
271 .IX Item "-hash"
272 This is an alias for \-uci \*(L"Hash=<value>\*(R".
273 .IP "\fB\-log\fR" 4
274 .IX Item "-log"
275 This is an alias for \-pg \*(L"Log=true\*(R".
276 .ie n .IP "\fB\-lf\fR (default: ""polyglot.log"")" 4
277 .el .IP "\fB\-lf\fR (default: ``polyglot.log'')" 4
278 .IX Item "-lf (default: polyglot.log)"
279 This is an alias for \-pg \*(L"LogFile=<value>\*(R".
280 .IP "\fB\-bk\fR" 4
281 .IX Item "-bk"
282 This is an alias for \-pg \*(L"Book=true\*(R" \-pg \*(L"BookFile=<value>\*(R".
283 .PP
284 When invoked as
285 .SS "polyglot make-book"
286 .IX Subsection "polyglot make-book"
287 PolyGlot supports the following options
288 .ie n .IP "\fB\-pgn\fR (default: ""book.pgn"")" 4
289 .el .IP "\fB\-pgn\fR (default: ``book.pgn'')" 4
290 .IX Item "-pgn (default: book.pgn)"
291 Input file in pgn format.
292 .ie n .IP "\fB\-bin\fR (default: ""book.bin"")" 4
293 .el .IP "\fB\-bin\fR (default: ``book.bin'')" 4
294 .IX Item "-bin (default: book.bin)"
295 Output file in PolyGlot format.
296 .IP "\fB\-max\-ply\fR (default: 1024)" 4
297 .IX Item "-max-ply (default: 1024)"
298 Specifies the maximum ply-depth of lines included in the book.
299 .IP "\fB\-min\-game\fR (default: 3)" 4
300 .IX Item "-min-game (default: 3)"
301 Specifies the minimum number of games that have to contain this move for it to be included in the book.
302 .IP "\fB\-min\-score\fR (default: 0.0)" 4
303 .IX Item "-min-score (default: 0.0)"
304 Specifies the minimum score (or weight) this move should have received for 
305 it to  be included in the book. The score is 2*(wins)+(draws), globally scaled
306 to fit into 16 bits.
307 .IP "\fB\-only\-white\fR" 4
308 .IX Item "-only-white"
309 Include only moves for white in the book.
310 .IP "\fB\-only\-black\fR" 4
311 .IX Item "-only-black"
312 Include only moves for black in the book.
313 .IP "\fB\-uniform\fR" 4
314 .IX Item "-uniform"
315 Set all weights to 1. In other words, all moves will be selected with 
316 equal probability.
317 .PP
318 When invoked
319 as
320 .SS "polyglot merge-book"
321 .IX Subsection "polyglot merge-book"
322 PolyGlot supports the following options
323 .IP "\fB\-in1\fR" 4
324 .IX Item "-in1"
325 First input file (in PolyGlot book format).
326 .IP "\fB\-in2\fR" 4
327 .IX Item "-in2"
328 Second input file (in PolyGlot book format).
329 .IP "\fB\-out\fR (default: out.bin)" 4
330 .IX Item "-out (default: out.bin)"
331 Output file (in PolyGlot book format).
332 .PP
333 Input files are not symmetrical, \*(L"in1\*(R" has priority over \*(L"in2\*(R". In other
334 words when a position occurs both in \*(L"in1\*(R" and \*(L"in2\*(R" only the
335 moves and weights from \*(L"in1\*(R" will be retained in \*(L"out\*(R".
336 .PP
337 When invoked
338 as
339 .SS "polyglot dump-book"
340 .IX Subsection "polyglot dump-book"
341 PolyGlot supports the following options
342 .IP "\fB\-bin\fR (default: book.bin)" 4
343 .IX Item "-bin (default: book.bin)"
344 Input file in PolyGlot book format.
345 .IP "\fB\-color\fR" 4
346 .IX Item "-color"
347 The color for whom to generate the lines.
348 .IP "\fB\-out\fR (default: book_<color>.txt)" 4
349 .IX Item "-out (default: book_<color>.txt)"
350 The name of the output file.
351 .PP
352 When invoked
353 as
354 .SS "polyglot info-book"
355 .IX Subsection "polyglot info-book"
356 PolyGlot supports the following options
357 .IP "\fB\-bin\fR (default: book.bin)" 4
358 .IX Item "-bin (default: book.bin)"
359 Input file in PolyGlot book format.
360 .IP "\fB\-exact\fR" 4
361 .IX Item "-exact"
362 Attempt to count the provably unreachable positions among the isolated ones.
363 Note that this takes a very long time.
364 .PP
365 When invoked as
366 .SS "polyglot epd-test"
367 .IX Subsection "polyglot epd-test"
368 (possibly with a config file as first argument) PolyGlot supports
369 besides the generic options described above the following additional
370 options.
371 .IP "\fB\-max\-depth\fR (default: 63)" 4
372 .IX Item "-max-depth (default: 63)"
373 Unconditionally stop the search when this depth has
374 been reached.
375 .IP "\fB\-max\-time\fR (default: 5.0)" 4
376 .IX Item "-max-time (default: 5.0)"
377 Unconditionally stop the seach after this amount of time.
378 .IP "\fB\-depth\-delta\fR (default: 3)" 4
379 .IX Item "-depth-delta (default: 3)"
380 Stop the search if the solution as been found and the best move has
381 been constant for this many depths, on condition that the mininal
382 depth and minimal time have been reached.
383 .IP "\fB\-min\-depth\fR (default: 8)" 4
384 .IX Item "-min-depth (default: 8)"
385 Minimal search depth when the search is stopped using \*(L"\-depth\-delta\*(R".
386 .IP "\fB\-min\-time\fR (default: 1.0)" 4
387 .IX Item "-min-time (default: 1.0)"
388 Minimal search time when the search is stopped using \*(L"\-depth\-delta\*(R".
389 .PP
390 When invoked as
391 .SS "polyglot perft"
392 .IX Subsection "polyglot perft"
393 PolyGlot supports the following
394 options
395 .IP "\fB\-fen\fR (default: starting position)" 4
396 .IX Item "-fen (default: starting position)"
397 Fen at which to start searching.
398 .IP "\fB\-max\-depth\fR (default: 1)" 4
399 .IX Item "-max-depth (default: 1)"
400 Maximum depth to search.
401 .SH "CONFIG FILE FORMAT"
402 .IX Header "CONFIG FILE FORMAT"
403 There should be a different config file for each engine.
404 .PP
405 The config file is in the traditional \s-1INI\s0 format.
406 .PP
407 .Vb 6
408 \&    [PolyGLot]
409 \&    option = value
410 \&    ...
411 \&    [Engine]
412 \&    option = value
413 \&    ...
414 .Ve
415 .PP
416 The characters \*(L"#\*(R" and \*(L";\*(R" serve as comment characters.
417 .PP
418 By default initial and final white space is stripped from option
419 values. If you want to avoid this, or if you want use one of
420 the comment characters # or ; in option values (such as for NalimovPath), 
421 enclose the value in quotes.
422 .SS "[PolyGlot] section"
423 .IX Subsection "[PolyGlot] section"
424 This section is used by PolyGlot only.  The engine is unaware of these
425 options.  The list of available options is detailed below.
426 .IP "\fBEngineName\fR (default: \s-1UCI\s0 name)" 4
427 .IX Item "EngineName (default: UCI name)"
428 This is the name that will appear in the \s-1GUI\s0.  It is
429 cosmetic only.  You can use different names for tweaked versions of
430 the same engine.
431 .ie n .IP "\fBEngineDir\fR (default: ""."")" 4
432 .el .IP "\fBEngineDir\fR (default: ``.'')" 4
433 .IX Item "EngineDir (default: .)"
434 Full path of the directory where the engine is installed.  You can use
435 \&\*(L".\*(R" (without the quotes) if you know that PolyGlot will be launched in
436 the engine directory or the engine is in the \*(L"path\*(R" and does not need
437 any data file.
438 .IP "\fBEngineCommand\fR" 4
439 .IX Item "EngineCommand"
440 Put here the name of the engine executable file.  You can also add
441 command-line arguments.  Path searching is used and the current
442 directory will be \*(L"EngineDir\*(R".
443 .IP "\fBLog\fR (default: false)" 4
444 .IX Item "Log (default: false)"
445 Whether PolyGlot should log all transactions with the interface and
446 the engine.  This should be necessary only to locate problems.
447 .IP "\fBLogFile\fR (default: polyglot.log)" 4
448 .IX Item "LogFile (default: polyglot.log)"
449 The name of the log file.  Note that it is put where PolyGlot was
450 launched from, not into the engine directory.
451 .Sp
452 \&\s-1WARNING:\s0 Log files are not cleared between sessions, and can become
453 very large.  It is safe to remove them though.
454 .IP "\fBResign\fR (default: false)" 4
455 .IX Item "Resign (default: false)"
456 Set this to \*(L"true\*(R" if you want PolyGlot to resign on behalf of the
457 engine.
458 .Sp
459 \&\s-1NOTE:\s0 Some engines display buggy scores from time to time although the
460 best move is correct.  Use this option only if you know what you are
461 doing (e.g. you always check the final position of games).
462 .IP "\fBResignMoves\fR (default: 3)" 4
463 .IX Item "ResignMoves (default: 3)"
464 Number of consecutive moves with \*(L"resign\*(R" score (see below) before
465 PolyGlot resigns for the engine.  Positions with only one legal move
466 are ignored.
467 .IP "\fBResignScore\fR (default: 600)" 4
468 .IX Item "ResignScore (default: 600)"
469 This is the score in centipawns that will trigger resign \*(L"counting\*(R".
470 .IP "\fBShowPonder\fR (default: true)" 4
471 .IX Item "ShowPonder (default: true)"
472 Show search information during engine pondering.  Turning this off
473 might be better for interactive use in some interfaces.
474 .IP "\fBScoreWhite\fR (default: true)" 4
475 .IX Item "ScoreWhite (default: true)"
476 Report score from white's point of view in xboard mode.
477 .IP "\fBKibitzMove\fR (default: false)" 4
478 .IX Item "KibitzMove (default: false)"
479 Whether to kibitz when playing a move.
480 .IP "\fBKibitzPV\fR (default: false)" 4
481 .IX Item "KibitzPV (default: false)"
482 Whether to kibitz when the \s-1PV\s0 is changed (new iteration or new best move).
483 .ie n .IP "\fBKibitzCommand\fR (default: ""tellall"")" 4
484 .el .IP "\fBKibitzCommand\fR (default: ``tellall'')" 4
485 .IX Item "KibitzCommand (default: tellall)"
486 xboard command to use for kibitzing, normally \*(L"tellall\*(R" for kibitzing
487 or \*(L"tellothers\*(R" for whispering.
488 .IP "\fBKibitzDelay\fR (default: 5)" 4
489 .IX Item "KibitzDelay (default: 5)"
490 How many seconds to wait before starting kibitzing.  This has an
491 effect only if \*(L"KibitzPV\*(R" is selected, move kibitzes are always sent
492 regardless of the delay.
493 .IP "\fBKibitzInterval\fR (default: 0)" 4
494 .IX Item "KibitzInterval (default: 0)"
495 This is another form of throttling. PolyGlot will usually wait this
496 many seconds before doing the next kibitz.
497 .IP "\fB\s-1UCI\s0\fR (default: false)" 4
498 .IX Item "UCI (default: false)"
499 If true PolyGlot will not understand xboard commands.
500 .IP "\fBMateScore\fR (default: 10000)" 4
501 .IX Item "MateScore (default: 10000)"
502 Mate score reported to \s-1GUI\s0 when in xboard mode.
503 .IP "\fBBook\fR (default: false)" 4
504 .IX Item "Book (default: false)"
505 Indicates whether a PolyGlot book should be used.  This has no effect
506 on the engine own book (which can be controlled with the \s-1UCI\s0 option
507 \&\*(L"OwnBook\*(R" in the [Engine] section).  In particular, it is possible to
508 use both a PolyGlot book and an engine book.  In that case, the engine
509 book will be used whenever PolyGlot is out of book.  Remember that
510 PolyGlot is unaware of whether the engine is itself using a book or
511 not.
512 .IP "\fBBookFile\fR (default: book.bin)" 4
513 .IX Item "BookFile (default: book.bin)"
514 The name of the (binary) book file.  Note that PolyGlot will look for
515 it in the directory it was launched from, not in the engine directory.
516 Of course, full path can be used in which case the current directory
517 does not matter.
518 .IP "\fBBookRandom\fR (default: true)" 4
519 .IX Item "BookRandom (default: true)"
520 Select moves according to their weights in the book. If false the move
521 with the highest weight is selected.
522 .IP "\fBBookLearn\fR (default: false)" 4
523 .IX Item "BookLearn (default: false)"
524 Store learning information in the book (which must be writable). Currently
525 no engine actually uses this information.
526 .IP "\fBBookDepth\fR (default: 256)" 4
527 .IX Item "BookDepth (default: 256)"
528 Stop using the book after this number of moves.
529 .IP "\fBBookTreshold\fR (default: 5)" 4
530 .IX Item "BookTreshold (default: 5)"
531 Do not play moves with a weight (probability) lower than this (in per mil).
532 .IP "\fBUseNice\fR (default: false)" 4
533 .IX Item "UseNice (default: false)"
534 Run the engine at nice level 5, or \*(L"NiceValue\*(R" if it set.  On some
535 operating systems it may be necessary to run the engine at lower
536 priority for it to be responsive to commands from PolyGlot while
537 searching.
538 .IP "\fBNiceValue\fR (default: 5)" 4
539 .IX Item "NiceValue (default: 5)"
540 Nice levels go from \-20 to 20 with 20 being the lowest priority.
541 On Unix only root can set negative nice levels. On Windows the standard
542 Win32 priority levels are mapped in a sensible way to Unix nice levels.
543 .IP "\fBAffinity\fR (default: \-1)" 4
544 .IX Item "Affinity (default: -1)"
545 This a bit vector in which each bit represents the processors that a
546 process is allowed to run on. This option works only on Windows.
547 .IP "\fBPersist\fR (default: true)" 4
548 .IX Item "Persist (default: true)"
549 If true then PolyGlot will implement persistence by loading options
550 from an additional \s-1INI\s0 file whose name is by default derived from the
551 engine name. At exit PolyGlot will also save its options to this \s-1INI\s0
552 file.
553 .IP "\fBPersistFile\fR (default: <EngineName>.ini)" 4
554 .IX Item "PersistFile (default: <EngineName>.ini)"
555 The name of the file from which to take the additional options.  It is
556 probably best to stick with the default. You can safely edit this
557 file, or delete it to restore the default options.
558 .ie n .IP "\fBPersistDir\fR (default: $HOME/.polyglot on Linux; "".\ePolyglot Settings"" on Windows)" 4
559 .el .IP "\fBPersistDir\fR (default: \f(CW$HOME\fR/.polyglot on Linux; ``.\ePolyglot Settings'' on Windows)" 4
560 .IX Item "PersistDir (default: $HOME/.polyglot on Linux; .Polyglot Settings on Windows)"
561 The directory where the PersistFile is stored.
562 .SS "Work arounds"
563 .IX Subsection "Work arounds"
564 Work arounds are identical to options except that they should be used
565 only when necessary.  Their purpose is to try to hide problems with
566 various software (not just engines).
567 .PP
568 \&\s-1IMPORTANT:\s0 Any of these work arounds might be removed in future
569 versions of PolyGlot.  You are strongly recommended to contact the
570 author of faulty software and truly fix the problem.
571 .PP
572 PolyGlot supports the following work arounds:
573 .IP "\fBUCIVersion\fR (default: 2)" 4
574 .IX Item "UCIVersion (default: 2)"
575 The default value of 2 corresponds to \s-1UCI+\s0.  Use 1 to select plain
576 \&\s-1UCI\s0 for engines that have problems with \s-1UCI+\s0.
577 .IP "\fBCanPonder\fR (default: false)" 4
578 .IX Item "CanPonder (default: false)"
579 PolyGlot now conforms to the documented \s-1UCI\s0 behaviour: the engine will
580 be allowed to ponder only if it (the engine) declares the \*(L"Ponder\*(R" \s-1UCI\s0
581 option.  However some engines which can actually ponder do not declare
582 the option.  This work around lets PolyGlot know that they can ponder.
583 .IP "\fBSyncStop\fR (default: false)" 4
584 .IX Item "SyncStop (default: false)"
585 When a ponder miss occurs, Polyglot interrupts the engine and
586 \&\s-1IMMEDIATELY\s0 launches a new search.  While there should be no problem
587 with this, some engines seem confused and corrupt their search board.
588 \&\*(L"SyncStop\*(R" forces PolyGlot to wait for the (now useless) ponder search
589 to finish before launching the new search.
590 .IP "\fBPromoteWorkAround\fR (default: false)" 4
591 .IX Item "PromoteWorkAround (default: false)"
592 Some engines do not specify a promotion piece, e.g. they send \*(L"e7e8\*(R"
593 instead of the correct \*(L"e7e8q\*(R".  This work around enables the
594 incorrect form (and of course promotes into a queen).
595 .IP "\fBRepeatPV\fR (default: true)" 4
596 .IX Item "RepeatPV (default: true)"
597 When true, PolyGlot repeats the last pv string (which also contains
598 score,depth and time usage) it got from the engine. Some engines
599 however do not send a new pv string just before sending the move.
600 In that case the output of PolyGlot would be inconsistent. 
601 When RepeatPV is false PolyGlot does not repeat the last pv string.
602 Due to the way kibitzing is implemented, KibitzMove is disabled in that case.
603 .IP "\fBWbWorkArounds\fR (default: true)" 4
604 .IX Item "WbWorkArounds (default: true)"
605 The intention of these options is to provide work arounds for
606 xboard/winboard bugs should they arise.  This one decapitalizes
607 the word Draw in options that contain this word. Some versions of
608 xboard/winboard contain a bug which causes such options to be
609 interpreted as draw claims by the engine.
610 .Sp
611 Engines that send options with \*(L"Draw\*(R" in their name are Rybka and \s-1HIARCS\s0.
612 .IP "\fBWbWorkArounds2\fR (default: false)" 4
613 .IX Item "WbWorkArounds2 (default: false)"
614 Old version of Winboard clear the engine output window at depth 1. With this
615 work around \s-1PG\s0 will send info lines at depth >=2. This may or may not improve
616 the display.
617 .SS "[Engine] section"
618 .IX Subsection "[Engine] section"
619 This section contains engine \s-1UCI\s0 options.  PolyGlot does not
620 understand them, but sends the information to the engine at startup
621 (converted to \s-1UCI\s0 form).  You can add any \s-1UCI\s0 option that makes sense
622 to the engine (not just the common options about hash-table size and
623 tablebases).
624 .PP
625 \&\s-1NOTE:\s0 use \s-1INI\s0 syntax, not \s-1UCI\s0.  For example \*(L"OwnBook = true\*(R" is
626 correct.  It will be replaced by PolyGlot with \*(L"setoption name OwnBook
627 value true\*(R" at engine startup.
628 .PP
629 Standard \s-1UCI\s0 options are
630 .PP
631 .Vb 4
632 \&    Hash 
633 \&    NalimovPath
634 \&    NalimovCache
635 \&    OwnBook
636 .Ve
637 .PP
638 Hidden options like \*(L"Ponder\*(R" or \*(L"UCI_xxx\*(R" are automatic
639 and should not be put in an \s-1INI\s0 file.
640 .PP
641 The other options are engine-specific.  Check their name using a \s-1UCI\s0
642 \&\s-1GUI\s0 or launch the engine in a console and type \*(L"uci\*(R".
643 .SH "EXAMPLES"
644 .IX Header "EXAMPLES"
645 Running the \s-1UCI\s0 engine \*(L"fruit\*(R" under xboard 4.3.15 and later (this invokes PolyGlot internally).
646 .PP
647 .Vb 1
648 \&    xboard \-fcp fruit \-fUCI
649 .Ve
650 .PP
651 An explicit command line for using the \s-1UCI\s0 engine \*(L"fruit\*(R" with 128M hash in xboard with logging enabled (this also works on xboard 4.2.7).
652 .PP
653 .Vb 1
654 \&    xboard \-fcp "polyglot \-noini \-log \-ec fruit \-hash 128"
655 .Ve
656 .PP
657 The equivalent config file would be:
658 .PP
659 .Vb 5
660 \&    [PolyGlot]
661 \&    EngineCommand = fruit
662 \&    Log = true
663 \&    [Engine]
664 \&    Hash=128
665 .Ve
666 .PP
667 Compile \*(L"games.pgn\*(R" into a book \*(L"book.bin\*(R" retaining all lines of at
668 most 30 plies.
669 .PP
670 .Vb 1
671 \&    polyglot make\-book \-pgn games.pgn \-bin book.bin \-max\-ply 30
672 .Ve
673 .PP
674 Merge books \*(L"w1.bin\*(R" and \*(L"w2.bin\*(R" into a book \*(L"w.bin\*(R".
675 .PP
676 .Vb 1
677 \&    polyglot merge\-book \-in1 w1.bin \-in2 w2.bin \-out w.bin
678 .Ve
679 .PP
680 Inspect lines for white in \*(L"w.bin\*(R"
681 .PP
682 .Vb 1
683 \&    polyglot dump\-book \-bin w.bin \-color white \-out w_white.txt
684 .Ve
685 .PP
686 Test epd file \*(L"test.epd\*(R" with a (maximum) search time of 7 minutes per position
687 .PP
688 .Vb 1
689 \&    polyglot epd\-test \-epd test.epd \-max\-time 420
690 .Ve
691 .SH "EXIT STATUS"
692 .IX Header "EXIT STATUS"
693 PolyGlot always returns 0 on exit.
694 .SH "AUTHORS"
695 .IX Header "AUTHORS"
696 Main author: Fabien Letouzey<fabien_letouzey(at)hotmail.com>
697 .PP
698 Native Windows port:  Huang Chen<webmaster@elephantbase.net> (\*(L"Morning Yellow\*(R")
699 .PP
700 Various enhancements: Fonzy Bleumers<match(at)geenvis.net>
701 .PP
702 \&\s-1UCI\s0 port, option persistence and new \s-1WB\s0 protocol: Michel Van den Bergh
703 <michel.vandenbergh(at)uhasselt.be>
704 .SH "SEE ALSO"
705 .IX Header "SEE ALSO"
706 \&\fIxboard\fR\|(6)