Polyglot pickBest

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
D Sceviour
Posts: 442
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Polyglot pickBest

Post by D Sceviour » Thu Dec 29, 2016 12:43 am

How does one specify the Polyglot book pickBest variable for a tournament? Arena, CuteChess and Winboard do not have a pickBest variable checkbox. Should the pickBest flag be set by the user in an ini file?

An example of pickBest can be found in the source code for "PolyglotBook::probe()" in Stockfish version 4, book.cpp. Later versions of Stockfish seem to have deleted book.cpp. The pickBest flag determines whether the engine will select the best move playable in a Polyglot book, or a random move when several moves might be reasonable.

User avatar
hgm
Posts: 23474
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Polyglot pickBest

Post by hgm » Thu Dec 29, 2016 7:56 am

WinBoard has a 'Book Variation' setting (in the Common Engine Settings dialog). When you set that to 0 it only picks the move with the highest weight (randomly if there is more than one with that same weight). If it is 50, it plays the moves proprtionally to their weight, if it is 100, it plays all moves in the book with equal probability irrespective of their weight (except if the weight is 0).

The exact implementation is that it raises the weights to the power (100-var)/var, before using them as relative frequency.

D Sceviour
Posts: 442
Joined: Mon Jul 20, 2015 3:06 pm
Contact:

Re: Polyglot pickBest

Post by D Sceviour » Fri Dec 30, 2016 4:32 pm

hgm wrote:WinBoard has a 'Book Variation' setting (in the Common Engine Settings dialog). When you set that to 0 it only picks the move with the highest weight (randomly if there is more than one with that same weight). If it is 50, it plays the moves proprtionally to their weight, if it is 100, it plays all moves in the book with equal probability irrespective of their weight (except if the weight is 0).

The exact implementation is that it raises the weights to the power (100-var)/var, before using them as relative frequency.
That looks like another good reason for using Winboard! :) The 'Book Variation' could simulate various degrees of a binomial distribution for a selective book move.

Post Reply