Polyglot and make-book

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 7025
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Polyglot and make-book

Post by Rebel »

HGM, now that I have things to work I started reading your excellent documentation of the Polygot options. On there I read:
BookLearn (default: false)
This is a noop.
But elsewhere I read the learning stuff does things. Can you say a few words about this option?
BookTreshold (default: 5)
Do not play moves with a weight (probability) lower than this (in per mil).
When editing a Polyglot book I (elsewhere) read that setting the weight to zero may cause problems. Is that still the case in the latest version? Or is it simply better in case you want to mark a move as "don't play" set the weight to "1" and use the "BookTreshold" option, what do you advice?
User avatar
hgm
Posts: 27844
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Polyglot and make-book

Post by hgm »

I suppose it depends on the version the documentation belongs to. For version 2.0.3 it reads:

Code: Select all

       BookLearn (default: false)
           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!
There is another fork of Polyglot (currently at version 1.4.70b) where Michel disabled the learning code; the documentation you link to might be for that version. (To which I made no contribution, BTW, also not to the manual.)

As to the weight 0 business: this is certainly fixed in my fork. It was due to a spurious assert that verified the book-building process, to check that only moves with non-zero weight would be included by the book. IMO it should never have been applied in the probing code, where you could after all be probing a book where people had hand-tuned the weights, and where there could be good reasons to not delete a move with zero weight (e.g. to make it easier to re-enable it).

Because of the assert Polyglot would quit with an error message (perceived by the GUI as a crash) when it probed a move with weight 0, and other software (in particular SCID) started to use work-arounds for that, where the set the weight to 1 when a user requested weight 0 during book editing. But Polyglot 2.x.x no longer has this problem, and WinBoard does not treat weight 0 as special in any way, neither on probing nor on editing/saving.
User avatar
Rebel
Posts: 7025
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Polyglot and make-book

Post by Rebel »

All clear, thanks.