Runs iterations MCTS playouts (or stops earlier when time_budget is
exceeded) and returns a per-root-move summary.
Arguments
- game
An
mxo_gameobject.- iterations
Integer scalar, maximum MCTS iterations. Default
1000L.- c_uct
Exploration constant. Default
1.4.- rollout
One of
"heuristic"(default, epsilon-greedy over a 1-ply evaluator) or"random"(uniform legal).- branch_policy
One of
"promising"(default),"all","none". Seemxo_search()for the trade-off.- time_budget
Optional numeric. If supplied, stops once the elapsed elapsed time reaches this many seconds. The budget is cooperative: it is checked during tree selection and rollouts, but one move-generation or evaluation operation may finish after the deadline.
- rollout_depth
Maximum rollout depth in plies. Defaults to the game's
ply_cap.- epsilon
Probability of taking the greedy move during a heuristic rollout. Default
0.7.- seed
Optional integer seed for reproducible runs.
Examples
g <- mxo_new_game(n = 3L, k = 3L)
set.seed(1)
# Use random rollouts here;
# heuristic rollouts are stronger but call mxo_evaluate() per step.
res <- mxo_mcts(g, iterations = 30L, branch_policy = "none",
rollout = "random")
res$move
#> # A tibble: 1 × 5
#> kind L_src t_src idx player
#> <chr> <int> <int> <int> <int>
#> 1 present 0 0 0 1