• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

debian/H07-May-2022-621328

AUTHORSH A D06-Dec-2010334 65

COPYINGH A D06-Dec-201017.6 KiB341281

ChangeLogH A D20-Sep-201213.7 KiB251233

INSTALLH A D06-Dec-20109.3 KiB238179

Makefile.amH A D17-Sep-20121.3 KiB2614

Makefile.inH A D20-Sep-201227.5 KiB774676

READMEH A D18-Sep-201221.7 KiB559408

README1.3H A D06-Dec-201012.7 KiB435277

README1.4H A D06-Dec-201018.4 KiB616394

README1.4wH A D06-Dec-20102.7 KiB7057

README1.4w10UCIH A D06-Dec-20101.6 KiB5134

TODOH A D06-Dec-2010447 109

aclocal.m4H A D20-Sep-201233.8 KiB952857

attack.cH A D06-Dec-20104.4 KiB225140

attack.hH A D06-Dec-2010705 3816

board.cH A D06-Dec-201010.8 KiB493306

board.hH A D06-Dec-20101.4 KiB7137

book.cH A D17-Sep-20127.7 KiB429257

book.hH A D06-Dec-2010672 3316

book_make.cH A D17-Sep-201226.7 KiB1,101800

book_make.hH A D06-Dec-2010307 217

book_merge.cH A D20-Sep-20128.2 KiB422274

book_merge.hH A D06-Dec-2010215 195

colour.cH A D06-Dec-2010718 5621

colour.hH A D06-Dec-2010528 3415

config.guessH A D01-Apr-201143.8 KiB1,5271,315

config.hH A D20-Sep-20124.7 KiB17041

config.h.inH A D20-Sep-20124.3 KiB169114

config.subH A D01-Apr-201132.6 KiB1,6591,514

configureH A D20-Sep-2012224.3 KiB8,0786,800

configure.acH A D20-Sep-2012919 4232

depcompH A D06-Dec-201017.4 KiB590375

engine.cH A D06-Dec-20102.6 KiB11373

engine.hH A D06-Dec-2010865 3719

epd.cH A D06-Dec-20109.7 KiB448281

epd.hH A D06-Dec-2010273 216

fen.cH A D06-Dec-20108.3 KiB393235

fen.hH A D06-Dec-2010340 258

game.cH A D06-Dec-20106.4 KiB362196

game.hH A D06-Dec-20101.4 KiB7441

gui.cH A D06-Dec-20101.4 KiB9849

gui.hH A D06-Dec-2010421 3013

hash.cH A D06-Dec-20101.9 KiB12958

hash.hH A D06-Dec-2010638 4016

ini.cH A D06-Dec-20108.6 KiB329275

ini.hH A D06-Dec-20101.7 KiB6443

install-shH A D06-Dec-201013.3 KiB520344

io.cH A D06-Dec-20106.4 KiB357189

io.hH A D06-Dec-2010818 5424

line.cH A D06-Dec-20103.5 KiB204112

line.hH A D06-Dec-2010656 3313

list.cH A D06-Dec-20104.6 KiB276157

list.hH A D06-Dec-20101.1 KiB5527

main.cH A D03-May-202219.1 KiB671479

main.hH A D06-Dec-2010226 206

mainloop.cH A D06-Dec-20102.1 KiB10266

mainloop.hH A D06-Dec-2010216 276

makefile.gccH A D17-Sep-2012769 3021

makefile.msH A D17-Sep-20121.2 KiB5941

missingH A D06-Dec-201010.9 KiB368275

move.cH A D06-Dec-20106.8 KiB377214

move.hH A D06-Dec-20101.6 KiB6131

move_do.cH A D06-Dec-20107.2 KiB364192

move_do.hH A D06-Dec-2010218 206

move_gen.cH A D06-Dec-20107.8 KiB329222

move_gen.hH A D06-Dec-2010328 228

move_legal.cH A D06-Dec-20102 KiB11662

move_legal.hH A D06-Dec-2010460 2510

option.cH A D31-Dec-201010.9 KiB400247

option.hH A D06-Dec-20103 KiB9960

parse.cH A D06-Dec-20104.7 KiB261146

parse.hH A D06-Dec-2010808 4519

pgheader.cH A D03-May-202210.3 KiB545413

pgheader.hH A D03-May-20221.4 KiB4820

pgn.cH A D06-Dec-201014.3 KiB642353

pgn.hH A D06-Dec-2010839 5730

piece.cH A D06-Dec-20102.9 KiB20492

piece.hH A D06-Dec-20102.4 KiB9364

pipex.hH A D06-Dec-20102.2 KiB10965

pipex_posix.cH A D03-May-20228.5 KiB372231

pipex_win32.cH A D20-Sep-201214.8 KiB530377

polyglot.manH A D01-Jun-201127.5 KiB706681

polyglot.podH A D01-Jun-201119.3 KiB670414

polyglot.specH A D20-Sep-2012881 4131

random.cH A D06-Dec-201020.1 KiB232209

random.hH A D06-Dec-2010351 329

san.cH A D06-Dec-201010.4 KiB568336

san.hH A D06-Dec-2010398 238

search.cH A D06-Dec-20104.7 KiB249145

search.hH A D06-Dec-2010396 269

square.cH A D06-Dec-20103.6 KiB247120

square.hH A D06-Dec-20102.4 KiB139107

uci.cH A D08-Apr-201121.9 KiB962590

uci.hH A D06-Dec-20102.2 KiB11073

uci2uci.cH A D06-Dec-20106.2 KiB273198

uci2uci.hH A D06-Dec-2010210 155

util.cH A D07-May-20118.4 KiB527310

util.hH A D03-May-20225.3 KiB193133

xboard2uci.cH A D01-Jun-201141.7 KiB1,7411,147

xboard2uci.hH A D06-Dec-2010370 258

README

