AlphaZero: Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm
One algorithm, given only the rules, taught itself chess, shogi, and Go by playing against itself.
A neural network suggests moves and judges positions, a tree search uses those guesses to find better moves, and the network is trained to copy what the search found. Repeated over millions of games, the loop went from random play to Stockfish's strength in four hours of training.
Explaining the paperMastering Chess and Shogi by Self-Play with a General Reinforcement Learning AlgorithmIn December 2017 DeepMind showed that the method behind AlphaGo Zero needed almost nothing Go-specific. The same code, retrained from scratch on chess and on shogi, beat the world-champion program in each: Stockfish in chess and Elmo in shogi.
For at least four decades the strongest chess programs were built the same way. A programmer writes an evaluation function, a weighted sum of features such as material, pawn structure, king safety and mobility, and an alpha-beta search looks as many moves ahead as the clock allows, scoring the positions at the end of each line with that function and assuming both sides reply with their best move. The strongest engine of 2016, Stockfish, adds decades of refinements on top: an opening book, endgame tablebases, and a long list of pruning and move-ordering heuristics written for chess. The paper's Methods section lists them and then states that AlphaZero uses none.
AlphaZero replaces the evaluation function with a neural network and the alpha-beta search with a Monte-Carlo tree search, and it learns everything from games against itself, starting from random weights. The authors' phrase for this is tabula rasa, a blank slate. The only game knowledge it gets is the rules (which moves are legal, when a game is over, who won) and a fixed way of writing a board and a move as arrays of numbers. A separate copy was trained for each of chess, shogi and Go. The chess copy passed Stockfish after 4 hours of training, and in a 100-game match it won 28, drew 72 and lost none. The direct successor, MuZero, later removed the need to be told the rules.
Five pieces explain the paper, and the sections follow them in order: the self-play loop and why it improves; the network and its loss; the tree search that turns the network's guesses into better moves; the board and move encoding; and the paper's argument for why an averaging search suits a neural evaluator better than minimax. The last sections cover what changed from AlphaGo Zero, the results, and the criticism of the chess match.
How AlphaZero works: the self-play loop
The system has one network, . Given a position , it returns a vector of move probabilities, with for each move , and a single number , its estimate of the final result of the game from this position. The result takes the value for a win, for a draw and for a loss, from the point of view of the player to move, and is trained toward its expected value, . For chess the input is an 8×8×119 array, has 4,672 entries (one per possible move code, with illegal moves masked out), and is a scalar. One forward pass produces both outputs, with no look-ahead.
Before each move, AlphaZero runs a tree search from the current position: 800 simulations during training, each of which walks down a growing tree of future positions and asks the network to evaluate one new position. The search returns a second distribution over moves, written , proportional to how often it visited each move. Because the search starts from and then checks the consequences of the moves it considers, is usually a stronger policy than . AlphaGo Zero called the search a policy-improvement operator for this reason: it takes the network's policy as input and outputs a better one, at the cost of 800 network calls instead of one.
Self-play turns that improvement into training data. AlphaZero plays a full game against itself, choosing every move from , and records each position together with the computed there. When the game ends, the rules give the result, and every recorded position gets the label from the side that was to move there: if White won, positions with White to move get and positions with Black to move get . An 80-move game therefore yields 80 training examples . The network is trained to move toward and toward . The next search then starts from the updated prior and value estimate, so its targets improve again.
This alternation of evaluating a policy and improving it is policy iteration, a standard scheme in reinforcement learning, with the network as the fast policy and the search as the improvement step. The same split appears in the independent Expert Iteration paper from the same year, which calls the search the "expert" and the network the "apprentice" and demonstrated it on the board game Hex. The figure runs the loop: the four stages go round, and the bar at the bottom fills as successive laps raise the network's strength.
No human games enter this loop. The whole procedure for one game fits in a few lines:
# one self-play game, then the learning update
s, history = start_position(), []
while not s.terminal():
pi = mcts(s, net, sims=800) # visit-count policy over legal moves
history.append((s, pi, s.to_move))
a = sample(pi) # training games: proportional to visits
s = s.apply(a)
result = s.outcome_for_white() # +1, 0 or -1 under the real rules
for (s, pi, player) in history:
z = result if player == WHITE else -result # outcome for the mover
grad_step(net, s, pi, z) # minimise (z - v)^2 - pi . log p + c||theta||^2The value target is the actual result of the game, the same number (up to sign) for every position in it. There is no intermediate reward and no bootstrapped estimate. The Q-learning target in DQN, by contrast, is built from the network's own estimate of the next state's value. A game outcome is an unbiased sample of how the current policy does from that position, and its cost is variance: one blunder near the end relabels every position in the game.
The network and its loss
The network is a deep residual network: a stack of convolutional residual blocks that reads the board as an image, with a policy head that outputs and a value head that outputs on top of a shared body. The preprint does not restate the architecture; it says the network and the training settings are those of AlphaGo Zero unless noted. AlphaGo Zero's Methods describe 256-filter 3×3 convolutions with batch normalization and ReLU, in towers of 19 or 39 residual blocks after an initial convolution. The original AlphaGo used two separate networks for policy and value; AlphaGo Zero merged them so one set of features serves both outputs.
Each training example is a position , the search policy computed there, and the game result . The loss, minimised by gradient descent, is
The first term is the squared error between the predicted value and the actual result . The second is the cross-entropy between the search policy and the network's policy . The minus sign in front makes it non-negative, since every is at most 0, and for a fixed it is smallest exactly when . The paper's prose says the update should "maximise the similarity of the policy vector to the search probabilities "; that is the same objective with the sign flipped. The third term is L2 weight regularisation with coefficient . The preprint gives no value for ; AlphaGo Zero used .
A worked example with three legal moves. The game was won, so , and the network predicted . The search visited the moves in proportions , and the network's policy was . Then
If the network had output , the policy term would be 0.802, the entropy of , which is the floor for this target. With a softmax output layer, the gradient of the policy term with respect to the network's logits is , here : the update raises the logit of the search's favourite and lowers the other two. The value gradient pushes up from 0.2 toward 1. Both gradients flow into the shared body.
Two design choices in (1) have obvious alternatives. Training toward the whole visit distribution, rather than toward the one move that was played, gives the network the search's ranking of every move it considered, including the second- and third-best, instead of one sampled index. Using the game result as the value target, rather than the search's own value estimate, keeps the target unbiased; MuZero later switched to a bootstrapped target built from search values, trading some bias for lower variance.
The training configuration is the same for all three games: 700,000 steps with mini-batches of 4,096 positions (about 2.9 billion position samples), and a learning rate of 0.2 dropped three times, to 0.02, 0.002 and 0.0002. Self-play games came from 5,000 first-generation TPUs and training ran on 64 second-generation TPUs. The split reflects the cost: every move of every self-play game costs 800 network evaluations, while a training step costs one batch. In chess, 44 million self-play games were played in 9 hours.
The search: PUCT, 800 simulations, no rollouts
The search is AlphaGo Zero's, unchanged. The AlphaZero preprint describes it in one sentence (each simulation picks moves with "low visit count, high move probability and high value") and defers to AlphaGo Zero for the formulas, which are given below from that paper's Methods. The settings AlphaZero states are 800 simulations per move in training and the root noise of the next section.
The search builds a tree whose root is the position to move from. Each edge, meaning a move from a position , stores four numbers: the visit count , the total value backed up through it, the mean value , and the prior that the network assigned when was first evaluated. One simulation has three steps. It selects a path from the root, at each node choosing the that maximises
until it reaches a position that has not been expanded. It then expands that leaf: the network evaluates it once, its value becomes the simulation's result, and its policy output becomes the priors of the new edges, which start with . If the leaf is a finished game, the rules score it instead. Last, it backs up: every edge on the path gets and , so stays the mean of all leaf values that passed through the edge. In a two-player game the value is stored from the point of view of the player choosing at each edge, so its sign flips at every level of the tree; the papers leave this bookkeeping implicit. There is no random playout to the end of the game, which the original AlphaGo and classical Monte-Carlo tree search used. "Monte-Carlo" here refers to the averaging of leaf evaluations in .
In (2), favours moves whose explored consequences have scored well, and is an exploration bonus, scaled by a constant that sets how much exploration counts against the value . The bonus is proportional to the prior, so the network's favourite moves are tried first, and it shrinks like as a move collects visits, so attention moves on to other candidates. The numerator grows with the parent's total visit count, so the bonus of an unvisited move keeps rising as the other moves are explored. This is PUCT, a variant of Rosin's 2011 bandit rule. It has no logarithm, unlike the UCB1 rule of classical Monte-Carlo tree search; the square root is over the parent's total visits, and the keeps an unvisited move's bonus finite.
A worked step, using the toy numbers in Figure 2 with . Six moves have priors for to , and in this toy each move's leaf evaluations always return the same value, 0.42 for and 0.78 for (the best). The first five simulations all go to , the prior's favourite. At the sixth, the root has 5 visits in total, so the score of is
while the unvisited , with , scores from its bonus alone
The search tries , sees 0.78, and from then on keeps winning the comparison: after 20 simulations it has 12 visits to 's 5. When the simulations run out, AlphaZero picks what to play from the visit counts, not from :
The temperature controls how greedy the choice is. At moves are sampled in proportion to their visits; as the choice becomes the most-visited move. AlphaGo Zero used for the first 30 moves of each self-play game and afterwards. The AlphaZero preprint states that training moves are "selected in proportion to the root visit count" and that evaluation games play the most-visited move. Visit counts are used because a move only accumulates visits after its has held up over many simulations, while the of a rarely visited move can rest on one or two leaf evaluations. The same normalised visit counts are the target in loss (1).
In the figure, the amber dashed ticks are the network's prior over the six moves, and the teal bars are the share of simulations each move has received so far, with its value printed above once visited. Scrub the simulations to watch the visits start on and move to . Then drag to its ends. Below about 0.2 the search never tries : the bonus is too small for any unvisited move to beat 0.42. At 10 the bonus dominates for all 160 simulations and the visits stay close to the prior.
A simulation is select, expand, back up. In pseudocode, with the sign flip written out:
# one of the 800 simulations
node, path = root, []
while node.is_expanded: # 1. SELECT by PUCT
a = argmax(Q(node, b) + c_puct * P(node, b) * sqrt(N_total(node))
/ (1 + N(node, b)) for b in node.legal_moves)
path.append((node, a))
node = node.child(a)
if node.terminal:
v = node.score_by_rules() # rules score a finished game
else:
p, v = net(node.state) # 2. EXPAND: one network call,
node.expand(priors=mask_illegal(p)) # no random playout
for (s, a) in reversed(path): # 3. BACK UP
v = -v # value for the player at s
N[s, a] += 1; W[s, a] += v; Q[s, a] = W[s, a] / N[s, a]Running it 800 times and reading off the root visit counts gives both the next move and the policy target for training. The chess network at training time spent about 40 ms on those 800 simulations; shogi took 80 ms and Go 200 ms.
Root noise, the one per-game setting
If self-play always followed the search, it would keep playing the lines the current network already likes, and a good move with a low prior might never get the visit that reveals its value. AlphaGo Zero fixed this by mixing random noise into the priors at the root of each search, and AlphaZero keeps the mechanism:
is a random probability vector over the legal moves, drawn from a symmetric Dirichlet distribution. The weight 0.25 is AlphaGo Zero's . Only the root gets noise; deeper nodes use the network's priors as they are. The concentration sets the shape of the noise. With much smaller than 1, nearly all of lands on one or two random moves; with much larger than 1, is close to uniform and adds the same small amount to every move.
is the one hyperparameter AlphaZero sets per game: 0.3 for chess, 0.15 for shogi and 0.03 for Go, "scaled in inverse proportion to the approximate number of legal moves in a typical position". A typical chess position has about 35 legal moves and a Go position about 250. The inverse scaling keeps one quantity roughly fixed. For a symmetric Dirichlet over moves, the expected sum of squared shares is , so the effective number of moves the noise covers is about
In both games the noise pushes extra prior mass onto roughly eight or nine random moves. Using chess's 0.3 in Go would spread the noise across about 58 moves, each getting too little to matter; using Go's 0.03 in chess would put it on about two. In the figure, the bars are one draw of sorted from the largest share to the smallest. Switch the game, drag across its range, and press new draw a few times.
The 35 and 250 are the usual textbook branching factors; the preprint says only "the approximate number of legal moves" and does not give its counts. The paper's list of the domain knowledge given to AlphaZero names this number as item (iv), next to the rules and the encodings.
The board and the moves as planes
A convolutional network needs its input as a grid of numbers, so AlphaZero writes a position as a stack of planes, each plane a binary or constant-valued feature over the board. The same convolution filters slide over every square, which suits board games, where the same local patterns matter everywhere. The board is always oriented from the point of view of the player to move.
The input is an stack. The planes describe one position: one plane per piece type for each player, and repetition counts. They are repeated for the last positions (zeros before the game began), so the network sees how the position arose. The constant planes are added once: whose turn it is, the move number, and for chess the four castling rights and the no-progress counter that drives the 50-move rule. Only the per-step block is multiplied by 8. Chess has 6 + 6 piece planes and 2 repetition planes per step, plus 7 constants, for planes. Shogi adds 14 prisoner-count planes per step (7 captured-piece types per player) to 14 + 14 piece planes and 3 repetition planes, plus 2 constants, for . Go needs one stone plane per player and a colour plane, .
The policy output is a stack of planes too. A chess move is "pick up the piece on this square, then make this kind of move", so each of the 64 squares is crossed with 73 move types: 56 "queen moves" (8 compass directions × distances 1 to 7), 8 knight jumps, and 9 underpromotions. That is codes, most of them illegal in any given position; illegal codes are masked to probability zero and the rest renormalised. Shogi uses : 64 queen-move planes, 2 knight planes, the same 64 + 2 again for moves that promote, and 7 planes for dropping a captured piece of each type onto a square, a rule that widens shogi's game tree well beyond chess's. Go keeps AlphaGo Zero's flat list of moves (every point plus pass). Toggle the game and hover a band of the output bar to see each group:
The name "queen moves" describes a geometry that every sliding piece shares. Those 56 planes hold every straight-line move of any piece: a rook sliding three squares north, a bishop sliding one square northeast, a king step, a pawn push or a pawn capture. The piece itself is not part of the code; the network finds it in the input planes. A pawn that reaches the last rank through an ordinary queen-move plane promotes to a queen, so only promotions to knight, bishop or rook need the 9 extra planes (3 pieces × push, capture left, capture right). Place a piece and hover the highlighted squares to read the plane each move uses:
A queen on d4 uses 27 of the 73 planes on an empty board, a queen in the corner 21, a knight in the corner 2. The paper also tried a flat list of moves for chess and shogi and reports that "the final result was almost identical although training was slightly slower", so the plane layout mainly speeds up training.
Why an averaging search can beat minimax
AlphaZero examines far fewer positions than the engines it beat: 80 thousand per second in chess against Stockfish's 70 million, and 40 thousand in shogi against Elmo's 35 million, roughly a thousand times fewer. Each AlphaZero evaluation is a pass through a deep network, while Stockfish's is a handcrafted linear formula plus a short tactical search. The paper's explanation for why the slower search still wins concerns how each search combines its leaf evaluations.
An alpha-beta engine computes a minimax value. It scores the positions at the end of each line, then backs the scores up the tree by taking the maximum at nodes where it moves and the minimum where the opponent moves. Alpha-beta pruning skips branches that provably cannot change the result, so it returns exactly the minimax value of the scored leaves. If the leaf scores are accurate, that is the right value. If they are noisy, the max and min select the extreme scores: among many leaves of similar true value, the one with the largest error in the favourable direction wins each comparison and travels up to the root. The paper puts it as "alpha-beta search computes an explicit minimax, which propagates the biggest approximation errors to the root of the subtree", and argues that a deep network, more expressive than a linear evaluation but prone to occasional spurious errors, makes this worse. MCTS instead averages leaf evaluations within a subtree, and independent errors in an average partly cancel.
Figure 6 tests the argument on a small tree. You choose among moves A, B and C; the opponent then has replies to each. All replies to a move have the same true value, 0.50 for A, 0.55 for B and 0.45 for C, so an exact evaluator gives the same answer either way: play B, worth 0.55. The evaluator adds independent Gaussian noise of standard deviation to each leaf. Minimax values each move at the minimum of its noisy leaves, and the expected minimum of noisy copies of one number sits below that number:
where the are standard normal. The average of the same leaves has no such bias and its noise shrinks like . Over many random draws at and , minimax picks a move other than B about 36% of the time and its root value averages 0.08 too low; averaging picks wrong about 27% of the time with a root error near +0.01. At the minimax error rate is still 28% and its root value is 0.16 too low, while averaging is wrong 8% of the time. At the two backups are identical.
The toy has two limits. Plain averaging over all replies would be wrong if one reply were genuinely much better for the opponent; MCTS does not average uniformly, because its visits concentrate on the replies that look best for the side to move, so its values approach the minimax line as visits grow while still pooling many evaluations. The cancellation also assumes the network's errors are roughly independent and unbiased; a blind spot shared across many similar positions survives averaging. The paper offers this as an explanation for why the combination works ("Using MCTS may allow AlphaZero to effectively combine its neural network representations with a powerful, domain-independent search"), without a proof, and notes that earlier chess programs using MCTS had been much weaker than alpha-beta programs.
The contrast goes back to Claude Shannon's 1950 paper on computer chess, which the preprint cites: a "Type A" program searches every line to a fixed depth, while a "Type B" program looks selectively at the promising moves, as a human does. AlphaZero is a Type B searcher, spending its much smaller budget where its network points. (Stockfish 8's evaluation was handcrafted and linear; the neural NNUE evaluation that Stockfish adopted arrived in 2020, after this paper.) The paper's Figure 2 measures how each program's strength grows with thinking time, in Elo relative to Stockfish or Elmo at 40 ms per move. AlphaZero's MCTS gained more from extra time than either alpha-beta engine, "calling into question the widely held belief that alpha-beta search is inherently superior in these domains". Toggle the game and slide the time per move:
What changed from AlphaGo Zero
AlphaZero is AlphaGo Zero with four Go-specific assumptions removed. Removing them let the same code run on chess and shogi.
Draws. AlphaGo Zero estimated and optimised the probability of winning, assuming every game ends in a win or a loss, as Go games do under the scoring it used. Chess and shogi have draws, and the optimal result of chess is widely believed to be a draw. AlphaZero estimates the expected outcome instead, with and a draw scored 0. Loss (1) did not change; only the meaning of its target did.
Symmetry. The rules of Go are unchanged by rotating or reflecting the board, and AlphaGo Zero used this twice: it augmented its training data with the 8 symmetries of each position, and during search it applied a random rotation or reflection to each position before evaluating it. Chess and shogi are asymmetric (pawns move only forward, kingside and queenside castling differ), so AlphaZero does neither.
The best-player gate. AlphaGo Zero generated self-play games with the best player so far, and after each training iteration a new network replaced it only if it won by a margin of 55% in an evaluation match. AlphaZero keeps one network that is updated continually and generates its games with the latest parameters, with no evaluation step and no gate.
Per-game tuning. AlphaGo Zero tuned its search hyperparameters by Bayesian optimisation. AlphaZero uses the same hyperparameters for all three games, except the noise concentration from (4).
The paper lists exactly what domain knowledge remains. (i) The input and output are planes matched to the board. (ii) The rules are used inside the search to compute the position after a move, detect the end of a game, and score it. (iii) The rules also define the special input planes (castling, repetition, no-progress) and the output planes (how pieces move, promotions, shogi drops). (iv) The typical number of legal moves sets the noise. (v) Chess and shogi games longer than a maximum length, set from typical game lengths, are stopped and scored as draws. And "one algorithm, three games" means three separately trained networks; no single set of weights plays all three.
Results against Stockfish, Elmo and AlphaGo Zero
Starting from random weights, AlphaZero passed Elmo, the Computer Shogi Association world champion, after less than 2 hours (110 thousand steps); Stockfish 8, the 2016 TCEC world champion, after 4 hours (300 thousand steps); and AlphaGo Lee, the version that beat Lee Sedol, after 8 hours (165 thousand steps). Wall-clock time and step count differ because a step takes longer to generate in some games: the full 700 thousand steps took 9 hours for chess, 12 for shogi and 34 for Go, from 44, 24 and 21 million self-play games. The abstract's "within 24 hours" refers to these crossings; the Go run as a whole took 34 hours.
The fully trained networks then played 100-game matches at one minute per move, AlphaZero on a single machine with 4 TPUs and Stockfish and Elmo on 64 CPU threads with a 1 GB hash table:
| Game (opponent) | AlphaZero as White | AlphaZero as Black | Total W / D / L |
|---|---|---|---|
| Chess (Stockfish 8) | 25 / 25 / 0 | 3 / 47 / 0 | 28 / 72 / 0 |
| Shogi (Elmo) | 43 / 2 / 5 | 47 / 0 / 3 | 90 / 2 / 8 |
| Go (AlphaGo Zero, 3 days) | 31 / – / 19 | 29 / – / 21 | 60 / – / 40 |
"Undefeated" applies only to the chess match. Against Elmo AlphaZero lost 8 games, and against the three-day AlphaGo Zero it lost 40 of 100; footnote 2 of the paper adds that AlphaGo Zero and AlphaGo Master were ultimately trained for 100 times this length of time. In chess, AlphaZero won 25 of its 50 games as White and 3 of 50 as Black, drawing the rest. Resignation was enabled (Stockfish and Elmo resigned after 10 consecutive moves evaluated at −900 centipawns, AlphaZero below a 5% estimated win rate) and pondering on the opponent's time was disabled.
A second chess experiment, the paper's Table 2, started games from the 12 most common human openings, each played more than 100,000 times in an online database, with 50 games per colour per opening. AlphaZero had found each of these openings on its own during self-play and played them often. Across the 1,200 games it scored 242 wins, 353 draws and 5 losses as White and 48 wins, 533 draws and 19 losses as Black, so it lost 24 games once it was forced into lines it might not have chosen.
The chess match drew criticism soon after the preprint appeared, mostly about the conditions given to Stockfish. A fixed minute per move removes the time management an engine normally uses to spend more time on critical positions; a 1 GB hash table is small for a 64-thread search; and the preprint does not mention an opening book or endgame tablebases, which suggests (but does not state) that Stockfish ran without them. The peer-reviewed version (Silver et al., Science, 2018) replayed the chess match over 1,000 games at 3 hours per game plus 15 seconds per move, with Stockfish on 44 CPU cores, a 32 GB hash and Syzygy endgame tablebases. The main match was again against Stockfish 8; AlphaZero won 155 games and lost 6, the rest drawn, and additional matches against the January 2018 development version of Stockfish gave very similar results. Those numbers come from the 2018 paper; everything else on this page is from the December 2017 preprint.
How the paper measures strength
The training curves are in Elo ratings, computed from a tournament at 1 second per move between AlphaZero checkpoints and the baseline program, with the baselines anchored to their published ratings. The Methods give the model as a logistic function of the rating difference, with ratings fitted by Bayesian logistic regression in the BayesElo program:
Equation (5) is printed with , a base- logistic. The familiar Elo convention, and the one BayesElo implements, is base 10: . The two differ by a factor of in the scale. Read literally, (5) gives a player 400 points stronger a win probability of , which is 73.1%, odds of 2.72 to 1. The usual rule that 400 points means 10-to-1 odds (90.9%) comes from the base-10 form and does not follow from (5) as printed. For a sense of scale, AlphaZero's 64% score against Stockfish (28 wins plus half of 72 draws) corresponds, by the textbook calculation, to about 100 points in base 10 or 230 points under the printed form. BayesElo models draws separately, so these two numbers only illustrate the size of the difference.
Footnote 3 of the paper adds a caution about comparing gaps across games: the prevalence of draws in high-level chess compresses the Elo scale relative to shogi or Go, so a chess gap and a shogi gap of the same size do not mean the same margin of play.
Questions you might still have
Why is the search stronger than the network it is built from?
Because it spends computation looking ahead. With the weights held fixed, 800 simulations that check the consequences of candidate moves pick better moves than one forward pass of the network. Training does not create that advantage; it copies the search’s choices into the network so the next search starts from better priors and better value estimates.
If the network starts random, what stops self-play from learning nonsense?
The rules. Games end in real wins, draws and losses that the network cannot influence except by playing better, and the search uses the rules to score finished games inside its tree. Whatever the current network is, the search improves on it, so each round’s targets are slightly better than the network that produced them.
Is it one network for all three games?
No. A separate instance was trained from scratch for each of chess, shogi and Go. The algorithm and hyperparameters are shared, apart from the Dirichlet noise concentration alpha, and the input and output plane sizes differ by game.
Why play the most-visited move instead of the move with the highest Q?
A move only collects many visits after its value has held up across many simulations, so the visit count is a more reliable signal than the mean value of a move that might have been visited once or twice. The normalised visit counts are also the training target for the policy head, so the move choice and the target come from the same statistic.
Did AlphaZero really beat Stockfish fairly?
The 2017 preprint’s match was criticized: Stockfish had a fixed minute per move, a 1 GB hash, and apparently no opening book or tablebases. The 2018 Science version replayed 1,000 games at 3 hours plus 15 seconds per move with 44 cores, a 32 GB hash and Syzygy tablebases, and AlphaZero won 155 and lost 6. In the preprint’s own experiment from 12 human openings, AlphaZero lost 24 of 1,200 games, so it was not unbeatable.
How is this different from MuZero?
AlphaZero is given the rules and uses them inside its search to compute the next position and to detect and score finished games. MuZero, covered in its own explainer on this site, learns a model that predicts what matters for planning and searches inside that learned model, so it also works on Atari games whose rules it is never told. MuZero also trains its value on bootstrapped search values instead of only the final result.
Footnotes & further reading
- The paper: Silver, Hubert, Schrittwieser, et al., Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm (DeepMind, arXiv, December 2017). Numbers on this page are from this preprint unless marked as the 2018 version.
- The peer-reviewed version, with the 1,000-game rerun: Silver et al., A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play (Science 362, 2018).
- The source of the search, network and training settings: Silver et al., Mastering the game of Go without human knowledge (AlphaGo Zero, Nature 550, 2017); the formulas quoted here are from its Methods.
- The independent expert/apprentice formulation: Anthony, Tian, Barber, Thinking Fast and Slow with Deep Learning and Tree Search (Expert Iteration, NeurIPS 2017), demonstrated on Hex.
- PUCT traces to Christopher Rosin, Multi-armed bandits with episode context (2011); the Type A / Type B framing to Claude Shannon, "Programming a Computer for Playing Chess" (1950).
- The successor that learns its own model of the game: the MuZero explainer on this site. For the network body, see the ResNet explainer.
How could this explainer be improved? Found an error, or something unclear? I read every message.