AlphaZero learns to play board games from the rules alone, with no human games or game-specific knowledge. It replaces the two hand-built parts of traditional game programs with learned or general components: a neural network and Monte Carlo tree search. Everything is trained by self-play reinforcement learning.
Why Games
Games have been a long-standing testbed for decision making because they have simple rules, are easy to simulate and test, and still require very high-level decision making. Milestones include Deep Blue in chess (1997), DeepMind’s Atari agent (2013), and AlphaGo in Go (2016).
Searching a Game Tree
To win a game, search the game tree, which represents all possible moves. The tree is far too large to enumerate, so the search has to be selective.
Monte Carlo methods use repeated random sampling to estimate a quantity that is hard to compute exactly. Monte Carlo tree search (MCTS) applies this to the tree: it uses repeated random simulations to approximate the value of a node.
AlphaZero’s Two Components
| Traditional game program | AlphaZero replacement |
|---|---|
| Hand-crafted evaluation function and move-ordering heuristics | A neural network |
| High-performance search with domain-specific enhancements | General-purpose MCTS |
The network. A network takes the board position and outputs two things:
- a policy: a vector of move probabilities ;
- a value , the expected game outcome from this position.
How MCTS uses the outputs. The search runs many simulated self-play games from the root to a leaf. Moves in the simulation are chosen by combining low visit count (explore), high move probability (policy), and high estimated value.
| Network output | Role in the search | Saves |
|---|---|---|
| Policy | A prior that makes the search try promising moves first | Breadth |
| Value | Evaluates a leaf position directly instead of playing random games to the end | Depth |
After many simulations, the visit counts give improved move probabilities that are better than the network’s raw policy output.
Training by Self-Play
The network starts from random weights. Games are generated by choosing moves with MCTS, and each game’s outcome is scored for a win, for a draw, and for a loss. Parameters are updated by gradient descent to minimize a loss with two parts:
| Stored per position | Trains | Loss |
|---|---|---|
| Position and final result | Value output | Mean-squared error between the predicted value and |
| MCTS search probabilities | Policy output | Cross-entropy between the predicted policy and the search probabilities |
Example (illustrative). In a Go position the network’s policy gives move X 5% and move Y 30%. After 800 simulations the search explores Y often but also tests X; if X wins more often, the visit counts shift (say X 55%, Y 25%). Those proportions become the policy’s training target, so the network learns that X is better than it first thought.
The Knowledge Discovery Loop
search (deliberate thinking) finds better moves than the raw network
-> train the network to match what the search found (update intuition)
-> a better network guides better search -> repeat
This mirrors how people learn mathematics: counting on fingers gives addition, repeated addition gives multiplication, repeated multiplication gives exponents. Each learned skill is a building block for increasingly complex behavior. The same pattern, using slow computation to produce better answers and then training a fast model to reproduce them, appears in how language models are trained on their own step-by-step reasoning.
When the Recipe Transfers
AlphaZero succeeded with known rules, a cheap perfect simulator, and a clear win-or-lose reward, plus self-play for unlimited data. Domains that share these properties include chip layout, algorithm discovery, and formal theorem proving (a verifier checks every step). Domains that lack them are harder: drug design (imperfect simulators, expensive experiments, rewards that arrive years later) and negotiation (hidden information and no cheap simulator of real people; self-play agents can develop conventions humans do not share, so they need human data as an anchor).
Related Notes
- Actor-Critic Methods - Policy and value learned together, as in AlphaZero’s two-headed network.
- Temporal Difference Learning - The value-learning idea behind earlier game programs.
- World Models - Learned models that plan without being given the rules.
- Reinforcement Learning MOC - Domain dashboard.
Source: Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm (Silver et al., 2017). This summary follows lecture material on AlphaZero; the worked example and the “when the recipe transfers” section are illustrative and general knowledge, not from the paper. Please check the source.