1POLYGLOT(6)                                                        POLYGLOT(6)
2
3
4
5NAME
6       PolyGlot -  Winboard protocol to UCI protocol adapter
7                -  book engine for Polyglot books
8                -  a collection of utilities for creating and analyzing
9       opening books
10                -  a utility for analyzing epd files
11                -  a perft counter
12
13SYNOPSIS
14       polyglot [configfile] [-noini] [-ec engine] [-ed enginedirectory] [-en
15       enginename] [-log true/false] [-lf logfile] [-pg <name>=<value>]* [-uci
16       <name>=<value>]*
17
18       polyglot make-book [-pgn inputfile] [-bin outputfile] [-max-ply ply]
19       [-min-game games] [-min-score score] [-only-white] [-only-black]
20       [-uniform]
21
22       polyglot merge-book -in1 inputfile1 -in2 inputfile2 [-out outputfile]
23
24       polyglot info-book [-bin inputfile] [-exact]
25
26       polyglot dump-book [-bin inputfile] -color color [-out outputfile]
27
28       polyglot [configfile] epd-test [engineoptions] [-epd inputfile]
29       [-min-depth depth] [-max-depth depth] [-max-time time] [-depth-delta
30       delta]
31
32       polyglot perft [-fen fen] [-max-depth depth]
33
34DESCRIPTION
35   PolyGlot as adapter and book engine
36       PolyGlot is a "UCI adapter".  It connects a GUI interface (such as
37       XBoard, Winboard, Arena or Chessbase) to a UCI chess engine.
38
39       By specifying an opening book (in PolyGlot book format) chess engines
40       can transparently use such books.
41
42       PolyGlot understands the two main GUI protocols: UCI and xboard.
43       Normally the protocol will be auto detected but this can be overridden
44       in the configuration file.
45
46       In xboard mode PolyGlot fully translates between the xboard and UCI
47       protocols.  In addition it tries to solve known problems with other
48       adapters.  For instance, it detects and reports draws by fifty-move
49       rule, repetition, etc ... It also supports Chess960.
50
51       When in UCI mode PolyGlot mostly passes commands from the GUI to the
52       engine and vice versa, except that it will play book moves on behalf of
53       the engine when the occasion arises.
54
55       The engine options are exported as UCI options in UCI mode and as
56       "feature option=" commands in xboard mode. The latter form an extension
57       of the xboard protocol as defined by H.G. Muller.
58
59       Options which normally appear in the [PolyGlot] section of the config
60       file (see below) are exported as options with their name prefixed by
61       "Polyglot". This makes it easy to filter them in the GUI.
62
63       NOTE: Not all options are exported, only those that make sense in the
64       given mode.
65
66   Book making utilities
67       PolyGlot supports the "PolyGlot opening book format". This is the
68       defacto standard non-proprietary opening book format. It is fully
69       documented here
70
71       http://alpha.uhasselt.be/Research/Algebra/Toga/book_format.html
72
73       Roughly speaking a PolyGlot opening book is a collection of triples
74       (position, move, weight). A "position" is represented by a 64-bit
75       Zobrist hash key. The weight is proportional to the probability the
76       move should be played.
77
78       Other opening book formats such as ChessBase's .ctg format and Arena's
79       .abk format are undocumented and proprietary. They can only be used by
80       their own GUIs.
81
82       PolyGlot can compile a pgn file into a binary PolyGlot book and
83       furthermore it can merge two such binary books into a third one.
84
85       PolyGlot can also extract some useful information from PolyGlot books.
86       The utility "dump-book" dumps the "lines" in a book for a given color.
87       By definition a line is a sequence of moves (from the starting
88       position) in which the given color makes only book moves and the other
89       color makes arbitrary moves (i.e. not necessarily book moves).
90
91       Since a PolyGlot book is built up from positions and not lines there
92       may be (and there usually are) many positions in the book that are not
93       on a "line" as defined in the previous paragraph. It is convenient to
94       call such positions "isolated" positions. The utility "info-book"
95       counts such isolated positions.
96
97       Some of the isolated positions are provably unreachable and they could
98       in principle be deleted from the book. For example if a book contains
99       only the move "e4" in the starting position but also the position after
100       "d4 d5" then this last position is provably unreachable since it
101       requires white to make a non-book move when a book move is available.
102       Such situations arise frequently from the priority rules in merging
103       books.
104
105       Unfortunately not all isolated positions are provably unreachable and
106       it is difficult to identify the latter. If invoked with "-exact" the
107       utility info-book will attempt to count the isolated positions which
108       require a player to make a non-book move when a book move is available.
109       Due to the possibility of transpositions this is not a fool proof
110       method.
111
112   Epd test mode
113       In epd test mode, PolyGlot will search positions in an epd file and
114       record the number of times the right best move was found.  The
115       arguments specify when to stop the search in any given position.
116
117   Perft counts
118       A perft count is the number of legal move sequence in a given position
119       up to a given depth. PolyGlot can perform such perft counts. It is
120       however much slower than other more dedicated programs.
121
122OPTIONS
123       When PolyGlot is invoked as an adapter of in epd-test mode it gets its
124       options from a config file and then from the command line.  The default
125       config file is "polyglot.ini" but an alternative one may be optionally
126       included as first argument. The config file format is described below.
127
128       The following engine options may be specified on the command line.
129
130       -noini
131           Do not use a config file, even if one was specified on the command
132           line.
133
134       -pg The argument is a string of the form <name>=<value>. This option
135           will set the Polyglot option <name> to <value>.
136
137       -uci
138           The argument is a string of the form <name>=<value>. This option
139           will set the engine option <name> to <value>.
140
141       -ec This is an alias for -pg "EngineCommand=<value>"
142
143       -ed This is an alias for -pg "EngineDir=<value>"
144
145       -en This is an alias for -pg "EngineName=<value>"
146
147       -log (default: false)
148           This is an alias for -pg "Log=<value>"
149
150       -lf (default: "polyglot.log")
151           This is an alias for -pg "LogFile=<value>".
152
153       -wb (default: "true")
154           This is an alias for -pg "OnlyWbOptions=<value>".
155
156       When invoked as
157
158   polyglot make-book
159       PolyGlot supports the following options
160
161       -pgn (default: "book.pgn")
162           Input file in pgn format.
163
164       -bin (default: "book.bin")
165           Output file in PolyGlot format.
166
167       -max-ply (default: 1024)
168           Specifies the maximum ply-depth of lines included in the book.
169
170       -min-game (default: 3)
171           Specifies the minimum number of games that have to contain this
172           move for it to be included in the book.
173
174       -min-score (default: 0.0)
175           Specifies the minimum score (or weight) this move should have
176           received for it to  be included in the book. The score is
177           2*(wins)+(draws), globally scaled to fit into 16 bits.
178
179       -only-white
180           Include only moves for white in the book.
181
182       -only-black
183           Include only moves for black in the book.
184
185       -uniform
186           Set all weights to 1. In other words, all moves will be selected
187           with equal probability.
188
189       When invoked as
190
191   polyglot merge-book
192       PolyGlot supports the following options
193
194       -in1
195           First input file (in PolyGlot book format).
196
197       -in2
198           Second input file (in PolyGlot book format).
199
200       -out (default: out.bin)
201           Output file (in PolyGlot book format).
202
203       Input files are not symmetrical, "in1" has priority over "in2". In
204       other words when a position occurs both in "in1" and "in2" only the
205       moves and weights from "in1" will be retained in "out".
206
207       When invoked as
208
209   polyglot dump-book
210       PolyGlot supports the following options
211
212       -bin (default: book.bin)
213           Input file in PolyGlot book format.
214
215       -color
216           The color for whom to generate the lines.
217
218       -out (default: book_<color>.txt)
219           The name of the output file.
220
221       When invoked as
222
223   polyglot info-book
224       PolyGlot supports the following options
225
226       -bin (default: book.bin)
227           Input file in PolyGlot book format.
228
229       -exact
230           Attempt to count the provably unreachable positions among the
231           isolated ones.  Note that this takes a very long time.
232
233       When invoked as
234
235   polyglot epd-test
236       (possibly with a config file as first argument) PolyGlot supports
237       besides the generic options described above the following additional
238       options.
239
240       -max-depth (default: 63)
241           Unconditionally stop the search when this depth has been reached.
242
243       -max-time (default: 5.0)
244           Unconditionally stop the seach after this amount of time.
245
246       -depth-delta (default: 3)
247           Stop the search if the solution as been found and the best move has
248           been constant for this many depths, on condition that the mininal
249           depth and minimal time have been reached.
250
251       -min-depth (default: 8)
252           Minimal search depth when the search is stopped using
253           "-depth-delta".
254
255       -min-time (default: 1.0)
256           Minimal search time when the search is stopped using
257           "-depth-delta".
258
259       When invoked as
260
261   polyglot perft
262       PolyGlot supports the following options
263
264       -fen (default: starting position)
265           Fen at which to start searching.
266
267       -max-depth (default: 1)
268           Maximum depth to search.
269
270CONFIG FILE FORMAT
271       There should be a different config file for each engine.
272
273       The config file is in the traditional INI format.
274
275           [PolyGLot]
276           option = value
277           ...
278           [Engine]
279           option = value
280           ...
281
282       The characters "#" and ";" serve as comment characters.
283
284       Initial and final white space is stripped from option names and values.
285       If you need to use characters which have a special meaning to PolyGlot
286       (these are ';#[]=\') you should quote them by preceding them with '\'.
287       "Quoting" other characters in this way has no effect. In particular the
288       use of '\' as a path separator in windows should normally not affected.
289
290   [PolyGlot] section
291       This section is used by PolyGlot only.  The engine is unaware of these
292       options.  The list of available options is detailed below.
293
294       EngineName (default: UCI name)
295           This is the name that will appear in the GUI.  It is cosmetic only.
296           You can use different names for tweaked versions of the same
297           engine.
298
299       EngineDir (default: ".")
300           Full path of the directory where the engine is installed.  You can
301           use "." (without the quotes) if you know that PolyGlot will be
302           launched in the engine directory or the engine is in the "path" and
303           does not need any data file.
304
305       EngineCommand
306           Put here the name of the engine executable file.  You can also add
307           command-line arguments.  Path searching is used and the current
308           directory will be "EngineDir". On Linux the EngineCommand is passed
309           to wordexp so that shell quoting rules and expansions are applied.
310           On Windows the EngineCommand is simply passed to CreateProcess
311           which does its own shell like processing.
312
313       SettingsDir (default: $HOME/.polyglot on Linux; ".\_PG" on Windows)
314           The directory where ini files are stored for engines that are
315           started with -noini. Such ini files may be created by pushing the
316           "Save" button in the Engine settings dialog in WB/XB 4.4.0 and
317           higher. As a special exception (for WB/XB 4.4.0 compatibility) this
318           directory is also used in case PolyGlot is started with config
319           files named "polyglot_1st.ini" or "polyglot_2nd.ini".
320
321       Log (default: false)
322           Whether PolyGlot should log all transactions with the interface and
323           the engine.  This should be necessary only to locate problems.
324
325       LogFile (default: polyglot.log)
326           The name of the log file.  Note that it is put where PolyGlot was
327           launched from, not into the engine directory.
328
329           WARNING: Log files are not cleared between sessions, and can become
330           very large.  It is safe to remove them though.
331
332       Resign (default: false)
333           Set this to "true" if you want PolyGlot to resign on behalf of the
334           engine.
335
336           NOTE: Some engines display buggy scores from time to time although
337           the best move is correct.  Use this option only if you know what
338           you are doing (e.g. you always check the final position of games).
339
340       ResignMoves (default: 3)
341           Number of consecutive moves with "resign" score (see below) before
342           PolyGlot resigns for the engine.  Positions with only one legal
343           move are ignored.
344
345       ResignScore (default: 600)
346           This is the score in centipawns that will trigger resign
347           "counting".
348
349       ShowPonder (default: true)
350           Show search information during engine pondering.  Turning this off
351           might be better for interactive use in some interfaces.
352
353       ScoreWhite (default: true)
354           Report score from white's point of view in xboard mode.
355
356       KibitzMove (default: false)
357           Whether to kibitz when playing a move.
358
359       KibitzPV (default: false)
360           Whether to kibitz when the PV is changed (new iteration or new best
361           move).
362
363       KibitzCommand (default: "tellall")
364           xboard command to use for kibitzing, normally "tellall" for
365           kibitzing or "tellothers" for whispering.
366
367       KibitzDelay (default: 5)
368           How many seconds to wait before starting kibitzing.  This has an
369           effect only if "KibitzPV" is selected, move kibitzes are always
370           sent regardless of the delay.
371
372       KibitzInterval (default: 0)
373           This is another form of throttling. PolyGlot will usually wait this
374           many seconds before doing the next kibitz.
375
376       UCI (default: false)
377           If true PolyGlot will not understand xboard commands.
378
379       MateScore (default: 10000)
380           Mate score reported to GUI when in xboard mode.
381
382       Book (default: false)
383           Indicates whether a PolyGlot book should be used.  This has no
384           effect on the engine own book (which can be controlled with the UCI
385           option "OwnBook" in the [Engine] section).  In particular, it is
386           possible to use both a PolyGlot book and an engine book.  In that
387           case, the engine book will be used whenever PolyGlot is out of
388           book.  Remember that PolyGlot is unaware of whether the engine is
389           itself using a book or not.
390
391       BookFile (default: book.bin)
392           The name of the (binary) book file.  Note that PolyGlot will look
393           for it in the directory it was launched from, not in the engine
394           directory.  Of course, full path can be used in which case the
395           current directory does not matter.
396
397       BookRandom (default: true)
398           Select moves according to their weights in the book. If false the
399           move with the highest weight is selected.
400
401       BookLearn (default: false)
402           This is a noop.
403
404       BookDepth (default: 256)
405           Stop using the book after this number of moves.
406
407       BookTreshold (default: 5)
408           Do not play moves with a weight (probability) lower than this (in
409           per mil).
410
411       UseNice (default: false)
412           Run the engine at nice level 5, or "NiceValue" if it set.  On some
413           operating systems it may be necessary to run the engine at lower
414           priority for it to be responsive to commands from PolyGlot while
415           searching.
416
417       NiceValue (default: 5)
418           Nice levels go from -20 to 20 with 20 being the lowest priority.
419           On Unix only root can set negative nice levels. On Windows the
420           standard Win32 priority levels are mapped in a sensible way to Unix
421           nice levels.
422
423       Affinity (default: -1)
424           This a bit vector in which each bit represents the processors that
425           a process is allowed to run on. This option works only on Windows.
426
427       STFudge (default: 20)
428           PolyGlot will translate "st x" as "go movetime 1000*x-STFudge".
429           The rationale is that in the UCI specification the argument of
430           movetime is defined as the exact search time whereas the argument
431           of the st command is only an upperbound.
432
433       OnlyWbOptions (default: true)
434           If true then PolyGlot restricts the options it sends to those that
435           are potentially useful for WinBoard.
436
437   Work arounds
438       Work arounds are identical to options except that they should be used
439       only when necessary.  Their purpose is to try to hide problems with
440       various software (not just engines).
441
442       IMPORTANT: Any of these work arounds might be removed in future
443       versions of PolyGlot.  You are strongly recommended to contact the
444       author of faulty software and truly fix the problem.
445
446       PolyGlot supports the following work arounds:
447
448       UCIVersion (default: 2)
449           The default value of 2 corresponds to UCI+.  Use 1 to select plain
450           UCI for engines that have problems with UCI+.
451
452       CanPonder (default: false)
453           PolyGlot now conforms to the documented UCI behaviour: the engine
454           will be allowed to ponder only if it (the engine) declares the
455           "Ponder" UCI option.  However some engines which can actually
456           ponder do not declare the option.  This work around lets PolyGlot
457           know that they can ponder.
458
459       SyncStop (default: false)
460           When a ponder miss occurs, Polyglot interrupts the engine and
461           IMMEDIATELY launches a new search.  While there should be no
462           problem with this, some engines seem confused and corrupt their
463           search board.  "SyncStop" forces PolyGlot to wait for the (now
464           useless) ponder search to finish before launching the new search.
465
466       PromoteWorkAround (default: false)
467           Some engines do not specify a promotion piece, e.g. they send
468           "e7e8" instead of the correct "e7e8q".  This work around enables
469           the incorrect form (and of course promotes into a queen).
470
471       RepeatPV (default: true)
472           When true, PolyGlot repeats the last pv string (which also contains
473           score,depth and time usage) it got from the engine. Some engines
474           however do not send a new pv string just before sending the move.
475           In that case the output of PolyGlot would be inconsistent.  When
476           RepeatPV is false PolyGlot does not repeat the last pv string.  Due
477           to the way kibitzing is implemented, KibitzMove is disabled in that
478           case.
479
480   [Engine] section
481       This section contains engine UCI options.  PolyGlot does not understand
482       them, but sends the information to the engine at startup (converted to
483       UCI form).  You can add any UCI option that makes sense to the engine
484       (not just the common options about hash-table size and tablebases).
485
486       NOTE: use INI syntax, not UCI.  For example "OwnBook = true" is
487       correct.  It will be replaced by PolyGlot with "setoption name OwnBook
488       value true" at engine startup.
489
490       Standard UCI options are
491
492           Hash
493           NalimovPath
494           NalimovCache
495           OwnBook
496
497       Hidden options like "Ponder" or "UCI_xxx" are automatic and should not
498       be put in an INI file.
499
500       The other options are engine-specific.  Check their name using a UCI
501       GUI or launch the engine in a console and type "uci".
502
503EXAMPLES
504       Running the UCI engine "fruit" under xboard 4.3.15 and later (this
505       invokes PolyGlot internally).
506
507           xboard -fcp fruit -fUCI
508
509       An explicit command line for using the UCI engine "fruit" with logging
510       enabled (this works also with older versions of xboard).
511
512           xboard -fcp "polyglot -noini -log true -ec fruit"
513
514       The equivalent config file would be:
515
516           [PolyGlot]
517           EngineCommand = fruit
518           Log = true
519           [Engine]
520
521       Compile "games.pgn" into a book "book.bin" retaining all lines of at
522       most 30 plies.
523
524           polyglot make-book -pgn games.pgn -bin book.bin -max-ply 30
525
526       Merge books "w1.bin" and "w2.bin" into a book "w.bin".
527
528           polyglot merge-book -in1 w1.bin -in2 w2.bin -out w.bin
529
530       Inspect lines for white in "w.bin"
531
532           polyglot dump-book -bin w.bin -color white -out w_white.txt
533
534       Test epd file "test.epd" with a (maximum) search time of 7 minutes per
535       position
536
537           polyglot epd-test -epd test.epd -max-time 420
538
539EXIT STATUS
540       PolyGlot always returns 0 on exit.
541
542AUTHORS
543       Main author: Fabien Letouzey<fabien_letouzey(at)hotmail.com>
544
545       Native Windows port:  Huang Chen<webmaster@elephantbase.net> ("Morning
546       Yellow")
547
548       Various enhancements: Fonzy Bleumers<match(at)geenvis.net>
549
550       UCI port and implementation of new WB protocol: Michel Van den Bergh
551       <michel.vandenbergh(at)uhasselt.be>
552
553SEE ALSO
554       xboard(6)
555
556
557
558                                  2012-09-17                       POLYGLOT(6)
559

README1.3

1
2Legal details
3-------------
4
5PolyGlot 1.3 Copyright 2004-2005 Fabien Letouzey.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or (at
10your option) any later version.
11
12This program is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20USA
21
22See the file "copying.txt" for details.
23
24
25General
26-------
27
28PolyGlot 1.3 (2005/06/03).
29
30PolyGlot is a "UCI adapter".  It connects a UCI chess engine to an
31xboard interface such as WinBoard.  UCI2WB is another such adapter
32(for Windows).
33
34PolyGlot tries to solve known problems with other adapters.  For
35instance, it detects and reports draws by fifty-move rule, repetition,
36etc ...
37
38
39Official distribution URL
40-------------------------
41
42The official distribution web site is Leo Dijksman's WBEC Ridderkerk:
43http://wbec-ridderkerk.nl/  This is where you should be looking for
44PolyGlot updates in the future.
45
46
47Install
48-------
49
50PolyGlot should have its own directory.  The INI files for engines
51should also be put there.  Dirtier solutions are needed when
52BookThinker is used though.
53
54On Windows the files "polyglot.exe" and "cygwin1.dll" (which you can
55download from http://wbec-ridderkerk.nl/) are needed.  On Linux and
56Mac OS X only the file "polyglot_linux" or "polyglot_mac" is required.
57
58
59Compiling
60---------
61
62The distribution comes up with Windows, Linux and Mac OS X binaries.
63Compiling is therefore not necessary on those systems unless you want
64to make a change in the program.  In any case this section describes
65the compiling procedure, it is safe to skip it.
66
67PolyGlot is a POSIX application (Unix compatible), and was developed
68on Linux using g++ (the GNU C++ compiler).
69
701) Unix
71
72You should be able to compile it on any POSIX-compliant operating
73system (*not* Windows) with the following command line (or similar):
74
75> g++ -O2 -o polyglot *.cpp
76
77IMPORTANT: In "io.cpp", the variable "UseCR" should be set to "false".
78
79A Makefile is provided but might not work on your system ...
80
812) Windows
82
83On Windows, you *must* use Cygnus GCC to compile PolyGlot.
84
85IMPORTANT: In "io.cpp", the variable "UseCR" should be set to "true".
86
87
88Usage
89-----
90
91PolyGlot acts as an xboard engine.  There should be no difference with
92a normal chess program as far as the interface (e.g. WinBoard) is
93concerned.
94
95PolyGlot is invoked using "polyglot <INI file>".  Note that PolyGlot
96will look for the INI file in the current directory.  If no <INI file>
97is given, "polyglot.ini" is selected.
98
99To use PolyGlot with XBoard, you would type something like this:
100> xboard -fd 'polyglot_dir' -fcp 'polyglot engine.ini'
101
102Quotes are important when there is a space in the argument.
103
104
105INI file
106--------
107
108There should be a different INI file for each engine.  Sections are
109composed of "variable = value" lines.  See the sample INI files in the
110"example" directory.
111
112NOTE: There can be spaces in variable names or values.  Do not use
113quotes.
114
1151) [PolyGlot] section
116
117This section is used by PolyGlot only.  The engine is unaware of these
118options.  The list of available options is detailed below in this
119document.
120
1212) [Engine] section
122
123This section contains engine UCI options.  PolyGlot does not
124understand them, but sends the information to the engine at startup
125(converted to UCI form).  You can add any UCI option that makes sense
126to the engine (not just the common options about hash-table size and
127tablebases).
128
129NOTE: use INI syntax, not UCI.  For example "OwnBook = true" is
130correct.  It will be replaced by PolyGlot with "setoption name OwnBook
131value true" at engine startup.
132
133Standard UCI options are "Hash", "NalimovPath", "NalimovCache" and
134"OwnBook".  Hidden options like "Ponder" or "UCI_xxx" are automatic
135and should not be put in an INI file.
136
137The other options are engine-specific.  Check their name using a UCI
138GUI or launch the engine in a console and type "uci".
139
140
141Options
142-------
143
144These should be put in the [PolyGlot] section.
145
146- "EngineName" (default: UCI name)
147
148This is the name that will appear in the xboard interface.  It is
149cosmetic only.  You can use different names for tweaked versions of
150the same engine.
151
152If no "Engine Name" is given, the UCI name will be used.
153
154- "EngineDir" (default: ".")
155
156Full path of the directory where the engine is installed.  You can use
157"." (without the quotes) if you know that PolyGlot will be launched in
158the engine directory or the engine is in the "path" and does not need
159any data file.
160
161- "EngineCommand"
162
163Put here the name of the engine executable file.  You can also add
164command-line arguments.  Path searching is used and the current
165directory will be "EngineDir".
166
167NOTE: Unix users are recommended to prepend "./"; this is required on
168some secure systems.
169
170- "Log" (default: false)
171
172Whether PolyGlot should log all transactions with the interface and
173the engine.  This should be necessary only to locate problems.
174
175- "LogFile"
176
177The name of the log file.  Note that it is put where PolyGlot was
178launched from, not into the engine directory.
179
180WARNING: Log files are not cleared between sessions, and can become
181very large.  It is safe to remove them though.
182
183- "Resign" (default: false)
184
185Set this to "true" if you want PolyGlot to resign on behalf of the
186engine.
187
188NOTE: Some engines display buggy scores from time to time although the
189best move is correct.  Use this option only if you know what you are
190doing (e.g. you always check the final position of games).
191
192- "ResignMoves" (default: 3)
193
194Number of consecutive moves with "resign" score (see below) before
195PolyGlot resigns for the engine.  Positions with only one legal move
196are ignored.
197
198- "ResignScore" (default: 600)
199
200This is the score in centipawns that will trigger resign "counting".
201
202- "ShowPonder" (*** NEW ***, default: true)
203
204Show search information during engine pondering.  Turning this off
205might be better for interactive use in some interfaces.
206
207- "KibitzMove" (*** NEW ***, default: false)
208
209Whether to kibitz when playing a move.
210
211- "KibitzPV" (*** NEW ***, default: false)
212
213Whether to kibitz when the PV is changed (new iteration or new best move).
214
215- "KibitzCommand" (*** NEW ***, default: "tellall")
216
217xboard command to use for kibitzing, normally "tellall" for kibitzing
218or "tellothers" for whispering.
219
220- "KibitzDelay" (*** NEW ***, default: 5)
221
222How many seconds to wait before starting kibitzing.  This has an
223affect only if "KibitzPV" is selected, move kibitzes are always sent
224regardless of the delay.
225
226
227Work arounds
228------------
229
230Work arounds are identical to options except that they should be used
231only when necessary.  Their purpose is to try to hide problems with
232various software (not just engines).  The default value is always
233correct for bug-free software.
234
235IMPORTANT: Any of these work arounds might be removed in future
236versions of PolyGlot.  You are strongly recommended to contact the
237author of faulty software and truly fix the problem.
238
239In PolyGlot 1.3 there is only one optional work around:
240
241- "UCIVersion" (default: 2)
242
243The default value of 2 corresponds to UCI+.  Use 1 to select plain
244UCI for engines that have problems with UCI+.
245
246
247Opening Book
248------------
249
250*** NEW ***
251
252PolyGlot 1.3 provides a minimal opening-book implementation.
253
254New options can be added to the [PolyGlot] section:
255
256- "Book" (default: false)
257
258Indicates whether a PolyGlot book should be used.  This has no effect
259on the engine own book (which can be controlled with the UCI option
260"OwnBook" in the [Engine] section).  In particular, it is possible to
261use both a PolyGlot book and an engine book.  In that case, the engine
262book will be used whenever PolyGlot is out of book.  Remember that
263PolyGlot is unaware of whether the engine is itself using a book or
264not.
265
266- "BookFile"
267
268The name of the (binary) book file.  Note that PolyGlot will look for
269it in the directory it was launched from, not in the engine directory.
270Of course, full path can be used in which case the current directory
271does not matter.
272
273Note that there is no option to control book usage.  All parameters
274are fixed when compiling a PGN file into a binary book (see below).
275This is purposeful and is not likely to change.
276
277Using a book does not require any additional memory, this can be
278important for memory-limited tournaments.
279
280A default book "fruit.bin" is provided in the archive.  Note that this
281book is very small and should probably not be used in serious games.
282I hope that users will make other books available in the future.
283
284
285Book Making
286-----------
287
288*** NEW ***
289
290You can compile a PGN file into a binary book using PolyGlot on the
291command line.  At the moment, only a main (random) book is provided.
292It is not yet possible to control opening lines manually.  I am
293working on it though.
294
295Usage: "polyglot make-book <options>".
296
297"make-book" options are:
298
299- "-pgn"
300
301Name of the input PGN file.  PolyGlot should support any
302standard-conforming file.  Let me know if you encounter a problem.
303
304- "-bin"
305
306Name of the output binary file.  I suggest ".bin" as the extension but
307in fact PolyGlot does not care.
308
309- "-max-ply" (default: infinite)
310
311How many plies (half moves) to read for each game.  E.g. if set to
312"20", only the first 10 full moves of each game will be scanned.
313
314- "-min-game" (default: 3)
315
316How many times must a move be played to be kept in the book.  In other
317words, moves that were played too rarely will be left out.  If you
318scan full games "2" seems a minimum, but if you selected lines
319manually "1" will make sense.
320
321Example: "polyglot make-book -pgn games.pgn -bin book.bin -max-ply 30".
322
323Building a book is usually very fast (a few minutes at most).  Note
324however that a lot of memory may be required.  To reduce memory usage,
325select a ply limit.
326
327
328History
329-------
330
3312004/04/30: PolyGlot 1.0
332
333- first public release.
334
3352004/10/01: PolyGlot 1.1
336
337- added "StartupWait" and "PonderWorkAround" ("AutoQuit" was available
338  in version 1.0 but not documented).
339
340- fixed a minor bug that could prevent "AutoQuit" from working with
341  some engines.
342
3432005/01/29: PolyGlot 1.2
344
345- rewrote engine initialisation and UCI parsing to increase
346  UCI-standard compliance
347
348- added multi-move resign
349
350- added an internal work around for engines hanging with WinBoard
351
3522005/06/03: PolyGlot 1.3
353
354- added opening book
355
356- added kibitzing
357
358- added "ShowPonder" option
359
360
361
362Known bugs
363----------
364
365*** IMPORTANT ***
366
367There is a bug (!) in the xboard automaton.  The bug is related to
368searching in draw positions (e.g. 50-move rule or repetition).  I had
369only been able to make PolyGlot crash by using analysis mode and
370performing manual takebacks.  I believe that this bug can only happen
371in highly-interactive use (e.g. manual analysis).  It is present in
372all versions of PolyGlot, including this one.
373
374I attempted a work around in February.  I vaguely remember the change
375prevents crashing (not sure) but it is possible that PolyGlot now gets
376stuck in some rare case, i.e. it refuses to produce a move.  In any
377case, the bug cannot occur silently, e.g. in a game that terminated
378normally.
379
380Because of the small expected impact (nobody ever reported it to me)
381and because fixing the bug would require a whole redesign of the
382xboard module, I have no intention of working on it at the moment (!).
383
384Make sure to let me know if it appeared in any circounstance, thanks!
385In particular if the bug ever occurs during a non-interactive session
386(e.g. engine vs. engine game), then I will do something.
387
388
389Thanks
390------
391
392Big thanks go to:
393
394- Dann Corbit for spending a lot of time compiling, testing, making
395  files available, etc ...
396
397- Leo Dijksman for hosting the PolyGlot distribution on his web site
398  (see Links) and also for thorough testing
399
400- Tord Romstad, Joshua Shriver and George Sobala for compiling and
401  testing on Mac OS X
402
403- users in the WinBoard forum for their feedback and encouraging
404  words: Roger Brown, Leo Dijksman, Igor Gorelikov, Mogens Larsen,
405  Volker Pittlik, Norm Pollock, G�nther Simon and Salvo Spitaleri
406  in particular
407
408
409Links
410-----
411
412- Tim Mann's Chess Pages: http://www.tim-mann.org/xboard.html
413- Leo Dijksman's WBEC Ridderkerk: http://wbec-ridderkerk.nl/
414- Volker Pittlik's Winboard Forum: http://wbforum.volker-pittlik.name/
415
416
417Contact me
418----------
419
420You can contact me at fabien_letouzey@hotmail.com
421
422If I am not available, you can discuss PolyGlot issues in Volker
423Pittlik's Winboard Forum: http://wbforum.volker-pittlik.name/
424
425In fact for questions regarding specific Windows-only engines, you are
426advised to ask directly in the WinBoard forum, as I don't have Windows
427myself.
428
429
430The end
431-------
432
433Fabien Letouzey, 2005/06/03.
434
435

