Simulated game trees

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

grahamj
Posts: 43
Joined: Thu Oct 11, 2018 2:26 pm
Full name: Graham Jones

Simulated game trees

Post by grahamj »

Last year I wrote some code to generate simulated game trees. I am mainly interested in algorithms like PUCT (LC0,A0) and realisation probabilities (which I've only seen used for Shogi). I'm not personally interested in alpha-beta pruning, but perhaps the simulator is of general interest.

The simulator provides a virtual tree of any size. You call functions like makeRoot() and expandNode() to make part of it. Each node contains the sequence of moves from root to itself, and this sequence is used to seed a PRNG (using std::seed_seq()). This means that different searches can search different parts of the virtual tree. If they both visit a particular node, they both see exactly the same thing.

The simulator has these components:
  • A model for the numbers of moves.
  • A model for the true evaluations.
  • A model for the estimated evaluations.
  • A model for the estimated policy (a probability distribution over moves, like LC0).
These are controlled by various parameters, which are listed below, each followed by a list of values. I may explain more later, if there's interest.

Code: Select all

Simulation parameters
nMovesOfRootsParent 10 30 50
nMovesScale 10 30 50 
nMovesStdDev 5.0
trueRootEval 0.1 0.3 0.5 0.7 0.9
trueEvalspread 0.1 0.2 0.3 0.4
estEvaldf 2.0 3.0 4.0
estEvalscalePar -1.0 0.0 1.0 5.0
estEvalscaleCh 0.2 0.3 0.4 0.5
policyEvaldf 2.0 3.0 4.0
policyEvalscaleCh 0.1 0.2 0.3
policyEvalscaleEE 0.1 0.2 0.3
policySoftmaxScale 10.0
rootSeed 4657624
BLsSeed 992377
treeIndicies 0 100
Graham Jones, www.indriid.com