1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
4 .\" ========================================================================
5 .de Sh \" Subsection heading
13 .de Sp \" Vertical space (when we can't use .PP)
17 .de Vb \" Begin verbatim text
22 .de Ve \" End verbatim text
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<>.
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
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
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.
57 . tm Index:\\$1\t\\n%\t"\\$2"
63 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
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
79 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
85 . \" simple accents for nroff and troff
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'
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 \
129 .\" ========================================================================
131 .IX Title "POLYGLOT 6"
132 .TH POLYGLOT 6 "2009-01-10" "" ""
134 PolyGlot \- Winboard protocol to UCI protocol adapter
135 \- book engine for Polyglot books
136 \- a collection of utilities for creating opening books
137 \- a utility for analyzing epd files
140 .IX Header "SYNOPSIS"
141 polyglot [configfile]
143 polyglot make-book [\-pgn inputfile] [\-bin outputfile] [\-max\-ply ply] [\-min\-game games] [\-min\-score score] [\-only\-white] [\-only\-black] [\-uniform]
145 polyglot merge-book \-in1 inputfile1 \-in2 inputfile2 [\-out outputfile]
147 polyglot [configfile] epd-test [\-epd inputfile] [\-min\-depth depth] [\-max\-depth depth] [\-max\-time time] [\-depth\-delta delta]
149 polyglot perft [\-fen fen] [\-max\-depth depth]
151 .IX Header "DESCRIPTION"
152 .Sh "PolyGlot as adapter and book engine"
153 .IX Subsection "PolyGlot as adapter and book engine"
154 PolyGlot is a \*(L"\s-1UCI\s0 adapter\*(R". It connects a \s-1GUI\s0 interface (such as
155 XBoard, Winboard, Arena or Chessbase) to a \s-1UCI\s0 chess engine.
157 By specifying an opening book (in PolyGlot book format) chess engines can
158 transparently use such books.
160 PolyGlot understands the two main \s-1GUI\s0 protocols: \s-1UCI\s0 and
161 xboard. Normally the protocol will be auto detected but this can be
162 overridden in the configuration file.
164 In xboard mode PolyGlot fully translates between the xboard and \s-1UCI\s0 protocols.
165 In addition it tries to solve known problems with other adapters.
166 For instance, it detects and reports draws by fifty-move rule,
167 repetition, etc ... It also supports Chess960.
169 When in \s-1UCI\s0 mode PolyGlot mostly passes commands from the \s-1GUI\s0
170 to the engine and vice versa, except that it will play book moves on
171 behalf of the engine when the occasion arises.
172 .Sh "Book making utilities"
173 .IX Subsection "Book making utilities"
174 PolyGlot supports the \*(L"PolyGlot opening book format\*(R". This is the
175 defacto standard non-proprietary opening book format. It is fully documented
178 http://alpha.uhasselt.be/Research/Algebra/Toga/book_format.html
180 Roughly speaking a PolyGlot opening book is a collection of triples
181 (position, move, weight). A \*(L"position\*(R" is represented by a 64\-bit
182 Zobrist hash key. The weight is proportional to the probability the move should
185 Other opening book formats such as ChessBase's .ctg format and Arena's
186 \&.abk format are undocumented and proprietary. They can only be used
189 PolyGlot can compile a pgn file into a binary PolyGlot book and furthermore
190 it can merge two such binary books into a third one.
192 .IX Subsection "Epd test mode"
193 In epd test mode, PolyGlot will search positions in an epd file and
194 record the number of times the right best move was found. The
195 arguments specify when to stop the search in any given position.
197 .IX Subsection "Perft counts"
198 A perft count is the number of legal move sequence in a given position
199 up to a given depth. PolyGlot can perform such perft counts. It
200 is however much slower than other more dedicated programs.
203 When invoked without options or with a config file as argument PolyGlot
204 acts as an adapter. The config file format is documented below. The
205 default config file is \*(L"polyglot.ini\*(R".
208 .Sh "polyglot make-book"
209 .IX Subsection "polyglot make-book"
210 PolyGlot supports the following options
211 .ie n .IP "\fB\-pgn\fR (default: ""book.pgn"")" 4
212 .el .IP "\fB\-pgn\fR (default: ``book.pgn'')" 4
213 .IX Item "-pgn (default: book.pgn)"
214 Input file in pgn format.
215 .ie n .IP "\fB\-bin\fR (default: ""book.bin"")" 4
216 .el .IP "\fB\-bin\fR (default: ``book.bin'')" 4
217 .IX Item "-bin (default: book.bin)"
218 Output file in PolyGlot format.
219 .IP "\fB\-max\-ply\fR (default: 1024)" 4
220 .IX Item "-max-ply (default: 1024)"
221 Specifies the maximum ply-depth of lines included in the book.
222 .IP "\fB\-min\-game\fR (default: 3)" 4
223 .IX Item "-min-game (default: 3)"
224 Specifies the minimum number of games that have to contain this move for it to be included in the book.
225 .IP "\fB\-min\-score\fR (default: 0.0)" 4
226 .IX Item "-min-score (default: 0.0)"
227 Specifies the minimum score (or weight) this move should have received for
228 it to be included in the book. The score is 2*(wins)+(draws), globally scaled
230 .IP "\fB\-only\-white\fR" 4
231 .IX Item "-only-white"
232 Include only moves for white in the book.
233 .IP "\fB\-only\-black\fR" 4
234 .IX Item "-only-black"
235 Include only moves for black in the book.
236 .IP "\fB\-uniform\fR" 4
238 Set all weights to 1. In other words, all moves will be selected with
243 .Sh "polyglot merge-book"
244 .IX Subsection "polyglot merge-book"
245 PolyGlot supports the following options
248 First input file (in PolyGlot book format).
251 Second input file (in PolyGlot book format).
252 .IP "\fB\-out\fR (default: out.bin)" 4
253 .IX Item "-out (default: out.bin)"
254 Output file (in PolyGlot book format).
256 Input files are not symmetrical, \*(L"in1\*(R" has priority over \*(L"in2\*(R". In other
257 words when a position occurs both in \*(L"in1\*(R" and \*(L"in2\*(R" only the
258 moves and weights from \*(L"in1\*(R" will be retained in \*(L"out\*(R".
261 .Sh "polyglot epd-test"
262 .IX Subsection "polyglot epd-test"
263 (possibly with a config file as first argument) PolyGlot supports the following
265 .IP "\fB\-max\-depth\fR (default: 63)" 4
266 .IX Item "-max-depth (default: 63)"
267 Unconditionally stop the search when this depth has
269 .IP "\fB\-max\-time\fR (default: 5.0)" 4
270 .IX Item "-max-time (default: 5.0)"
271 Unconditionally stop the seach after this amount of time.
272 .IP "\fB\-depth\-delta\fR (default: 3)" 4
273 .IX Item "-depth-delta (default: 3)"
274 Stop the search if the best move has been constant for this many depths,
275 on condition that the mininal depth and minimal time have been reached.
276 .IP "\fB\-min\-depth\fR (default: 8)" 4
277 .IX Item "-min-depth (default: 8)"
278 Minimal search depth when the search is stopped using \*(L"\-depth\-delta\*(R".
279 .IP "\fB\-min\-time\fR (default: 1.0)" 4
280 .IX Item "-min-time (default: 1.0)"
281 Minimal search time when the search is stopped using \*(L"\-depth\-delta\*(R".
285 .IX Subsection "polyglot perft"
286 PolyGlot supports the following
288 .IP "\fB\-fen\fR (default: starting position)" 4
289 .IX Item "-fen (default: starting position)"
290 Fen at which to start searching.
291 .IP "\fB\-max\-depth\fR (default: 1)" 4
292 .IX Item "-max-depth (default: 1)"
293 Maximum depth to search.
294 .SH "CONFIG FILE FORMAT"
295 .IX Header "CONFIG FILE FORMAT"
296 There should be a different config file for each engine.
298 The config file is in the traditional \s-1INI\s0 format.
309 Lines starting with \*(L"#\*(R" are ignored.
311 \&\s-1NOTE:\s0 There can be spaces in option names or values. Do not use
312 quotes. Boolean values are written as \*(L"true\*(R" or \*(L"false\*(R".
313 .Sh "[PolyGlot] section"
314 .IX Subsection "[PolyGlot] section"
315 This section is used by PolyGlot only. The engine is unaware of these
316 options. The list of available options is detailed below.
317 .IP "\fBEngineName\fR (default: \s-1UCI\s0 name)" 4
318 .IX Item "EngineName (default: UCI name)"
319 This is the name that will appear in the \s-1GUI\s0. It is
320 cosmetic only. You can use different names for tweaked versions of
322 .ie n .IP "\fBEngineDir\fR (default: ""."")" 4
323 .el .IP "\fBEngineDir\fR (default: ``.'')" 4
324 .IX Item "EngineDir (default: .)"
325 Full path of the directory where the engine is installed. You can use
326 \&\*(L".\*(R" (without the quotes) if you know that PolyGlot will be launched in
327 the engine directory or the engine is in the \*(L"path\*(R" and does not need
329 .IP "\fBEngineCommand\fR" 4
330 .IX Item "EngineCommand"
331 Put here the name of the engine executable file. You can also add
332 command-line arguments. Path searching is used and the current
333 directory will be \*(L"EngineDir\*(R".
334 .IP "\fBLog\fR (default: false)" 4
335 .IX Item "Log (default: false)"
336 Whether PolyGlot should log all transactions with the interface and
337 the engine. This should be necessary only to locate problems.
338 .IP "\fBLogFile\fR (default: polyglot.log)" 4
339 .IX Item "LogFile (default: polyglot.log)"
340 The name of the log file. Note that it is put where PolyGlot was
341 launched from, not into the engine directory.
343 \&\s-1WARNING:\s0 Log files are not cleared between sessions, and can become
344 very large. It is safe to remove them though.
345 .IP "\fBResign\fR (default: false)" 4
346 .IX Item "Resign (default: false)"
347 Set this to \*(L"true\*(R" if you want PolyGlot to resign on behalf of the
350 \&\s-1NOTE:\s0 Some engines display buggy scores from time to time although the
351 best move is correct. Use this option only if you know what you are
352 doing (e.g. you always check the final position of games).
353 .IP "\fBResignMoves\fR (default: 3)" 4
354 .IX Item "ResignMoves (default: 3)"
355 Number of consecutive moves with \*(L"resign\*(R" score (see below) before
356 PolyGlot resigns for the engine. Positions with only one legal move
358 .IP "\fBResignScore\fR (default: 600)" 4
359 .IX Item "ResignScore (default: 600)"
360 This is the score in centipawns that will trigger resign \*(L"counting\*(R".
361 .IP "\fBShowPonder\fR (default: true)" 4
362 .IX Item "ShowPonder (default: true)"
363 Show search information during engine pondering. Turning this off
364 might be better for interactive use in some interfaces.
365 .IP "\fBKibitzMove\fR (default: false)" 4
366 .IX Item "KibitzMove (default: false)"
367 Whether to kibitz when playing a move.
368 .IP "\fBKibitzPV\fR (default: false)" 4
369 .IX Item "KibitzPV (default: false)"
370 Whether to kibitz when the \s-1PV\s0 is changed (new iteration or new best move).
371 .ie n .IP "\fBKibitzCommand\fR (default: ""tellall"")" 4
372 .el .IP "\fBKibitzCommand\fR (default: ``tellall'')" 4
373 .IX Item "KibitzCommand (default: tellall)"
374 xboard command to use for kibitzing, normally \*(L"tellall\*(R" for kibitzing
375 or \*(L"tellothers\*(R" for whispering.
376 .IP "\fBKibitzDelay\fR (default: 5)" 4
377 .IX Item "KibitzDelay (default: 5)"
378 How many seconds to wait before starting kibitzing. This has an
379 effect only if \*(L"KibitzPV\*(R" is selected, move kibitzes are always sent
380 regardless of the delay.
381 .IP "\fB\s-1UCI\s0\fR (default: false)" 4
382 .IX Item "UCI (default: false)"
383 If true PolyGlot will not understand xboard commands.
384 .IP "\fBBook\fR (default: false)" 4
385 .IX Item "Book (default: false)"
386 Indicates whether a PolyGlot book should be used. This has no effect
387 on the engine own book (which can be controlled with the \s-1UCI\s0 option
388 \&\*(L"OwnBook\*(R" in the [Engine] section). In particular, it is possible to
389 use both a PolyGlot book and an engine book. In that case, the engine
390 book will be used whenever PolyGlot is out of book. Remember that
391 PolyGlot is unaware of whether the engine is itself using a book or
393 .IP "\fBChess960\fR (default: false)" 4
394 .IX Item "Chess960 (default: false)"
395 Play Chess960 (also called Fischer Random Chess or \s-1FRC\s0),
396 .IP "\fBMateScore\fR (default: 10000)" 4
397 .IX Item "MateScore (default: 10000)"
398 Mate score reported to \s-1GUI\s0 when in xboard mode.
399 .IP "\fBBookFile\fR (default: book.bin)" 4
400 .IX Item "BookFile (default: book.bin)"
401 The name of the (binary) book file. Note that PolyGlot will look for
402 it in the directory it was launched from, not in the engine directory.
403 Of course, full path can be used in which case the current directory
406 \&\s-1NOTE:\s0 When using PolyGlot with a \s-1UCI\s0 \s-1GUI\s0 this parameter can be set
407 via the \s-1UCI\s0 option \*(L"Polyglot BookFile\*(R".
408 .IP "\fBBookRandom\fR (default: true)" 4
409 .IX Item "BookRandom (default: true)"
410 Select moves according to their weights in the book. If false the move
411 with the highest weight is selected.
412 .IP "\fBBookLearn\fR (default: false)" 4
413 .IX Item "BookLearn (default: false)"
414 Record learning information in the opening book. Naturally this requires
415 the opening book to be writable.
416 .IP "\fBUseNice\fR (default: false)" 4
417 .IX Item "UseNice (default: false)"
418 Run the engine at nice level 5, or \*(L"NiceValue\*(R" if it set. On some
419 operating systems it may be necessary to run the engine at lower
420 priority for it to be responsive to commands from PolyGlot while
422 .IP "\fBNiceValue\fR (default: 5)" 4
423 .IX Item "NiceValue (default: 5)"
424 Nice levels go from \-20 to 20 with 20 being the lowest priority.
425 On Unix only root can set negative nice levels. On Windows the standard
426 Win32 priority levels are mapped in a sensible way to Unix nice levels.
427 .IP "\fBAffinity\fR (default: \-1)" 4
428 .IX Item "Affinity (default: -1)"
429 This a bit vector in which each bit represents the processors that a
430 process is allowed to run on. This option works only on Windows.
432 .IX Subsection "Work arounds"
433 Work arounds are identical to options except that they should be used
434 only when necessary. Their purpose is to try to hide problems with
435 various software (not just engines). The default value is always
436 correct for bug-free software.
438 \&\s-1IMPORTANT:\s0 Any of these work arounds might be removed in future
439 versions of PolyGlot. You are strongly recommended to contact the
440 author of faulty software and truly fix the problem.
442 PolyGlot supports the following work arounds:
443 .IP "\fBUCIVersion\fR (default: 2)" 4
444 .IX Item "UCIVersion (default: 2)"
445 The default value of 2 corresponds to \s-1UCI+\s0. Use 1 to select plain
446 \&\s-1UCI\s0 for engines that have problems with \s-1UCI+\s0.
447 .IP "\fBCanPonder\fR (default: false)" 4
448 .IX Item "CanPonder (default: false)"
449 PolyGlot now conforms to the documented \s-1UCI\s0 behaviour: the engine will
450 be allowed to ponder only if it (the engine) declares the \*(L"Ponder\*(R" \s-1UCI\s0
451 option. However some engines which can actually ponder do not declare
452 the option. This work around lets PolyGlot know that they can ponder.
453 .IP "\fBSyncStop\fR (default: false)" 4
454 .IX Item "SyncStop (default: false)"
455 When a ponder miss occurs, Polyglot interrupts the engine and
456 \&\s-1IMMEDIATELY\s0 launches a new search. While there should be no problem
457 with this, some engines seem confused and corrupt their search board.
458 \&\*(L"SyncStop\*(R" forces PolyGlot to wait for the (now useless) ponder search
459 to finish before launching the new search.
460 .IP "\fBPromoteWorkAround\fR (default: false)" 4
461 .IX Item "PromoteWorkAround (default: false)"
462 Some engines do not specify a promotion piece, e.g. they send \*(L"e7e8\*(R"
463 instead of the correct \*(L"e7e8q\*(R". This work around enables the
464 incorrect form (and of course promotes into a queen).
465 .IP "\fBRepeatPV\fR (default: true)" 4
466 .IX Item "RepeatPV (default: true)"
467 When true, PolyGlot repeats the last pv string (which also contains
468 score,depth and time usage) it got from the engine. Some engines
469 however do not send a new pv string just before sending the move and
470 the now old pv string might confuse debugtools that parse the winboard
472 .Sh "[Engine] section"
473 .IX Subsection "[Engine] section"
474 This section contains engine \s-1UCI\s0 options. PolyGlot does not
475 understand them, but sends the information to the engine at startup
476 (converted to \s-1UCI\s0 form). You can add any \s-1UCI\s0 option that makes sense
477 to the engine (not just the common options about hash-table size and
480 \&\s-1NOTE:\s0 use \s-1INI\s0 syntax, not \s-1UCI\s0. For example \*(L"OwnBook = true\*(R" is
481 correct. It will be replaced by PolyGlot with \*(L"setoption name OwnBook
482 value true\*(R" at engine startup.
484 Standard \s-1UCI\s0 options are
493 Hidden options like \*(L"Ponder\*(R" or \*(L"UCI_xxx\*(R" are automatic
494 and should not be put in an \s-1INI\s0 file.
496 The other options are engine\-specific. Check their name using a \s-1UCI\s0
497 \&\s-1GUI\s0 or launch the engine in a console and type \*(L"uci\*(R".
499 .IX Header "EXAMPLES"
500 Compile \*(L"games.pgn\*(R" into a book \*(L"book.bin\*(R" retaining all lines of at
504 \& polyglot make\-book \-pgn games.pgn \-bin book.bin \-max\-ply 30
507 Merge books \*(L"in1.bin\*(R" and \*(L"in2.bin\*(R" into a book \*(L"out.bin\*(R".
510 \& polyglot merge\-book \-in1 w1.bin \-in2 w2.bin \-out w.bin
513 Here is a minimal config file
517 \& EngineCommand = fruit
521 .IX Header "EXIT STATUS"
522 PolyGlot always returns 0 on exit.
525 Main author: Fabien Letouzey<fabien_letouzey(at)hotmail.com>
527 Native Windows port: Huang Chen<webmaster@elephantbase.net> (\*(L"Morning Yellow\*(R")
529 Various enhancements: Fonzy Bleumers<match(at)geenvis.net>
531 \&\s-1UCI\s0 port: Michel Van den Bergh <michel.vandenbergh(at)uhasselt.be>
533 .IX Header "SEE ALSO"