MachineLearning/mcts library

Monte Carlo Tree Search (MCTS) - minimal implementation

Small, well-documented MCTS implementation suitable for deterministic or stochastic small games. The API expects the user to provide a light-weight State interface via callbacks (isTerminal, expand, reward, actions, next). This keeps the MCTS core generic and testable.

Classes

MCTS<S>
MCTSNode<S>

Typedefs

Expand<S> = List Function(S state)
IsTerminal<S> = bool Function(S state)
NextState<S> = S Function(S state, dynamic action)
Reward<S> = double Function(S state)