mctsSearch
mctsSearch<
S,M,P>(game,state,options?):MctsResult<M>
Defined in: src/modules/game-search/mcts.ts:76
Looks ahead with Monte Carlo tree search and returns the most promising move
for the player to move in state.
Each iteration walks down the tree that has been built so far, favouring moves that did well (UCT), adds one new position, plays it out with random moves to the end of the game and credits the result to every move on the way. A move is credited to the player who made it, so any number of players and moves that leave the same player to move work. The tree lives for one call.
Throws when a budget option or exploration is negative or not a number.
Type Parameters
Section titled “Type Parameters”S
M
P = number
Parameters
Section titled “Parameters”SearchGame<S, M, P>
S
options?
Section titled “options?”MctsOptions<S, M, P> = {}
Returns
Section titled “Returns”MctsResult<M>