version 1.4.36b
[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-11" "" ""
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]
142 .PP
143 polyglot \-ec engine
144 .PP
145 polyglot make-book [\-pgn inputfile] [\-bin outputfile] [\-max\-ply ply] [\-min\-game games] [\-min\-score score] [\-only\-white] [\-only\-black] [\-uniform]
146 .PP
147 polyglot merge-book \-in1 inputfile1 \-in2 inputfile2 [\-out outputfile]
148 .PP
149 polyglot info-book [\-bin inputfile] [\-exact]
150 .PP
151 polyglot dump-book [\-bin inputfile] \-color color [\-out outputfile]
152 .PP
153 polyglot [configfile] epd-test [\-epd inputfile] [\-min\-depth depth] [\-max\-depth depth] [\-max\-time time] [\-depth\-delta delta] 
154 .PP
155 polyglot perft [\-fen fen] [\-max\-depth depth]
156 .SH "DESCRIPTION"
157 .IX Header "DESCRIPTION"
158 .Sh "PolyGlot as adapter and book engine"
159 .IX Subsection "PolyGlot as adapter and book engine"
160 PolyGlot is a \*(L"\s-1UCI\s0 adapter\*(R".  It connects a \s-1GUI\s0 interface (such as
161 XBoard, Winboard, Arena or Chessbase) to a \s-1UCI\s0 chess engine.
162 .PP
163 By specifying an opening book (in PolyGlot book format) chess engines can
164 transparently use such books.
165 .PP
166 PolyGlot understands the two main \s-1GUI\s0 protocols: \s-1UCI\s0 and
167 xboard. Normally the protocol will be auto detected but this can be
168 overridden in the configuration file.
169 .PP
170 In xboard mode PolyGlot fully translates between the xboard and \s-1UCI\s0 protocols.
171 In addition it tries to solve known problems with other adapters.
172 For instance, it detects and reports draws by fifty-move rule,
173 repetition, etc ... It also supports Chess960.
174 .PP
175 When in \s-1UCI\s0 mode PolyGlot mostly passes commands from the \s-1GUI\s0
176 to the engine and vice versa, except that it will play book moves on
177 behalf of the engine when the occasion arises.
178 .PP
179 The engine options are exported as \s-1UCI\s0 options in \s-1UCI\s0
180 mode and as \*(L"feature option=\*(R" commands in xboard mode. The latter form
181 an extension of the xboard protocol as defined by H.G. Muller.
182 .PP
183 Options which normally appear in the [PolyGlot] section of the
184 config file (see below) are exported as options with their name prefixed
185 by \*(L"Polyglot\*(R". This makes it easy to filter them in the \s-1GUI\s0.
186 .PP
187 \&\s-1NOTE:\s0 Not all options are exported, only those that make sense in the
188 given mode.
189 .Sh "Book making utilities"
190 .IX Subsection "Book making utilities"
191 PolyGlot supports the \*(L"PolyGlot opening book format\*(R". This is the
192 defacto standard non-proprietary opening book format. It is fully documented
193 here
194 .PP
195 http://alpha.uhasselt.be/Research/Algebra/Toga/book_format.html
196 .PP
197 Roughly speaking a PolyGlot opening book is a collection of triples
198 (position, move, weight). A \*(L"position\*(R" is represented by a 64\-bit
199 Zobrist hash key. The weight is proportional to the probability the move should
200 be played. 
201 .PP
202 Other opening book formats such as ChessBase's .ctg format and Arena's
203 \&.abk format are undocumented and proprietary. They can only be used 
204 by their own GUIs. 
205 .PP
206 PolyGlot can compile a pgn file into a binary PolyGlot book and furthermore
207 it can merge two such binary books into a third one.
208 .PP
209 PolyGlot can also extract some useful information from PolyGlot books. The utility
210 \&\*(L"dump\-book\*(R" dumps the \*(L"lines\*(R" in a book for a given color. By definition
211 a line is a sequence of moves (from the starting position) in which
212 the given color makes only book moves and the other color makes 
213 arbitrary moves (i.e. not necessarily book moves).
214 .PP
215 Since a PolyGlot book is built up from positions and not lines there
216 may be (and there usually are) many positions in the book that are not
217 on a \*(L"line\*(R" as defined in the previous paragraph. It is convenient
218 to call such positions \*(L"isolated\*(R" positions. The utility \*(L"info\-book\*(R"
219 counts such isolated positions.
220 .PP
221 Some of the isolated positions are provably unreachable and they
222 could in principle be deleted from the book. For example if a book
223 contains only the move \*(L"e4\*(R" in the starting position but also the
224 position after \*(L"d4 d5\*(R" then this last position is provably unreachable
225 since it requires white to make a non-book move when a book move is
226 available. Such situations arise frequently from the priority rules
227 in merging books.
228 .PP
229 Unfortunately not all isolated positions are provably unreachable and
230 it is difficult to identify the latter. If invoked with \*(L"\-exact\*(R" the
231 utility info-book will attempt to count the isolated positions which
232 require a player to make a non-book move when a book move is available.
233 Due to the possibility of transpositions this is not a fool proof method.
234 .Sh "Epd test mode"
235 .IX Subsection "Epd test mode"
236 In epd test mode, PolyGlot will search positions in an epd file and
237 record the number of times the right best move was found.  The
238 arguments specify when to stop the search in any given position.
239 .Sh "Perft counts"
240 .IX Subsection "Perft counts"
241 A perft count is the number of legal move sequence in a given position
242 up to a given depth. PolyGlot can perform such perft counts. It
243 is however much slower than other more dedicated programs.
244 .SH "OPTIONS"
245 .IX Header "OPTIONS"
246 When invoked without options or with a config file as argument PolyGlot
247 acts as an adapter. The config file format is documented below.  The
248 default config file is \*(L"polyglot.ini\*(R".
249 .PP
250 When invoked as
251 .Sh "polyglot \-ec engine"
252 .IX Subsection "polyglot -ec engine"
253 PolyGlot simply starts \*(L"engine\*(R" and acts as an adapter. No config file
254 is used and thus it is expected that all properties will be set by the
255 \&\s-1GUI\s0. 
256 .PP
257 When invoked as
258 .Sh "polyglot make-book"
259 .IX Subsection "polyglot make-book"
260 PolyGlot supports the following options
261 .ie n .IP "\fB\-pgn\fR (default: ""book.pgn"")" 4
262 .el .IP "\fB\-pgn\fR (default: ``book.pgn'')" 4
263 .IX Item "-pgn (default: book.pgn)"
264 Input file in pgn format. 
265 .ie n .IP "\fB\-bin\fR (default: ""book.bin"")" 4
266 .el .IP "\fB\-bin\fR (default: ``book.bin'')" 4
267 .IX Item "-bin (default: book.bin)"
268 Output file in PolyGlot format. 
269 .IP "\fB\-max\-ply\fR (default: 1024)" 4
270 .IX Item "-max-ply (default: 1024)"
271 Specifies the maximum ply-depth of lines included in the book.
272 .IP "\fB\-min\-game\fR (default: 3)" 4
273 .IX Item "-min-game (default: 3)"
274 Specifies the minimum number of games that have to contain this move for it to be included in the book.
275 .IP "\fB\-min\-score\fR (default: 0.0)" 4
276 .IX Item "-min-score (default: 0.0)"
277 Specifies the minimum score (or weight) this move should have received for 
278 it to  be included in the book. The score is 2*(wins)+(draws), globally scaled
279 to fit into 16 bits. 
280 .IP "\fB\-only\-white\fR" 4
281 .IX Item "-only-white"
282 Include only moves for white in the book.
283 .IP "\fB\-only\-black\fR" 4
284 .IX Item "-only-black"
285 Include only moves for black in the book.
286 .IP "\fB\-uniform\fR" 4
287 .IX Item "-uniform"
288 Set all weights to 1. In other words, all moves will be selected with 
289 equal probability. 
290 .PP
291 When invoked
292 as
293 .Sh "polyglot merge-book"
294 .IX Subsection "polyglot merge-book"
295 PolyGlot supports the following options
296 .IP "\fB\-in1\fR" 4
297 .IX Item "-in1"
298 First input file (in PolyGlot book format).
299 .IP "\fB\-in2\fR" 4
300 .IX Item "-in2"
301 Second input file (in PolyGlot book format).
302 .IP "\fB\-out\fR (default: out.bin)" 4
303 .IX Item "-out (default: out.bin)"
304 Output file (in PolyGlot book format).
305 .PP
306 Input files are not symmetrical, \*(L"in1\*(R" has priority over \*(L"in2\*(R". In other
307 words when a position occurs both in \*(L"in1\*(R" and \*(L"in2\*(R" only the
308 moves and weights from \*(L"in1\*(R" will be retained in \*(L"out\*(R".
309 .PP
310 When invoked
311 as
312 .Sh "polyglot dump-book"
313 .IX Subsection "polyglot dump-book"
314 PolyGlot supports the following options
315 .IP "\fB\-bin\fR (default: book.bin)" 4
316 .IX Item "-bin (default: book.bin)"
317 Input file in PolyGlot book format.
318 .IP "\fB\-color\fR" 4
319 .IX Item "-color"
320 The color for whom to generate the lines.
321 .IP "\fB\-out\fR (default: book_<color>.txt)" 4
322 .IX Item "-out (default: book_<color>.txt)"
323 The name of the output file.
324 .PP
325 When invoked
326 as
327 .Sh "polyglot info-book"
328 .IX Subsection "polyglot info-book"
329 PolyGlot supports the following options
330 .IP "\fB\-bin\fR (default: book.bin)" 4
331 .IX Item "-bin (default: book.bin)"
332 Input file in PolyGlot book format.
333 .IP "\fB\-exact\fR" 4
334 .IX Item "-exact"
335 Attempt to count the provably unreachable positions among the isolated ones.
336 Note that this takes a very long time. 
337 .PP
338 When invoked as
339 .Sh "polyglot epd-test"
340 .IX Subsection "polyglot epd-test"
341 (possibly with a config file as first argument) PolyGlot supports the following
342 options
343 .IP "\fB\-max\-depth\fR (default: 63)" 4
344 .IX Item "-max-depth (default: 63)"
345 Unconditionally stop the search when this depth has
346 been reached.
347 .IP "\fB\-max\-time\fR (default: 5.0)" 4
348 .IX Item "-max-time (default: 5.0)"
349 Unconditionally stop the seach after this amount of time.
350 .IP "\fB\-depth\-delta\fR (default: 3)" 4
351 .IX Item "-depth-delta (default: 3)"
352 Stop the search if the solution as been found and the best move has
353 been constant for this many depths, on condition that the mininal
354 depth and minimal time have been reached.
355 .IP "\fB\-min\-depth\fR (default: 8)" 4
356 .IX Item "-min-depth (default: 8)"
357 Minimal search depth when the search is stopped using \*(L"\-depth\-delta\*(R".
358 .IP "\fB\-min\-time\fR (default: 1.0)" 4
359 .IX Item "-min-time (default: 1.0)"
360 Minimal search time when the search is stopped using \*(L"\-depth\-delta\*(R".
361 .PP
362 When invoked as
363 .Sh "polyglot perft"
364 .IX Subsection "polyglot perft"
365 PolyGlot supports the following
366 options
367 .IP "\fB\-fen\fR (default: starting position)" 4
368 .IX Item "-fen (default: starting position)"
369 Fen at which to start searching.
370 .IP "\fB\-max\-depth\fR (default: 1)" 4
371 .IX Item "-max-depth (default: 1)"
372 Maximum depth to search.
373 .SH "CONFIG FILE FORMAT"
374 .IX Header "CONFIG FILE FORMAT"
375 There should be a different config file for each engine.  
376 .PP
377 The config file is in the traditional \s-1INI\s0 format.  
378 .PP
379 .Vb 6
380 \&    [PolyGLot]
381 \&    option = value
382 \&    ...
383 \&    [Engine]
384 \&    option = value
385 \&    ...
386 .Ve
387 .PP
388 The characters \*(L"#\*(R" and \*(L";\*(R" serve as comment characters. 
389 .PP
390 \&\s-1NOTE:\s0 There can be spaces in option names or values.  Do not use
391 quotes. Boolean values are written as \*(L"true\*(R" or \*(L"false\*(R". 
392 .Sh "[PolyGlot] section"
393 .IX Subsection "[PolyGlot] section"
394 This section is used by PolyGlot only.  The engine is unaware of these
395 options.  The list of available options is detailed below.
396 .IP "\fBEngineName\fR (default: \s-1UCI\s0 name)" 4
397 .IX Item "EngineName (default: UCI name)"
398 This is the name that will appear in the \s-1GUI\s0.  It is
399 cosmetic only.  You can use different names for tweaked versions of
400 the same engine.
401 .ie n .IP "\fBEngineDir\fR (default: ""."")" 4
402 .el .IP "\fBEngineDir\fR (default: ``.'')" 4
403 .IX Item "EngineDir (default: .)"
404 Full path of the directory where the engine is installed.  You can use
405 \&\*(L".\*(R" (without the quotes) if you know that PolyGlot will be launched in
406 the engine directory or the engine is in the \*(L"path\*(R" and does not need
407 any data file.
408 .IP "\fBEngineCommand\fR" 4
409 .IX Item "EngineCommand"
410 Put here the name of the engine executable file.  You can also add
411 command-line arguments.  Path searching is used and the current
412 directory will be \*(L"EngineDir\*(R".
413 .IP "\fBLog\fR (default: false)" 4
414 .IX Item "Log (default: false)"
415 Whether PolyGlot should log all transactions with the interface and
416 the engine.  This should be necessary only to locate problems.
417 .IP "\fBLogFile\fR (default: polyglot.log)" 4
418 .IX Item "LogFile (default: polyglot.log)"
419 The name of the log file.  Note that it is put where PolyGlot was
420 launched from, not into the engine directory.
421 .Sp
422 \&\s-1WARNING:\s0 Log files are not cleared between sessions, and can become
423 very large.  It is safe to remove them though.
424 .IP "\fBResign\fR (default: false)" 4
425 .IX Item "Resign (default: false)"
426 Set this to \*(L"true\*(R" if you want PolyGlot to resign on behalf of the
427 engine.
428 .Sp
429 \&\s-1NOTE:\s0 Some engines display buggy scores from time to time although the
430 best move is correct.  Use this option only if you know what you are
431 doing (e.g. you always check the final position of games).
432 .IP "\fBResignMoves\fR (default: 3)" 4
433 .IX Item "ResignMoves (default: 3)"
434 Number of consecutive moves with \*(L"resign\*(R" score (see below) before
435 PolyGlot resigns for the engine.  Positions with only one legal move
436 are ignored.
437 .IP "\fBResignScore\fR (default: 600)" 4
438 .IX Item "ResignScore (default: 600)"
439 This is the score in centipawns that will trigger resign \*(L"counting\*(R".
440 .IP "\fBShowPonder\fR (default: true)" 4
441 .IX Item "ShowPonder (default: true)"
442 Show search information during engine pondering.  Turning this off
443 might be better for interactive use in some interfaces.
444 .IP "\fBScoreWhite\fR (default: true)" 4
445 .IX Item "ScoreWhite (default: true)"
446 Report score from white's point of view in xboard mode.
447 .IP "\fBKibitzMove\fR (default: false)" 4
448 .IX Item "KibitzMove (default: false)"
449 Whether to kibitz when playing a move.
450 .IP "\fBKibitzPV\fR (default: false)" 4
451 .IX Item "KibitzPV (default: false)"
452 Whether to kibitz when the \s-1PV\s0 is changed (new iteration or new best move).
453 .ie n .IP "\fBKibitzCommand\fR (default: ""tellall"")" 4
454 .el .IP "\fBKibitzCommand\fR (default: ``tellall'')" 4
455 .IX Item "KibitzCommand (default: tellall)"
456 xboard command to use for kibitzing, normally \*(L"tellall\*(R" for kibitzing
457 or \*(L"tellothers\*(R" for whispering.
458 .IP "\fBKibitzDelay\fR (default: 5)" 4
459 .IX Item "KibitzDelay (default: 5)"
460 How many seconds to wait before starting kibitzing.  This has an
461 effect only if \*(L"KibitzPV\*(R" is selected, move kibitzes are always sent
462 regardless of the delay.
463 .IP "\fBKibitzInterval\fR (default: 0)" 4
464 .IX Item "KibitzInterval (default: 0)"
465 This is another form of throttling. PolyGlot will usually wait this
466 many seconds before doing the next kibitz. 
467 .IP "\fB\s-1UCI\s0\fR (default: false)" 4
468 .IX Item "UCI (default: false)"
469 If true PolyGlot will not understand xboard commands. 
470 .IP "\fBChess960\fR (default: false)" 4
471 .IX Item "Chess960 (default: false)"
472 Play Chess960 (also called Fischer Random Chess or \s-1FRC\s0),
473 .IP "\fBMateScore\fR (default: 10000)" 4
474 .IX Item "MateScore (default: 10000)"
475 Mate score reported to \s-1GUI\s0 when in xboard mode. 
476 .IP "\fBBook\fR (default: false)" 4
477 .IX Item "Book (default: false)"
478 Indicates whether a PolyGlot book should be used.  This has no effect
479 on the engine own book (which can be controlled with the \s-1UCI\s0 option
480 \&\*(L"OwnBook\*(R" in the [Engine] section).  In particular, it is possible to
481 use both a PolyGlot book and an engine book.  In that case, the engine
482 book will be used whenever PolyGlot is out of book.  Remember that
483 PolyGlot is unaware of whether the engine is itself using a book or
484 not.
485 .IP "\fBBookFile\fR (default: book.bin)" 4
486 .IX Item "BookFile (default: book.bin)"
487 The name of the (binary) book file.  Note that PolyGlot will look for
488 it in the directory it was launched from, not in the engine directory.
489 Of course, full path can be used in which case the current directory
490 does not matter.
491 .IP "\fBBookRandom\fR (default: true)" 4
492 .IX Item "BookRandom (default: true)"
493 Select moves according to their weights in the book. If false the move
494 with the highest weight is selected. 
495 .IP "\fBBookLearn\fR (default: false)" 4
496 .IX Item "BookLearn (default: false)"
497 Record learning information in the opening book. Naturally this requires
498 the opening book to be writable. 
499 .IP "\fBUseNice\fR (default: false)" 4
500 .IX Item "UseNice (default: false)"
501 Run the engine at nice level 5, or \*(L"NiceValue\*(R" if it set.  On some
502 operating systems it may be necessary to run the engine at lower
503 priority for it to be responsive to commands from PolyGlot while
504 searching.
505 .IP "\fBNiceValue\fR (default: 5)" 4
506 .IX Item "NiceValue (default: 5)"
507 Nice levels go from \-20 to 20 with 20 being the lowest priority.
508 On Unix only root can set negative nice levels. On Windows the standard
509 Win32 priority levels are mapped in a sensible way to Unix nice levels.
510 .IP "\fBAffinity\fR (default: \-1)" 4
511 .IX Item "Affinity (default: -1)"
512 This a bit vector in which each bit represents the processors that a
513 process is allowed to run on. This option works only on Windows. 
514 .Sh "Work arounds"
515 .IX Subsection "Work arounds"
516 Work arounds are identical to options except that they should be used
517 only when necessary.  Their purpose is to try to hide problems with
518 various software (not just engines).  
519 .PP
520 \&\s-1IMPORTANT:\s0 Any of these work arounds might be removed in future
521 versions of PolyGlot.  You are strongly recommended to contact the
522 author of faulty software and truly fix the problem.
523 .PP
524 PolyGlot supports the following work arounds:
525 .IP "\fBUCIVersion\fR (default: 2)" 4
526 .IX Item "UCIVersion (default: 2)"
527 The default value of 2 corresponds to \s-1UCI+\s0.  Use 1 to select plain
528 \&\s-1UCI\s0 for engines that have problems with \s-1UCI+\s0.
529 .IP "\fBCanPonder\fR (default: false)" 4
530 .IX Item "CanPonder (default: false)"
531 PolyGlot now conforms to the documented \s-1UCI\s0 behaviour: the engine will
532 be allowed to ponder only if it (the engine) declares the \*(L"Ponder\*(R" \s-1UCI\s0
533 option.  However some engines which can actually ponder do not declare
534 the option.  This work around lets PolyGlot know that they can ponder.
535 .IP "\fBSyncStop\fR (default: false)" 4
536 .IX Item "SyncStop (default: false)"
537 When a ponder miss occurs, Polyglot interrupts the engine and
538 \&\s-1IMMEDIATELY\s0 launches a new search.  While there should be no problem
539 with this, some engines seem confused and corrupt their search board.
540 \&\*(L"SyncStop\*(R" forces PolyGlot to wait for the (now useless) ponder search
541 to finish before launching the new search.
542 .IP "\fBPromoteWorkAround\fR (default: false)" 4
543 .IX Item "PromoteWorkAround (default: false)"
544 Some engines do not specify a promotion piece, e.g. they send \*(L"e7e8\*(R"
545 instead of the correct \*(L"e7e8q\*(R".  This work around enables the
546 incorrect form (and of course promotes into a queen).
547 .IP "\fBRepeatPV\fR (default: true)" 4
548 .IX Item "RepeatPV (default: true)"
549 When true, PolyGlot repeats the last pv string (which also contains
550 score,depth and time usage) it got from the engine. Some engines
551 however do not send a new pv string just before sending the move.
552 In that case the output of PolyGlot would be inconsistent. 
553 When RepeatPV is false PolyGlot does not repeat the last pv string.
554 Due to the way kibitzing is implemented, KibitzMove is disabled in that case. 
555 .IP "\fBWbWorkArounds\fR (default: true)" 4
556 .IX Item "WbWorkArounds (default: true)"
557 The intention of these options is to provide work arounds for
558 xboard/winboard bugs should they arise.  This one decapitalizes
559 the word Draw in options that contain this word. Some versions of
560 xboard/winboard contain a bug which causes such options to be
561 interpreted as draw claims by the engine.
562 .Sp
563 Engines that send options with \*(L"Draw\*(R" in their name are Rybka and \s-1HIARCS\s0. 
564 .IP "\fBWbWorkArounds2\fR (default: false)" 4
565 .IX Item "WbWorkArounds2 (default: false)"
566 Old version of Winboard clear the engine output window at depth 1. With this
567 work around \s-1PG\s0 will send info lines at depth >=2. This may or may not improve
568 the display. 
569 .Sh "[Engine] section"
570 .IX Subsection "[Engine] section"
571 This section contains engine \s-1UCI\s0 options.  PolyGlot does not
572 understand them, but sends the information to the engine at startup
573 (converted to \s-1UCI\s0 form).  You can add any \s-1UCI\s0 option that makes sense
574 to the engine (not just the common options about hash-table size and
575 tablebases).
576 .PP
577 \&\s-1NOTE:\s0 use \s-1INI\s0 syntax, not \s-1UCI\s0.  For example \*(L"OwnBook = true\*(R" is
578 correct.  It will be replaced by PolyGlot with \*(L"setoption name OwnBook
579 value true\*(R" at engine startup.
580 .PP
581 Standard \s-1UCI\s0 options are 
582 .PP
583 .Vb 4
584 \&    Hash 
585 \&    NalimovPath
586 \&    NalimovCache
587 \&    OwnBook
588 .Ve
589 .PP
590 Hidden options like \*(L"Ponder\*(R" or \*(L"UCI_xxx\*(R" are automatic
591 and should not be put in an \s-1INI\s0 file.
592 .PP
593 The other options are engine\-specific.  Check their name using a \s-1UCI\s0
594 \&\s-1GUI\s0 or launch the engine in a console and type \*(L"uci\*(R".
595 .SH "EXAMPLES"
596 .IX Header "EXAMPLES"
597 Compile \*(L"games.pgn\*(R" into a book \*(L"book.bin\*(R" retaining all lines of at
598 most 30 plies.
599 .PP
600 .Vb 1
601 \&    polyglot make\-book \-pgn games.pgn \-bin book.bin \-max\-ply 30
602 .Ve
603 .PP
604 Merge books \*(L"w1.bin\*(R" and \*(L"w2.bin\*(R" into a book \*(L"w.bin\*(R".
605 .PP
606 .Vb 1
607 \&    polyglot merge\-book \-in1 w1.bin \-in2 w2.bin \-out w.bin
608 .Ve
609 .PP
610 Inspect lines for white in \*(L"w.bin\*(R"
611 .PP
612 .Vb 1
613 \&    polyglot dump\-book \-bin w.bin \-color white \-out w_white.txt
614 .Ve
615 .PP
616 Test epd file \*(L"test.epd\*(R" with a (maximum) search time of 7 minutes per position
617 .PP
618 .Vb 1
619 \&    polyglot epd\-test \-epd test.epd \-max\-time 420
620 .Ve
621 .PP
622 The command line for using the \s-1UCI\s0 engine \*(L"fruit\*(R" in a \s-1GUI\s0 which uses the
623 xboard protocol.
624 .PP
625 .Vb 1
626 \&    polyglot \-ec fruit
627 .Ve
628 .PP
629 The equivalent config file:
630 .PP
631 .Vb 3
632 \&    [PolyGlot]
633 \&    EngineCommand = fruit
634 \&    [Engine]
635 .Ve
636 .SH "EXIT STATUS"
637 .IX Header "EXIT STATUS"
638 PolyGlot always returns 0 on exit. 
639 .SH "AUTHORS"
640 .IX Header "AUTHORS"
641 Main author: Fabien Letouzey<fabien_letouzey(at)hotmail.com>
642 .PP
643 Native Windows port:  Huang Chen<webmaster@elephantbase.net> (\*(L"Morning Yellow\*(R")
644 .PP
645 Various enhancements: Fonzy Bleumers<match(at)geenvis.net>
646 .PP
647 \&\s-1UCI\s0 port: Michel Van den Bergh <michel.vandenbergh(at)uhasselt.be>
648 .SH "SEE ALSO"
649 .IX Header "SEE ALSO"
650 \&\fIxboard\fR\|(6)