.\" ========================================================================
.\"
.IX Title "POLYGLOT 6"
-.TH POLYGLOT 6 "2009-01-13" "" ""
+.TH POLYGLOT 6 "2009-01-15" "" ""
.SH "NAME"
PolyGlot \- Winboard protocol to UCI protocol adapter
\- book engine for Polyglot books
- \- a collection of utilities for creating opening books
+ \- a collection of utilities for creating and analyzing opening books
\- a utility for analyzing epd files
\- a perft counter
.SH "SYNOPSIS"
.PP
polyglot merge-book \-in1 inputfile1 \-in2 inputfile2 [\-out outputfile]
.PP
+polyglot info-book [\-bin inputfile] [\-exact]
+.PP
+polyglot dumb-book [\-bin inputfile] \-color color [\-out outputfile]
+.PP
polyglot [configfile] epd-test [\-epd inputfile] [\-min\-depth depth] [\-max\-depth depth] [\-max\-time time] [\-depth\-delta delta]
.PP
polyglot perft [\-fen fen] [\-max\-depth depth]
by their own GUIs.
.PP
PolyGlot can compile a pgn file into a binary PolyGlot book and furthermore
-it can merge two such binary books into a third one.
+it can merge two such binary books into a third one.
+.PP
+PolyGlot can also extract some useful information from PolyGlot books. The utility
+\&\*(L"dump\-book\*(R" dumps the \*(L"lines\*(R" in a book for a given color. By definition
+a line is a sequence of moves (from the starting position) in which
+the given color makes only book moves and the other color makes
+arbitrary moves (i.e. not necessarily book moves).
+.PP
+Since a PolyGlot book is built up from positions and not lines there
+may be (and there usually are) many positions in the book that are not
+on a \*(L"line\*(R" as defined in the previous paragraph. It is convenient
+to call such positions \*(L"isolated\*(R" positions. The utility \*(L"info\-book\*(R"
+counts such isolated positions.
+.PP
+Some of the isolated positions are provably unreachable and they
+could in principle be deleted from the book. For example if a book
+contains only the move \*(L"e4\*(R" in the starting position but also the
+position after \*(L"d4 d5\*(R" then this last position is provably unreachable
+since it requires white to make a non-book move when a book move is
+available. Such situations arise frequently from the priority rules
+in merging books.
+.PP
+Unfortunately not all isolated positions are provably unreachable and
+it is difficult to identify the latter. If invoked with \*(L"\-exact\*(R" the
+utility info-book will attempt to count the isolated positions which
+require a player to make a non-book move when a book move is available.
+Due to the possibility of transpositions this is not a fool proof method.
.Sh "Epd test mode"
.IX Subsection "Epd test mode"
In epd test mode, PolyGlot will search positions in an epd file and
words when a position occurs both in \*(L"in1\*(R" and \*(L"in2\*(R" only the
moves and weights from \*(L"in1\*(R" will be retained in \*(L"out\*(R".
.PP
+When invoked
+as
+.Sh "polyglot dump-book"
+.IX Subsection "polyglot dump-book"
+PolyGlot supports the following options
+.IP "\fB\-bin\fR (default: book.bin)" 4
+.IX Item "-bin (default: book.bin)"
+Input file in PolyGlot book format.
+.IP "\fB\-color\fR" 4
+.IX Item "-color"
+The color for whom to generate the lines.
+.IP "\fB\-out\fR (default: book_<color>.txt)" 4
+.IX Item "-out (default: book_<color>.txt)"
+The name of the output file.
+.PP
+When invoked
+as
+.Sh "polyglot info-book"
+.IX Subsection "polyglot info-book"
+PolyGlot supports the following options
+.IP "\fB\-bin\fR (default: book.bin)" 4
+.IX Item "-bin (default: book.bin)"
+Input file in PolyGlot book format.
+.IP "\fB\-exact\fR" 4
+.IX Item "-exact"
+Attempt to count the provably unreachable positions among the isolated ones.
+Note that this takes a very long time.
+.PP
When invoked as
.Sh "polyglot epd-test"
.IX Subsection "polyglot epd-test"
\& polyglot merge\-book \-in1 w1.bin \-in2 w2.bin \-out w.bin
.Ve
.PP
-Here is a minimal config file
+The command line for using the \s-1UCI\s0 engine \*(L"fruit\*(R" in a \s-1GUI\s0 which uses the
+xboard protocol.
+.PP
+.Vb 1
+\& polyglot \-ec fruit
+.Ve
+.PP
+The equivalent config file:
.PP
.Vb 3
\& [PolyGlot]