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