Policy p(a|s)
Given state s, which actions a look worth considering?
Nature · 2016 An interactive paper guide
AlphaGo did not beat Go by searching everything. It learned which futures deserved attention—and which could be safely ignored.
THE ENTIRE IDEA, IN ONE SENTENCE
01 The problem
A 19×19 board begins with 361 empty intersections. Even after illegal or nonsensical moves are removed, a typical position may offer roughly 250 choices. Looking only a few turns ahead creates an astronomical tree.
BRANCHING LAB
Set the number of candidate moves AlphaGo considers at each step. The naive tree grows as
bd: branching factor b, depth d.
p(a|s)Given state s, which actions a look worth considering?
v(s)From state s, what final outcome should the current player expect?
N(s,a)Which promising actions continue to look good after simulated futures?
Corrects the networks02 The blueprint
AlphaGo is not one model. It is a training pipeline and a live decision engine. Select each stage to see what enters, what comes out, and why the next stage needs it.
INPUT
Strong human Go games from KGSLEARNS
Which move an expert chose from each boardUNLOCKS
A direct, high-quality training signalHuman games give AlphaGo a vocabulary of sensible Go before sparse win/loss rewards enter the picture.
03 Supervised policy
Before self-play, AlphaGo learns a simpler skill: look at a board and predict the exact move a strong human played. This becomes the search engine’s sense of where promising branches begin.
THE MODEL
Probability of move a, given board state s, under weights σ.
THE LOSS
Make the expert move more likely. This is ordinary cross-entropy classification over legal moves.
04 Reinforcement learning
The policy network keeps the same architecture and starts from the supervised weights. What changes is the objective: moves now receive credit or blame from the final result of self-play.
“Did I match the expert?”
maximize pσ(ahuman|s)
“Did this sequence win?”
maximize E[z]
POLICY GRADIENT
The log-probability gradient points toward making the sampled move more likely. The terminal outcome
zt decides whether to follow that direction or reverse it.
WHY PLAY PAST SELVES?
AlphaGo samples opponents from earlier checkpoints and adds a new snapshot to the pool every 500 iterations. The current policy must improve against a small league—not exploit one temporary self.
ρ = σ from human imitationpρ(·|s)05 The value network
This is the conceptual leap. Instead of rolling every promising position all the way to the end, AlphaGo trains a neural network to predict the expected outcome directly from the board.
s
TARGET
Expected outcome if both players continue under the strong reinforcement-learned policy.
REGRESSION LOSS
The error pushes winning positions toward +1 and losing positions toward −1.
GRADIENT UPDATE
Large mistakes create large corrections; already-correct estimates move only a little.
A DATASET TRAP
Adjacent positions differ by one move and share one outcome. Training on many positions from each game produced a large train–test gap. The fix: keep one position from each newly generated self-play game.
06 APV-MCTS
One simulation walks from the current board to a leaf, evaluates that future, and sends the evidence back to every move along the path. Repeat thousands of times; choose the most visited root move.
At each node, select the action with the highest known value plus an exploration bonus. High-prior, under-visited moves receive more attention.
INTERACTIVE PUCT LAB
Adjust any prior, value, or visit count. The highest Q + U wins the next simulation.
LEAF EVALUATION
The deep value network is smart but approximate. The fast rollout reaches a real terminal score, but follows a weaker policy and is noisy. Original AlphaGo gave both a voice.
P(s,a) is the supervised policy prior. Nv, Wv track value-network evidence; Nr, Wr track rollout evidence.
Values are from the player-to-move perspective. The player changes at every edge, so a good leaf for one player is bad for the other.
A high Q can come from a few lucky evaluations. A high visit count means a move repeatedly survived the search policy, making it more robust to outliers.
A thread temporarily makes its chosen edge look busier and worse. Other CPU threads spread out instead of duplicating the same path. When the simulation returns, the fake loss is removed and the real result is added.
07 Systems engineering
Tree traversal is irregular and branch-heavy; neural networks thrive on dense parallel math. AlphaGo separates them, keeps both busy, and accepts slightly stale search statistics for much higher throughput.
SINGLE MACHINE
DISTRIBUTED ALPHAGO
Use a cheap placeholder tree policy, queue deep-policy evaluation, and replace priors when the result arrives.
CPU rollout results and GPU value predictions return at different times, so AlphaGo backs them up asynchronously.
After a real move, the chosen child becomes the new root. Its entire searched subtree remains useful.
The most accurate network is not automatically the strongest engine if it reduces the number of searches that fit the clock.
08 Results & meaning
The breakthrough was the composition: learned priors, learned evaluation, completed rollouts, statistical search, and enough systems throughput to run the loop under a real match clock.
THE MODEL TO KEEP IN YOUR HEAD
“These branches look promising.”
“This future looks favorable.”
“This branch survived repeated tests.”
“Run enough tests before the clock expires.”
AlphaGo turns an impossible exhaustive search into a focused conversation between learned intuition and statistical evidence.
CAN YOU EXPLAIN IT NOW?
What problem does this component solve?
What enters it, and what comes out?
How is it trained or computed?
Why is the supervised policy still used after RL?
Why does MCTS choose visits, not the largest raw Q?
+ Field notes
sThe complete current Go position.
aA legal move from the current state.
P(s,a)How promising the network thinks a move looks before search evidence.
N(s,a)How many simulations traversed an edge.
W(s,a)The accumulated outcomes backed up through an edge.
Q(s,a)How well an action has performed across its simulations.
z+1 for a win, −1 for a loss, from the relevant player’s perspective.
λHow AlphaGo balances rollout and value-network evidence.