README1.4

1
2Legal details
3-------------
4
5PolyGlot 1.4 Copyright 2004-2006 Fabien Letouzey.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or (at
10your option) any later version.
11
12This program is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20USA
21
22See the file "copying.txt" for details.
23
24
25General
26-------
27
28PolyGlot 1.4 (2006/01/16).
29
30PolyGlot is a "UCI adapter".  It connects a UCI chess engine to an
31xboard interface such as WinBoard.  UCI2WB is another such adapter
32(for Windows).
33
34PolyGlot tries to solve known problems with other adapters.  For
35instance, it detects and reports draws by fifty-move rule, repetition,
36etc ...
37
38
39Official distribution URL
40-------------------------
41
42The official distribution web site is Leo Dijksman's WBEC Ridderkerk:
43http://wbec-ridderkerk.nl/  This is where you should be looking for
44PolyGlot updates in the future.
45
46
47Install
48-------
49
50PolyGlot can be placed in its own directory, or anywhere it can access
51the DLL file from (on Windows).
52
53On Windows the files "polyglot.exe" and "cygwin1.dll" (which you can
54download from http://wbec-ridderkerk.nl/) are needed.  On Linux and
55Mac OS X only the file "polyglot_linux" or "polyglot_mac" is required.
56
57
58Compiling
59---------
60
61The distribution comes up with Windows, Linux and Mac OS X binaries.
62Compiling should therefore not be necessary on those systems unless
63you want to make a change in the program.  In any case this section
64describes the compiling procedure, it is safe to skip it.
65
66PolyGlot is a POSIX application (Unix compatible), and was developed
67on Linux using g++ (the GNU C++ compiler).
68
691) Unix
70
71You should be able to compile it on any POSIX-compliant operating
72system (*not* Windows) with the following command line (or similar):
73
74> g++ -O2 -o polyglot *.cpp
75
76IMPORTANT: In "io.cpp", the variable "UseCR" should be set to "false".
77
78A Makefile is provided but might not work on your system ...
79
802) Windows
81
82On Windows, you *must* use Cygnus GCC to compile PolyGlot.
83
84IMPORTANT: In "io.cpp", the variable "UseCR" should be set to "true".
85
86
87Usage
88-----
89
90PolyGlot acts as an xboard engine.  There should be no difference with
91a normal chess program as far as the interface (e.g. WinBoard) is
92concerned.
93
94PolyGlot is invoked using "polyglot ".  Note that PolyGlot
95will look for the INI file in the current directory.  If no
96is given, "polyglot.ini" is selected.
97
98To use PolyGlot with XBoard, you would type something like this:
99> xboard -fd 'ini_dir' -fcp 'polyglot engine.ini'
100
101Quotes are important when there is a space in the argument.
102
103IMPORTANT: some users seem confused by the concept of "current
104directory".  PolyGlot needs to know where to read (INI file) and write
105(log file) files.  Although it's possible to specify the full path to
106each file, a better solution is to provide a directory when launching
107PolyGlot, e.g. with the "-fd" XBoard option above.  The directory
108should be where the INI file is.
109
110
111INI file
112--------
113
114There should be a different INI file for each engine.  Sections are
115composed of "variable = value" lines.  See the sample INI files in the
116"example" directory.
117
118NOTE: There can be spaces in variable names or values.  Do not use
119quotes.
120
1211) [PolyGlot] section
122
123This section is used by PolyGlot only.  The engine is unaware of these
124options.  The list of available options is detailed below in this
125document.
126
1272) [Engine] section
128
129This section contains engine UCI options.  PolyGlot does not
130understand them, but sends the information to the engine at startup
131(converted to UCI form).  You can add any UCI option that makes sense
132to the engine (not just the common options about hash-table size and
133tablebases).
134
135NOTE: use INI syntax, not UCI.  For example "OwnBook = true" is
136correct.  It will be replaced by PolyGlot with "setoption name OwnBook
137value true" at engine startup.
138
139Standard UCI options are "Hash", "NalimovPath", "NalimovCache" and
140"OwnBook".  Hidden options like "Ponder" or "UCI_xxx" are automatic
141and should not be put in an INI file.
142
143The other options are engine-specific.  Check their name using a UCI
144GUI or launch the engine in a console and type "uci".
145
146
147Options
148-------
149
150These should be put in the [PolyGlot] section.
151
152- "EngineName" (default: UCI name)
153
154This is the name that will appear in the xboard interface.  It is
155cosmetic only.  You can use different names for tweaked versions of
156the same engine.
157
158If no "Engine Name" is given, the UCI name will be used.
159
160- "EngineDir" (default: ".")
161
162Full path of the directory where the engine is installed.  You can use
163"." (without the quotes) if you know that PolyGlot will be launched in
164the engine directory or the engine is in the "path" and does not need
165any data file.
166
167- "EngineCommand"
168
169Put here the name of the engine executable file.  You can also add
170command-line arguments.  Path searching is used and the current
171directory will be "EngineDir".
172
173NOTE: Unix users are recommended to prepend "./"; this is required on
174some secure systems.
175
176- "Log" (default: false)
177
178Whether PolyGlot should log all transactions with the interface and
179the engine.  This should be necessary only to locate problems.
180
181- "LogFile"
182
183The name of the log file.  Note that it is put where PolyGlot was
184launched from, not into the engine directory.
185
186WARNING: Log files are not cleared between sessions, and can become
187very large.  It is safe to remove them though.
188
189- "Resign" (default: false)
190
191Set this to "true" if you want PolyGlot to resign on behalf of the
192engine.
193
194NOTE: Some engines display buggy scores from time to time although the
195best move is correct.  Use this option only if you know what you are
196doing (e.g. you always check the final position of games).
197
198- "ResignMoves" (default: 3)
199
200Number of consecutive moves with "resign" score (see below) before
201PolyGlot resigns for the engine.  Positions with only one legal move
202are ignored.
203
204- "ResignScore" (default: 600)
205
206This is the score in centipawns that will trigger resign "counting".
207
208- "ShowPonder" (default: true)
209
210Show search information during engine pondering.  Turning this off
211might be better for interactive use in some interfaces.
212
213- "KibitzMove" (default: false)
214
215Whether to kibitz when playing a move.
216
217- "KibitzPV" (default: false)
218
219Whether to kibitz when the PV is changed (new iteration or new best move).
220
221- "KibitzCommand" (default: "tellall")
222
223xboard command to use for kibitzing, normally "tellall" for kibitzing
224or "tellothers" for whispering.
225
226
227- "KibitzDelay" (default: 5)
228
229How many seconds to wait before starting kibitzing.  This has an
230affect only if "KibitzPV" is selected, move kibitzes are always sent
231regardless of the delay.
232
233
234Work arounds
235------------
236
237Work arounds are identical to options except that they should be used
238only when necessary.  Their purpose is to try to hide problems with
239various software (not just engines).  The default value is always
240correct for bug-free software.
241
242IMPORTANT: Any of these work arounds might be removed in future
243versions of PolyGlot.  You are strongly recommended to contact the
244author of faulty software and truly fix the problem.
245
246PolyGlot 1.4 supports the following work arounds:
247
248- "UCIVersion" (default: 2)
249
250The default value of 2 corresponds to UCI+.  Use 1 to select plain
251UCI for engines that have problems with UCI+.
252
253- "CanPonder" (*** NEW ***, default: false)
254
255PolyGlot now conforms to the documented UCI behaviour: the engine will
256be allowed to ponder only if it (the engine) declares the "Ponder" UCI
257option.  However some engines which can actually ponder do not declare
258the option.  This work around lets PolyGlot know that they can ponder.
259
260- "SyncStop" (*** NEW ***, default: false)
261
262When a ponder miss occurs, Polyglot interrupts the engine and
263IMMEDIATELY launches a new search.  While there should be no problem
264with this, some engines seem confused and corrupt their search board.
265"SyncStop" forces PolyGlot to wait for the (now useless) ponder search
266to finish before launching the new search.
267
268- "PromoteWorkAround" (*** NEW ***, default: false)
269
270Some engines do not specify a promotion piece, e.g. they send "e7e8"
271instead of the correct "e7e8q".  This work around enables the
272incorrect form (and of course promotes into a queen).
273
274
275Opening Book
276------------
277
278PolyGlot 1.4 provides a simplistic opening-book implementation.
279
280The following options can be added to the [PolyGlot] section:
281
282- "Book" (default: false)
283
284Indicates whether a PolyGlot book should be used.  This has no effect
285on the engine own book (which can be controlled with the UCI option
286"OwnBook" in the [Engine] section).  In particular, it is possible to
287use both a PolyGlot book and an engine book.  In that case, the engine
288book will be used whenever PolyGlot is out of book.  Remember that
289PolyGlot is unaware of whether the engine is itself using a book or
290not.
291
292- "BookFile"
293
294The name of the (binary) book file.  Note that PolyGlot will look for
295it in the directory it was launched from, not in the engine directory.
296Of course, full path can be used in which case the current directory
297does not matter.
298
299Note that there is no option to control book usage.  All parameters
300are fixed when compiling a PGN file into a binary book (see below).
301This is purposeful and is not likely to change.
302
303Using a book does not require any additional memory, this can be
304important for memory-limited tournaments.
305
306A default book "fruit.bin" is provided in the archive.  Note that this
307book is very small and should probably not be used in serious games.
308I hope that users will make other books available in the future.
309
310
311Book Making
312-----------
313
314You can compile a PGN file into a binary book using PolyGlot on the
315command line.  At the moment, only a main (random) book is provided.
316It is not yet possible to control opening lines manually.  I am
317working on it though.
318
319Usage: "polyglot make-book ".
320
321"make-book" options are:
322
323- "-pgn"
324
325Name of the input PGN file.  PolyGlot should support any
326standard-conforming file.  Let me know if you encounter a problem.
327
328- "-bin"
329
330Name of the output binary file.  I suggest ".bin" as the extension but
331in fact PolyGlot does not care.
332
333- "-max-ply" (default: infinite)
334
335How many plies (half moves) to read for each game.  E.g. if set to
336"20", only the first 10 full moves of each game will be scanned.
337
338- "-min-game" (default: 3)
339
340How many times must a move be played to be kept in the book.  In other
341words, moves that were played too rarely will be left out.  If you
342scan full games "2" seems a minimum, but if you selected lines
343manually "1" will make sense.
344
345- "-only-white" *** NEW ***
346
347Save only white moves.  This allows to use different parameters for
348white and black books, and merge them into a single file with the
349"merge-book" command, see below.
350
351- "-only-black" *** NEW ***
352
353Same for black moves.
354
355- "-uniform" *** NEW ***
356
357By default, a probability is calculated by PolyGlot for each move
358depending on how popular it is (how often it was playing in the
359provided PGN file) and how much it "scored".  This option bypasses the
360default mechanism and affects equal probability to all moves.  This
361allows more variety of play.
362
363This option is normally used only with hand-selected lines (e.g. "user
364books").
365
366---
367
368Example: "polyglot make-book -pgn games.pgn -bin book.bin -max-ply 30".
369
370Building a book is usually very fast (a few minutes at most).  Note
371however that a lot of memory may be required.  To reduce memory usage,
372select a ply limit.
373
374
375Book Merging
376------------
377
378*** NEW ***
379
380Usage: "polyglot merge-book -in1  -in2  -out "
381
382Merge two bin files into a single one.   has "priority"; this
383means that if a position is present in both input books, data from
384 will be ignored for this position.
385
386The two main applications are:
387
3881) combine a white book and a black book (in which case priority does
389   not matter)
390
3912) combine a "user book" of manually-selected lines with a broader one
392   from a large game set
393
394What follows is an admitedly complicated example of how this can be
395used.  DO NOT MAILBOMB ME IF YOU DO NOT UNDERSTAND!
396
397My hope is that at least one advanced user will get what I mean and
398writes a better explanation on a web page or forum thread (yes, that's
399YOU, thanks by the way) ...
400
401---
402
403Imagine that we've got 4 PGN files as follows:
404
405w1.pgn: fixed white lines, all moves manually checked
406w2.pgn: selected games (for random book as with PolyGlot 1.3)
407
408b1.pgn and b2.pgn: same for black
409
410The first step is to build 4 .bin files with appropriate options.
411Lines starting with "> " indicate what is typed on the command line.
412
413> polyglot make-book -min-game 1 -uniform -only-white -pgn w1.pgn -bin w1.bin
414
415I added "-uniform" because it allows randomness in the fixed lines
416(e.g. d4+e4 at 50%).  It has no effect if lines are deterministic
417(only one move for a given position).
418
419"-min-game 1" is characteristic for user books.  All moves are supposed
420to be safe so there is no reason to filter them with other heuristics.
421
422> polyglot make-book -min-score 50 -only-white -pgn w2.pgn -bin w2.bin
423
424This shows how min-score can actually be different for white and black
425(as with multiple books).  I don't use "max-ply" because "min-game"
426default value of 3 will limit depth somewhat.  You are of course free
427to use it.
428
429Same for black:
430
431> polyglot make-book -min-game 1 -uniform -only-black -pgn b1.pgn -bin b1.bin
432> polyglot make-book -min-score 40 -only-black -pgn b2.pgn -bin b2.bin
433
434At this point we have 4 .bin files.  Notice that different parameters
435were used for white and for black (not to mention that different PGN
436files can be used).
437
438---
439
440Let's now merge the white books.
441
442> polyglot merge-book -in1 w1.bin -in2 w2.bin -out w.bin
443
444Input files are not symmetrical, "in1" has priority over "in2".
445
446"skipped xxx entries." message from PolyGlot means there were some
447position conflicts.  This is normal since we want to overwrite some
448random moves with fixed lines instead.
449
450Same for black:
451
452> polyglot merge-book -in1 b1.bin -in2 b2.bin -out b.bin
453
454Now we can finally merge the white and black books.
455
456> polyglot merge-book -in1 w.bin -in2 b.bin -out book.bin
457
458It's important to check that there are no conflicts, otherwise
459something went wrong.
460
461Note that this last operation was only made possible thanks to colour
462filtering, otherwise nearly all positions would lead to conflicts.
463For this reason, it does not make much sense to mix old .bin files
464(which contain moves for both colours).
465
466All these command lines might seem numerous and complicated but they
467can be put together into batch files.
468
469
470Chess 960
471---------
472
473*** NEW ***
474
475PolyGlot now supports Chess 960.
476
477However note that most xboard interfaces like WinBoard do not (except
478perhaps on an Internet chess server)!
479
480Here are pointers to modified XBoard/WinBoard versions that are known
481to work with PolyGlot in Chess960 mode:
482
483http://www.ascotti.org/programming/chess/winboard_x.htm (Windows)
484http://www.glaurungchess.com/xboard-960.tar.bz2 (Unix)
485http://www.milix.net/aice (?)
486
487It is also possible that PolyGlot is useful in combination with
488Arena(!): Arena Chess960 works correctly in xboard mode but it seems
489not compatible with the official UCI standard.  With PolyGlot it is
490possible to include Chess960 UCI engines by using the xboard protocol
491instead.
492
493
494History
495-------
496
4972004/04/30: PolyGlot 1.0
498
499- first public release.
500
5012004/10/01: PolyGlot 1.1
502
503- added "StartupWait" and "PonderWorkAround" ("AutoQuit" was available
504  in version 1.0 but not documented).
505
506- fixed a minor bug that could prevent "AutoQuit" from working with
507  some engines.
508
5092005/01/29: PolyGlot 1.2
510
511- rewrote engine initialisation and UCI parsing to increase
512  UCI-standard compliance
513
514- added multi-move resign
515
516- added an internal work around for engines hanging with WinBoard
517
5182005/06/03: PolyGlot 1.3
519
520- added opening book
521
522- added kibitzing
523
524- added "ShowPonder" option
525
5262006/01/16: PolyGlot 1.4
527
528- added Chess960 (requires "fischerandom" xboard variant)
529
530- added "-only-white", "-only-black" and "-uniform" book-making
531  options
532
533- added "merge-book" command
534
535- added "CanPonder", "SyncStop" and "PromoteWorkAround" work arounds
536
537- fixed "Move Now" (the engine was interrupted but the move was
538  ignored)
539
540- fixed an UCI+draw problem that could occur with some engines after a
541  draw by 50 moves or repetition
542
543- fixed pondering behaviour: the engine will ponder only if it
544  declares the "Ponder" UCI option
545
546
547Known problems
548--------------
549
550The addition of Chess960 support lead to a change in internal-move
551representation for castling.  This slightly affected the opening-book
552format.  I recommend that you recompile books with this version.
553
554Fruit 2.2 and above handle both book formats though.
555
556---
557
558Several users reported engines losing on time.  The playing conditions
559always mixed playing on an Internet server with pondering.  Early
560log-file analysis did not reveal any misbehaviour by PolyGlot, but I
561have others to study.
562
563It is not yet clear what the source of the problem is, but let me
564state one more time that there is a forever incompatibility between
565the xboard and UCI protocol regarding a complex
566pondering/remaining-time relation.  I suspect this might be related to
567the problem described above and if so, it is possible that there is no
568clean solution to it!
569
570In any case I have other log file to study that might reveal
571something, stay tuned!
572
573
574Thanks
575------
576
577Big thanks go to:
578
579- Leo Dijksman for compiling, hosting the PolyGlot distribution on his web site
580  (see Links) and also for thorough testing
581
582- Tord Romstad, Joshua Shriver and George Sobala for compiling and
583  testing on Mac OS X
584
585- all those who reported problems or proposed improvements; I am not
586  well organised enough to provide their names!
587
588
589Links
590-----
591
592- Tim Mann's Chess Pages: http://www.tim-mann.org/xboard.html
593- Leo Dijksman's WBEC Ridderkerk: http://wbec-ridderkerk.nl/
594- Volker Pittlik's Winboard Forum: http://wbforum.volker-pittlik.name/
595
596
597Contact me
598----------
599
600You can contact me at fabien_letouzey@hotmail.com; expect SLOW answer,
601if at all!
602
603If I am not available, you can discuss PolyGlot issues in Volker
604Pittlik's Winboard Forum: http://wbforum.volker-pittlik.name/
605
606In fact for questions regarding specific Windows-only engines, you are
607advised to ask directly in the WinBoard forum, as I don't have Windows
608myself.
609
610
611The end
612-------
613
614Fabien Letouzey, 2006/01/16.
615
616

