Fix and improve move choice with learning
[polyglot.git] / polyglot.pod
index 415902f..7b82121 100644 (file)
@@ -8,7 +8,7 @@ PolyGlot -  Winboard protocol to UCI protocol adapter
 
 =head1 SYNOPSIS
 
-polyglot [configfile] [-noini] [-ec engine] [-ed enginedirectory] [-en enginename] [-log] [-lf logfile] [-hash value] [-bk book] [-pg <name>=<value>]* [-uci <name>=<value>]*
+polyglot [configfile] [-noini] [-ec engine] [-ed enginedirectory] [-en enginename] [-log true/false] [-lf logfile] [-pg <name>=<value>]* [-uci <name>=<value>]*
 
 polyglot make-book [-pgn inputfile] [-bin outputfile] [-max-ply ply] [-min-game games] [-min-score score] [-only-white] [-only-black] [-uniform]
 
@@ -62,7 +62,7 @@ PolyGlot supports the "PolyGlot opening book format". This is the
 defacto standard non-proprietary opening book format. It is fully documented
 here
 
-http://alpha.uhasselt.be/Research/Algebra/Toga/book_format.html
+http://hgm.nubati.net/book_format.html
 
 Roughly speaking a PolyGlot opening book is a collection of triples
 (position, move, weight). A "position" is represented by a 64-bit
@@ -428,14 +428,35 @@ are ignored.
 
 This is the score in centipawns that will trigger resign "counting".
 
+=item B<QueenNeverResigns> (default: true)
+
+Suppresses resigning irrespective of the score,
+as long as the engine still has a Queen (hoping for a perpetual).
+
+=item B<HandleDraws> (default: false)
+
+When set Polyglot can accept draw offers on behalf of the engine,
+when the last reported engine score is below Polyglot's contempt.
+
+=item B<ContemptScore> (default: 30)
+
+This is the score in centipawns that the engine must minimally see
+in its own disadvantage before Polyglot will accept a draw offer.
+
 =item B<ShowPonder> (default: true)
 
 Show search information during engine pondering.  Turning this off
 might be better for interactive use in some interfaces.
 
+=item B<ShowTbHits> (default: false)
+
+Reports extra info on selective depth, search speed (knps) and
+tablebase hits at the beginning of the PV field in the thinking output
+of WinBoard protocol, just before the real PV.
+
 =item B<ScoreWhite> (default: true)
 
-Report score from white's point of view in xboard mode.
+Report score from white's point of view in xboard mode. (Wrecks XBoard...).
 
 =item B<KibitzMove> (default: false)
 
@@ -465,9 +486,11 @@ many seconds before doing the next kibitz.
 
 If true PolyGlot will not understand xboard commands. 
 
-=item B<MateScore> (default: 10000)
+=item B<MateScore> (default: 0)
 
 Mate score reported to GUI when in xboard mode.
+When set to 0 it uses the new CECP convention of reporting 100000 + N
+for mate in N moves, and -(100000 + N) for mated in N.
 
 =item B<Book> (default: false)
 
@@ -493,8 +516,16 @@ with the highest weight is selected.
 
 =item B<BookLearn> (default: false)
 
-Store learning information in the book (which must be writable). Currently
-no engine actually uses this information. 
+Switches on updating of the 'learn fields' of the opening book,
+which for each move record the number of times the move was played,
+and the number of half-points scored with it.
+It also switches on making use of this information already in the book,
+for altering the move-selection probabilities from those
+specified by the book weights.
+(Rarely played moves will be favored,
+moves with a significant poor performance will be shunned.)
+This option must be set before the book is specified,
+or the updating of the learn info will not work!
 
 =item B<BookDepth> (default: 256)
 
@@ -523,6 +554,13 @@ Win32 priority levels are mapped in a sensible way to Unix nice levels.
 This a bit vector in which each bit represents the processors that a
 process is allowed to run on. This option works only on Windows. 
 
+=item B<STFudge> (default: 20)
+
+PolyGlot will translate "st x" as "go movetime 1000*x-STFudge". 
+The rationale is that in the UCI specification the argument of movetime
+is defined as the exact search time whereas the argument of the
+st command is only an upperbound. 
+
 =item B<OnlyWbOptions> (default: true)
 
 If true then PolyGlot restricts the options it sends to those that
@@ -599,6 +637,9 @@ Standard UCI options are
     Hash 
     NalimovPath
     NalimovCache
+    GaviotaPath
+    GaviotaCache
+    SyzygyPath
     OwnBook
 
 Hidden options like "Ponder" or "UCI_xxx" are automatic
@@ -613,9 +654,9 @@ Running the UCI engine "fruit" under xboard 4.3.15 and later (this invokes PolyG
 
     xboard -fcp fruit -fUCI
 
-An explicit command line for using the UCI engine "fruit" with 128M hash in xboard with logging enabled (this also works on xboard 4.2.7).
+An explicit command line for using the UCI engine "fruit" with logging enabled (this works also with older versions of xboard).
 
-    xboard -fcp "polyglot -noini -log -ec fruit -hash 128"
+    xboard -fcp "polyglot -noini -log true -ec fruit"
 
 The equivalent config file would be:
 
@@ -623,7 +664,6 @@ The equivalent config file would be:
     EngineCommand = fruit
     Log = true
     [Engine]
-    Hash=128
 
 Compile "games.pgn" into a book "book.bin" retaining all lines of at
 most 30 plies.