Games and Monte Carlo tree search
Minimax, alpha–beta, MCTS/UCT and learned search (AlphaGo, AlphaZero, MuZero).
From MDPs to an adversary
Markov decision processes treated the next state as chance: an average over . In a game, much of what happens next is chosen by an opponent whose goal is the opposite of ours. Averaging over their moves is a mistake. Games also break value iteration’s other assumption — that every state can be listed. Chess and Go have far more positions than a sweep could ever visit. Search forward from the current position instead.
Take a MAX root over three MIN replies with leaf values , , . Against random MIN the averages are , , , so the second move looks best. An adversary answers it with . The first move guarantees .
Minimax
Key idea. Value a position by the opponent’s best reply: the minimax value,
It is the Bellman optimality backup with expectation replaced by a minimum, and no discount because a game ends. Depth-first minimax visits every node: time . Tic-tac-toe from the empty board has nodes and value (a draw). Chess at and plies needs about nodes.
Alpha–beta
Alpha–beta passes bounds (best MAX can already force) and (best for MIN). A MIN node whose value drops to or below is abandoned — MAX will never go there. In the three-branch tree, left-to-right search evaluates of leaves and still returns . With perfect move ordering on a uniform tree of depth , it evaluates
leaves — about instead of . At , that is against . On tic-tac-toe, left-to-right alpha–beta visits nodes. Deep programs still cut off and use a hand-made evaluation; Go’s patterns defeated that approach.
The MCTS loop
Monte Carlo tree search needs no evaluation function. Each iteration: selection down the tree by a bandit rule; expansion of one untried move; simulation (random playout) to a terminal; backpropagation of the outcome along the path. After the budget, play the root move with the most visits — more robust than the highest mean.
UCT
Selection uses UCB1 / UCT:
Exploit the mean; explore under-visited children. With , children A , B , C and , the scores are , , : A wins, and C beats B on the bonus alone. UCT converges to the minimax decision as iterations grow; on the way, averages over an exploring policy can mislead (Nim : the winning move is found in runs after iterations, after , then after ).
Learned search
AlphaGo narrows breadth with a policy prior (PUCT) and shortens depth with a value network. AlphaZero drops human data and rollouts: one network trained on self-play visit counts and outcomes , with search as the policy-improvement operator. MuZero learns dynamics too and plans in a latent model that predicts only rewards, values and policies — value equivalence, not screen reconstruction.
Toward model-free learning
A language model can later serve as prior, value or world model inside the same search pattern (Planning with language models). Every method here still assumed a model: rules, a simulator, or experience from which to learn one. Next: drop that assumption and estimate Bellman values from the rewards the agent sees one transition at a time — Q-learning and temporal-difference learning.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Answers are saved on the server and tied to this browser until you sign in.