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