README1.4w

1=== PolyGlot 1.4W ====
2Polyglot 1.4W is a modified polyglot 1.4 from Fabien Letouzy.
3Just like polyglot 1.3w(see below) it can be compiled and run under windows without
4the need for a cygwin1.dll
5
6Best
7Fonzy
8www.geenvis.net
9=========1.4w10================
10fixed analysis output for toga
11=========1.4w9=================
12fixed bug in 1.4w8
13added RepeatPV workaround
14	fixed disappearing output in engine-output window while in multipv mode
15	when an engine sends its move to polyglot,
16	polyglot normally repeats the last pv string(which also contains score,depth and time usage) it got from the engine.
17	Some engines however do not send a new pv string just before sending the move and the now old pv string
18	find might confuse debugtools that parse the winboard debug files.
19	Adding "RepeatPV = false" to the [POLYGLOT] section of the ini file stops this repetition.
20
21=========1.4w8=================
22fixed multipv output
23note that the pv with the worst score will be on top of the engine-output window.
24added timestamp in logfile (Jaap Weidemann)
25
26=========1.4w7=================
27compiles under linux/unix again
28=========1.4w6=================
29access to winboard draw/drawoffer and resign
30
31	1:to activate draw offers the engine has
32	   to define the "UCI_DrawOffers" parameter with the 'option" command at startup.
33	2:to offer a draw or accept a draw offer:just send "info string DrawOffer" to polyglot.
34	3:if winboard sends "draw" polyglot sends "setoption DrawOffer draw" to the engine.
35	4.to resign: send "info string Resign" to polyglot.
36	please check the winboard documentation for the draw/drawoffer and resign commands.
37
38=========1.4w5:================
39Fixed errors in SyncStop handling.
40book building: the error message now also contains the game number
41added Affinity option:
42In the [PolyGlot] section(ini file):
43- "Affinity" mask
44mask is a bit vector in which each bit represents the processors that a process is allowed to run on.
45
46some minor bugs fixed
47
48checks if child did really quit.
49
50*********************************************************
51=== PolyGlot 1.3W ReadMe ===
52
53PolyGlot - a UCI-to-WinBoard Adapter for UCI Chess Engines
54Designed by Fabien Letouzey and Morning Yellow
55Version: 1.3W, Last Modified: Jan. 2006
56
57PolyGlot 1.3W is the modified version of 1.3 by Fabien Letouzey,
58which can be compiled and run under Windows without CygWin.
59
60The version of 1.3W has the following modifications:
611. Added a module, "pipe.h/pipe.cpp".
622. Removed two modules, "io.h/io.cpp" and "engine.h/engine.cpp".
633. Modified all statements related on these modules.
644. fixed "Move Now" (the bug fixed in PolyGlot 1.4).
65
66PolyGlot 1.3W can be downloaded from:
67http://www.elephantbase.net/download/polyglot.rar
68For information of "PolyGlot 1.3", see "readme.txt"
69For legal information, see "copying.txt"
70

