Crate monte_carlo_tree_search

Source

Structs§

CountWdl
Counts accumulated wins, losses and draws for this part of the tree
CountWdlSolvedDelta
Delta propagated upwards from child to parent during backpropagation.
RandomPlayout
Search
A tree there the nodes represent game states and the links represent moves. The tree does only store the root game state and reconstruct the nodes based on the moves. It does store an evaluation for each node though. The evaluation is updated during each playout.
Ucb
UcbSolver
Obtain an initial bias by playing random moves and reporting the outcome.

Enums§

CountWdlSolved
Use an Upper Confidence Bound to select the next node to expand. In addition to the use of the “classic” upper confidence bound, this evaluation also features variants for states such as Draw and Win. This allows the tree search to proof the outcome of a game and turn into a weak solver. “Weak” in this context means that the solver would know if a move is a win, loss or draw, but not how many moves it takes to reach that outcome.
GameState
Possible states defining a game
Player
A player of a two-player game.

Traits§

CountWdlBias
CountWdlSolvedBias
Evaluation
Controls what information is stored for each board remembered in the nodes of the tree, how to change it during backpropagation and what criteria to use to select the next node to expand.
Explorer
Control selection, evaluation and backpropagation.
TwoPlayerGame
A game there players take alternating turns until it ends either a win for one of the players or a draw. Implement this trait for your game in order to use monte carlo tree search to find a strong move.

Functions§

random_play
Play random moves, until the game is over and report the score from the perspective of the player whose turn it is.