version 1.4b27
[polyglot.git] / README
diff --git a/README b/README
index 0fcb8b7..0a147f9 100644 (file)
--- a/README
+++ b/README
@@ -5,19 +5,26 @@ POLYGLOT(6)                                                        POLYGLOT(6)
 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 open-
+       ing books
                 -  a utility for analyzing epd files
                 -  a perft counter
 
 SYNOPSIS
        polyglot [configfile]
 
+       polyglot -ec engine
+
        polyglot make-book [-pgn inputfile] [-bin outputfile] [-max-ply ply]
        [-min-game games] [-min-score score] [-only-white] [-only-black] [-uni-
        form]
 
        polyglot merge-book -in1 inputfile1 -in2 inputfile2 [-out outputfile]
 
+       polyglot info-book [-bin inputfile] [-exact]
+
+       polyglot dumb-book [-bin inputfile] -color color [-out outputfile]
+
        polyglot [configfile] epd-test [-epd inputfile] [-min-depth depth]
        [-max-depth depth] [-max-time time] [-depth-delta delta]
 
@@ -45,6 +52,17 @@ DESCRIPTION
        engine and vice versa, except that it will play book moves on behalf of
        the engine when the occasion arises.
 
+       The engine options are exported as UCI options in UCI mode and as "fea-
+       ture option=" commands in xboard mode. The latter form an extension of
+       the xboard protocol as defined by H.G. Muller.
+
+       Options which normally appear in the [PolyGlot] section of the config
+       file (see below) are exported as options with their name prefixed by
+       "Polyglot". This makes it easy to filter them in the GUI.
+
+       NOTE: Not all options are exported, only those that make sense in the
+       given mode.
+
        Book making utilities
 
        PolyGlot supports the "PolyGlot opening book format". This is the
@@ -65,6 +83,33 @@ DESCRIPTION
        PolyGlot can compile a pgn file into a binary PolyGlot book and fur-
        thermore it can merge two such binary books into a third one.
 
+       PolyGlot can also extract some useful information from PolyGlot books.
+       The utility "dump-book" dumps the "lines" in a book for a given color.
+       By definition a line is a sequence of moves (from the starting posi-
+       tion) in which the given color makes only book moves and the other
+       color makes arbitrary moves (i.e. not necessarily book moves).
+
+       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 "line" as defined in the previous paragraph. It is convenient to
+       call such positions "isolated" positions. The utility "info-book"
+       counts such isolated positions.
+
+       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 "e4" in the starting position but also the position after
+       "d4 d5" 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.
+
+       Unfortunately not all isolated positions are provably unreachable and
+       it is difficult to identify the latter. If invoked with "-exact" 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.
+
        Epd test mode
 
        In epd test mode, PolyGlot will search positions in an epd file and
@@ -84,6 +129,14 @@ OPTIONS
 
        When invoked as
 
+       polyglot -ec engine
+
+       PolyGlot simply starts "engine" and acts as an adapter. No config file
+       is used and thus it is expected that all properties will be set by the
+       GUI.
+
+       When invoked as
+
        polyglot make-book
 
        PolyGlot supports the following options
@@ -137,6 +190,34 @@ OPTIONS
 
        When invoked as
 
+       polyglot dump-book
+
+       PolyGlot supports the following options
+
+       -bin (default: book.bin)
+           Input file in PolyGlot book format.
+
+       -color
+           The color for whom to generate the lines.
+
+       -out (default: book_<color>.txt)
+           The name of the output file.
+
+       When invoked as
+
+       polyglot info-book
+
+       PolyGlot supports the following options
+
+       -bin (default: book.bin)
+           Input file in PolyGlot book format.
+
+       -exact
+           Attempt to count the provably unreachable positions among the iso-
+           lated ones.  Note that this takes a very long time.
+
+       When invoked as
+
        polyglot epd-test
 
        (possibly with a config file as first argument) PolyGlot supports the
@@ -149,9 +230,9 @@ OPTIONS
            Unconditionally stop the seach after this amount of time.
 
        -depth-delta (default: 3)
