Game independent Opening Book Construction. More...
Classes | |
class | SgBookNode |
State in the Opening Book. More... | |
class | SgBookBuilder |
Base class for automated book building. More... |
Game independent Opening Book Construction.
Code is based on Thomas R. Lincke's paper "Strategies for the Automatic Construction of Opening Books" published in 2001.
We make the following adjustments:
We also think there is a typo with respect to the formula of epo_i on page 80. Namely, since p_i is the negamax of p_{s_j}s, then we should sum the values to find the distance from optimal, not subtract. That is, we use epo_i = 1 + min(s_j) (epb_{s_j} + alpha*(p_i + p_{s_j}) instead.
Due to transpositions, it is possible that a node's value changes, but because the node has not been revisited yet the information is not passed to its parent.
Refreshing the book forces these propagations.
SgBookBuilder::Refresh() computes the correct propagation value for all internal nodes given the current set of leaf nodes. A node in which SgBookNode::IsLeaf() is true is treated as a leaf even if it has children in the book (ie, children from transpositions)
The book cover operation ensures that a given set of lines is covered with the required number of expansions.
When completed, each position in each line will have had at least the required number of expansions performed from it.
For each line, each position is processed in order. Expansions are performed until the required number are obtained (nothing is done if it already has enough). Then the next position in the line is processed.
If the additive flag is true, then the given number of expansions are added to the node no matter how many expansions it has already received.
A book refresh should be performed after this operation.