README1.4w10UCI

1Description
2===========
3
4This is an enhanced version of Polyglot 1.4w10 which can be used as a book
5engine for Polyglot books on UCI GUIs. It also has some additional features
6(see below).
7
8Some GUIs like ChessBase do not support Winboard engines at all.  Other
9GUIs do support the Winboard protocol (like Arena) but you still lose
10the convenience of setting UCI options through the GUI.
11
12This new version of Polyglot is fully backward compatible and will in
13fact under normal circumstances autodetect the protocol.
14
15The following is a minimal polyglot.ini file to make an engine use
16Polyglot books.
17
18[Polyglot]
19EngineCommand = <path to engine>
20[Engine]
21
22By default this does not use any book but you can set the Polyglot book
23in the GUI through the exported UCI option "Polyglot BookFile".
24
25Any normal polyglot.ini file can be used with this version. The UCI
26options you set in the [Engine] section will be honored and the
27results will be shown in the GUI as "defaults".
28
29If you want to override the protocol autodetection (which should
30normally not be necessary) you can put
31
32UCI = true
33
34in the [Polyglot] section.
35
36Just like 1.4w10, this version of Polyglot compiles both under Linux
37and Windows.
38
39Some notes on Arena
40===================
41
42Up to version 1.99b5 Arena contained a bug with drive letters in UCI
43options. This bug has been fixed in 2.00.
44
45If you let Arena autodetect the engine type then it will use Polyglot
46in Winboard mode. So either configure the Polyglot adapter explicitly
47as a UCI engine in the Arena GUI, or else put UCI = true in the
48[Polyglot] section of polyglot.ini.
49
50
51