-           Stop the search if the best move has been constant for this many
-           depths, on condition that the mininal depth and minimal time have
-           been reached.
+           Stop the search if the solution as been found and the best move has
+           been constant for this many depths, on condition that the mininal
+           depth and minimal time have been reached.
 
        -min-depth (default: 8)
            Minimal search depth when the search is stopped using
@@ -185,7 +266,7 @@ CONFIG FILE FORMAT
            option = value
            ...
 
-       Lines starting with "#" are ignored.
+       The characters "#" and ";" serve as comment characters.
 
        NOTE: There can be spaces in option names or values.  Do not use
        quotes. Boolean values are written as "true" or "false".
@@ -243,6 +324,9 @@ CONFIG FILE FORMAT
            Show search information during engine pondering.  Turning this off
            might be better for interactive use in some interfaces.
 
+       ScoreWhite (default: true)
+           Report score from white's point of view in xboard mode.
+
        KibitzMove (default: false)
            Whether to kibitz when playing a move.
 
@@ -259,9 +343,19 @@ CONFIG FILE FORMAT
            effect only if "KibitzPV" is selected, move kibitzes are always
            sent regardless of the delay.
 
+       KibitzInterval (default: 0)
+           This is another form of throttling. PolyGlot will usually wait this
+           many seconds before doing the next kibitz.
+
        UCI (default: false)
            If true PolyGlot will not understand xboard commands.
 
+       Chess960 (default: false)
+           Play Chess960 (also called Fischer Random Chess or FRC),
+
+       MateScore (default: 10000)
+           Mate score reported to GUI when in xboard mode.
+
        Book (default: false)
            Indicates whether a PolyGlot book should be used.  This has no
            effect on the engine own book (which can be controlled with the UCI
@@ -271,21 +365,12 @@ CONFIG FILE FORMAT
            book.  Remember that PolyGlot is unaware of whether the engine is
            itself using a book or not.
 
-       Chess960 (default: false)
-           Play Chess960 (also called Fischer Random Chess or FRC),
-
-       MateScore (default: 10000)
-           Mate score reported to GUI when in xboard mode.
-
        BookFile (default: book.bin)
            The name of the (binary) book file.  Note that PolyGlot will look
            for it in the directory it was launched from, not in the engine
            directory.  Of course, full path can be used in which case the cur-
            rent directory does not matter.
 
-           NOTE: When using PolyGlot with a UCI GUI this parameter can be set
-           via the UCI option "Polyglot BookFile".
-
        BookRandom (default: true)
            Select moves according to their weights in the book. If false the
            move with the highest weight is selected.
@@ -349,9 +434,11 @@ CONFIG FILE FORMAT
        RepeatPV (default: true)
            When true, PolyGlot repeats the last pv string (which also contains
            score,depth and time usage) it got from the engine. Some engines
-           however do not send a new pv string just before sending the move
-           and the now old pv string might confuse debugtools that parse the
-           winboard debug files.
+           however do not send a new pv string just before sending the move.
+           In that case the output of PolyGlot would be inconsistent.  When
+           RepeatPV is false PolyGlot does not repeat the last pv string.  Due
+           to the way kibitzing is implemented, KibitzMove is disabled in that
+           case.
 
        [Engine] section
 
@@ -383,11 +470,25 @@ EXAMPLES
 
            polyglot make-book -pgn games.pgn -bin book.bin -max-ply 30
 
-       Merge books "in1.bin" and "in2.bin" into a book "out.bin".
+       Merge books "w1.bin" and "w2.bin" into a book "w.bin".
 
            polyglot merge-book -in1 w1.bin -in2 w2.bin -out w.bin
 
-       Here is a minimal config file
+       Inspect lines for white in "w.bin"
+
+           polyglot dump-book -bin w.bin -color white -out w_white.txt
+
+       Test epd file "test.epd" with a (maximum) search time of 7 minutes per
+       position
+
+           polyglot epd-test -epd test.epd -max-time 420
+
+       The command line for using the UCI engine "fruit" in a GUI which uses
+       the xboard protocol.
+
+           polyglot -ec fruit
+
+       The equivalent config file:
 
            [PolyGlot]
            EngineCommand = fruit
@@ -411,4 +512,4 @@ SEE ALSO
 
 
 
-                                  2009-01-10                       POLYGLOT(6)
+                                  2009-07-26                       POLYGLOT(6)