David Silver,$^{1,}$ Thomas Hubert,$^{1,}$ Julian Schrittwieser,$^{1,}$
Ioannis Antonoglou,$^{1}$ Matthew Lai,$^{1}$ Arthur Guez,$^{1}$ Marc Lanctot,$^{1}$
Laurent Sifre,$^{1}$ Dharshan Kumaran,$^{1}$ Thore Graepel,$^{1}$
Timothy Lillicrap,$^{1}$ Karen Simonyan,$^{1}$ Demis Hassabis $^{1}$
$^{1}$ DeepMind, 6 Pancras Square, London N1C 4AG.
$^{}$ These authors contributed equally to this work.
The game of chess is the most widely-studied domain in the history of artificial intelligence. The strongest programs are based on a combination of sophisticated search techniques, domain-specific adaptations, and handcrafted evaluation functions that have been refined by human experts over several decades. In contrast, the AlphaGo Zero program recently achieved superhuman performance in the game of Go, by tabula rasa reinforcement learning from games of self-play. In this paper, we generalise this approach into a single AlphaZero algorithm that can achieve, tabula rasa, superhuman performance in many challenging domains. Starting from random play, and given no domain knowledge except the game rules, AlphaZero achieved within 24 hours a superhuman level of play in the games of chess and shogi (Japanese chess) as well as Go, and convincingly defeated a world-champion program in each case.
The study of computer chess is as old as computer science itself. Babbage, Turing, Shannon, and von Neumann devised hardware, algorithms and theory to analyse and play the game of chess. Chess subsequently became the grand challenge task for a generation of artificial intelligence researchers, culminating in high-performance computer chess programs that perform at superhuman level [1, 2]. However, these systems are highly tuned to their domain, and cannot be generalised to other problems without significant human effort.
A long-standing ambition of artificial intelligence has been to create programs that can instead learn for themselves from first principles [3]. Recently, the AlphaGo Zero algorithm achieved superhuman performance in the game of Go, by representing Go knowledge using deep convolutional neural networks [4, 5], trained solely by reinforcement learning from games of self-play [6]. In this paper, we apply a similar but fully generic algorithm, which we call AlphaZero, to the games of chess and shogi as well as Go, without any additional domain knowledge except the rules of the game, demonstrating that a general-purpose reinforcement learning algorithm can achieve, tabula rasa, superhuman performance across many challenging domains.
A landmark for artificial intelligence was achieved in 1997 when Deep Blue defeated the human world champion [1]. Computer chess programs continued to progress steadily beyond human level in the following two decades. These programs evaluate positions using features handcrafted by human grandmasters and carefully tuned weights, combined with a high-performance alpha-beta search that expands a vast search tree using a large number of clever heuristics and domain-specific adaptations. In the Methods we describe these augmentations, focusing on the 2016 Top Chess Engine Championship (TCEC) world-champion Stockfish [7]; other strong chess programs, including Deep Blue, use very similar architectures [1, 8].
Shogi is a significantly harder game, in terms of computational complexity, than chess [9, 10]: it is played on a larger board, and any captured opponent piece changes sides and may subsequently be dropped anywhere on the board. The strongest shogi programs, such as Computer Shogi Association (CSA) world-champion Elmo, have only recently defeated human champions [11]. These programs use a similar algorithm to computer chess programs, again based on a highly optimised alpha-beta search engine with many domain-specific adaptations.
Go is well suited to the neural network architecture used in AlphaGo because the rules of the game are translationally invariant (matching the weight sharing structure of convolutional networks), are defined in terms of liberties corresponding to the adjacencies between points on the board (matching the local structure of convolutional networks), and are rotationally and reflectionally symmetric (allowing for data augmentation and ensembling). Furthermore, the action space is simple (a stone may be placed at each possible location), and the game outcomes are restricted to binary wins or losses, both of which may help neural network training.
Chess and shogi are, arguably, less innately suited to AlphaGo's neural network architectures. The rules are position-dependent (e.g. pawns may move two steps forward from the second rank and promote on the eighth rank) and asymmetric (e.g. pawns only move forward, and castling is different on kingside and queenside). The rules include long-range interactions (e.g. the queen may traverse the board in one move, or checkmate the king from the far side of the board). The action space for chess includes all legal destinations for all of the players' pieces on the board; shogi also allows captured pieces to be placed back on the board. Both chess and shogi may result in draws in addition to wins and losses; indeed it is believed that the optimal solution to chess is a draw [12, 13, 14].
The AlphaZero algorithm is a more generic version of the AlphaGo Zero algorithm that was first introduced in the context of Go [6]. It replaces the handcrafted knowledge and domain-specific augmentations used in traditional game-playing programs with deep neural networks and a tabula rasa reinforcement learning algorithm.
Instead of a handcrafted evaluation function and move ordering heuristics, AlphaZero utilises a deep neural network $(\mathbf{p}, v) = f_\theta(s)$ with parameters $\theta$. This neural network takes the board position $s$ as an input and outputs a vector of move probabilities $\mathbf{p}$ with components $p_a = Pr(a|s)$ for each action $a$, and a scalar value $v$ estimating the expected outcome $z$ from position $s$, $v \approx \mathbb{E}[z | s]$. AlphaZero learns these move probabilities and value estimates entirely from self-play; these are then used to guide its search.
Instead of an alpha-beta search with domain-specific enhancements, AlphaZero uses a general-purpose Monte-Carlo tree search (MCTS) algorithm.
Each search consists of a series of simulated games of self-play that traverse a tree from root $s_{root}$ to leaf. Each simulation proceeds by selecting in each state $s$ a move $a$ with low visit count, high move probability and high value (averaged over the leaf states of simulations that selected $a$ from $s$) according to the current neural network $f_\theta$. The search returns a vector $\mathbf{\pi}$ representing a probability distribution over moves, either proportionally or greedily with respect to the visit counts at the root state.
The parameters $\theta$ of the deep neural network in AlphaZero are trained by self-play reinforcement learning, starting from randomly initialised parameters $\theta$. Games are played by selecting moves for both players by MCTS, $a_t \sim \pm b{\pi}_t$. At the end of the game, the terminal position $s_T$ is scored according to the rules of the game to compute the game outcome $z$: $-1$ for a loss, $0$ for a draw, and $+1$ for a win. The neural network parameters $\theta$ are updated so as to minimise the error between the predicted outcome $v_t$ and the game outcome $z$, and to maximise the similarity of the policy vector $\mathbf{p}_t$ to the search probabilities $\pm b{\pi}_t$. Specifically, the parameters $\theta$ are adjusted by gradient descent on a loss function $l$ that sums over mean-squared error and cross-entropy losses respectively,
$ \begin{aligned} (\mathbf{p}, v) = f_\theta(s), && l = (z - v)^2 - \pm b{\pi}^\top \log \mathbf{p} + c ||\theta||^2 \end{aligned}\tag{1} $
where $c$ is a parameter controlling the level of $L_2$ weight regularisation.
The updated parameters are used in subsequent games of self-play.
The AlphaZero algorithm described in this paper differs from the original AlphaGo Zero algorithm in several respects.
AlphaGo Zero estimates and optimises the probability of winning, assuming binary win/loss outcomes. AlphaZero instead estimates and optimises the expected outcome, taking account of draws or potentially other outcomes.
The rules of Go are invariant to rotation and reflection. This fact was exploited in AlphaGo and AlphaGo Zero in two ways. First, training data was augmented by generating 8 symmetries for each position. Second, during MCTS, board positions were transformed using a randomly selected rotation or reflection before being evaluated by the neural network, so that the Monte-Carlo evaluation is averaged over different biases. The rules of chess and shogi are asymmetric, and in general symmetries cannot be assumed. AlphaZero does not augment the training data and does not transform the board position during MCTS.
In AlphaGo Zero, self-play games were generated by the best player from all previous iterations. After each iteration of training, the performance of the new player was measured against the best player; if it won by a margin of $55%$ then it replaced the best player and self-play games were subsequently generated by this new player. In contrast, AlphaZero simply maintains a single neural network that is updated continually, rather than waiting for an iteration to complete. Self-play games are generated by using the latest parameters for this neural network, omitting the evaluation step and the selection of best player.
AlphaGo Zero tuned the hyper-parameter of its search by Bayesian optimisation. In AlphaZero we reuse the same hyper-parameters for all games without game-specific tuning. The sole exception is the noise that is added to the prior policy to ensure exploration [6]; this is scaled in proportion to the typical number of legal moves for that game type.
Like AlphaGo Zero, the board state is encoded by spatial planes based only on the basic rules for each game. The actions are encoded by either spatial planes or a flat vector, again based only on the basic rules for each game (see Methods).
We applied the AlphaZero algorithm to chess, shogi, and also Go. Unless otherwise specified, the same algorithm settings, network architecture, and hyper-parameters were used for all three games. We trained a separate instance of AlphaZero for each game. Training proceeded for 700, 000 steps (mini-batches of size 4, 096) starting from randomly initialised parameters, using 5, 000 first-generation TPUs [15] to generate self-play games and 64 second-generation TPUs to train the neural networks.[^1] Further details of the training procedure are provided in the Methods.
[^1]: The original AlphaGo Zero paper used GPUs to train the neural networks.
![**Figure 1:** Training *AlphaZero* for 700, 000 steps. Elo ratings were computed from evaluation games between different players when given one second per move. **a** Performance of *AlphaZero* in chess, compared to 2016 TCEC world-champion program *Stockfish*. **b** Performance of *AlphaZero* in shogi, compared to 2017 CSA world-champion program *Elmo*. **c** Performance of *AlphaZero* in Go, compared to *AlphaGo Lee* and *AlphaGo Zero* (20 block / 3 day) [6].](https://ittowtnkqtyixxjxrhou.supabase.co/storage/v1/object/public/public-images/7vyj2ng3/complex_fig_f02cb05abb71.png)
Figure 1 shows the performance of AlphaZero during self-play reinforcement learning, as a function of training steps, on an Elo scale [16]. In chess, AlphaZero outperformed Stockfish after just 4 hours (300k steps); in shogi, AlphaZero outperformed Elmo after less than 2 hours (110k steps); and in Go, AlphaZero outperformed AlphaGo Lee [6] after 8 hours (165k steps).[^2]
[^2]: AlphaGo Master and AlphaGo Zero were ultimately trained for 100 times this length of time; we do not reproduce that effort here.
We evaluated the fully trained instances of AlphaZero against Stockfish, Elmo and the previous version of AlphaGo Zero (trained for 3 days) in chess, shogi and Go respectively, playing 100 game matches at tournament time controls of one minute per move. AlphaZero and the previous AlphaGo Zero used a single machine with 4 TPUs. Stockfish and Elmo played at their strongest skill level using 64 threads and a hash size of 1GB. AlphaZero convincingly defeated all opponents, losing zero games to Stockfish and eight games to Elmo (see Supplementary Material for several example games), as well as defeating the previous version of AlphaGo Zero (see Table 1).
\begin{tabularx}{\ccccccccc}{XXX | XXX}
\toprule
Game & White & Black & Win & Draw & Loss \\
\midrule
\multirow{2}{*}{Chess} & \emph{AlphaZero} & \emph{Stockfish} & 25 & 25 & 0 \\
& \emph{Stockfish} & \emph{AlphaZero} & 3 & 47 & 0 \\
\midrule
\multirow{2}{*}{Shogi} & \emph{AlphaZero} & \emph{Elmo} & 43 & 2 & 5 \\
& \emph{Elmo} & \emph{AlphaZero} & 47 & 0 & 3 \\
\midrule
\multirow{2}{*}{Go} & \emph{AlphaZero} & \emph{AG0 3-day} & 31 & -- & 19 \\
& \emph{AG0 3-day} & \emph{AlphaZero} & 29 & -- & 21 \\
\bottomrule
\end{tabularx}
We also analysed the relative performance of AlphaZero's MCTS search compared to the state-of-the-art alpha-beta search engines used by Stockfish and Elmo. AlphaZero searches just 80 thousand positions per second in chess and 40 thousand in shogi, compared to 70 million for Stockfish and 35 million for Elmo. AlphaZero compensates for the lower number of evaluations by using its deep neural network to focus much more selectively on the most promising variations – arguably a more "human-like" approach to search, as originally proposed by Shannon [17]. Figure 2 shows the scalability of each player with respect to thinking time, measured on an Elo scale, relative to Stockfish or Elmo with 40ms thinking time. AlphaZero's MCTS scaled more effectively with thinking time than either Stockfish or Elmo, calling into question the widely held belief [18, 19] that alpha-beta search is inherently superior in these domains.[^3]
[^3]: The prevalence of draws in high-level chess tends to compress the Elo scale, compared to shogi or Go.
:::: {cols="2"}


Figure 2: Scalability of AlphaZero with thinking time, measured on an Elo scale. a Performance of AlphaZero and Stockfish in chess, plotted against thinking time per move. b Performance of AlphaZero and Elmo in shogi, plotted against thinking time per move. ::::
Finally, we analysed the chess knowledge discovered by AlphaZero. Table 2 analyses the most common human openings (those played more than 100, 000 times in an online database of human chess games [20]). Each of these openings is independently discovered and played frequently by AlphaZero during self-play training. When starting from each human opening, AlphaZero convincingly defeated Stockfish, suggesting that it has indeed mastered a wide spectrum of chess play.
::: {caption="Table 2: Analysis of the 12 most popular human openings (played more than 100, 000 times in an online database [20]). Each opening is labelled by its ECO code and common name. The plot shows the proportion of self-play training games in which AlphaZero played each opening, against training time. We also report the win/draw/loss results of 100 game AlphaZero vs. Stockfish matches starting from each opening, as either white (w) or black (b), from AlphaZero's perspective. Finally, the principal variation (PV) of AlphaZero is provided from each opening."}

:::
The game of chess represented the pinnacle of AI research over several decades. State-of-the-art programs are based on powerful engines that search many millions of positions, leveraging handcrafted domain expertise and sophisticated domain adaptations. AlphaZero is a generic reinforcement learning algorithm – originally devised for the game of Go – that achieved superior results within a few hours, searching a thousand times fewer positions, given no domain knowledge except the rules of chess. Furthermore, the same algorithm was applied without modification to the more challenging game of shogi, again outperforming the state of the art within a few hours.
Executive Summary: Artificial intelligence has long targeted complex games like chess as benchmarks for progress, but traditional programs rely heavily on human-designed rules, evaluations, and search optimizations tailored to each game. This limits their flexibility and requires extensive expert input. With advances in machine learning, there is growing interest in creating systems that learn autonomously from basic rules alone, enabling broader applications in strategy, planning, and decision-making under uncertainty—critical for fields like robotics, logistics, and finance.
This paper introduces AlphaZero, a general reinforcement learning algorithm designed to master chess, shogi (Japanese chess), and Go starting from random play, using only the games' rules and no prior human knowledge. The objective was to demonstrate that such a tabula rasa approach could achieve superhuman performance across these diverse, computationally intensive domains, generalizing beyond game-specific tweaks.
The authors trained separate instances of AlphaZero for each game using self-play: the system played millions of games against itself on powerful processors called TPUs, over periods of 9 to 34 hours. A deep neural network learned to predict moves and outcomes from these games, guiding a general-purpose search method called Monte-Carlo tree search, which simulates possible futures without relying on handcrafted heuristics. Data came solely from self-generated games, with about 44 million for chess, 24 million for shogi, and 21 million for Go; key assumptions included perfect rule enforcement and termination rules to handle draws.
AlphaZero's results were striking. Within four hours of training, it surpassed Stockfish, the 2016 world-champion chess program, and defeated it 28 wins to 72 draws with zero losses in a 100-game match, despite searching only 80,000 positions per second compared to Stockfish's 70 million. In shogi, it beat the 2017 champion Elmo after under two hours, winning 90 of 100 games with 2 draws and 8 losses. For Go, it topped a prior version of AlphaGo after eight hours, prevailing 60 wins to 40 losses. Across games, AlphaZero's performance scaled better with extra thinking time than rivals, and it independently discovered popular human openings in chess, often outperforming Stockfish from those starts.
These findings reveal that a single, generic algorithm can outplay decades of specialized engineering, using far less computation and mimicking human-like focus on promising strategies rather than exhaustive brute force. This shifts AI paradigms toward self-learning systems, potentially reducing development costs and risks in deploying AI for strategic tasks, while raising questions about the necessity of human biases in expert systems. Unlike expectations that neural networks would underperform in asymmetric games like chess and shogi, AlphaZero thrived, suggesting broader adaptability.
Leaders should prioritize investing in scalable reinforcement learning frameworks like AlphaZero for new applications, starting with simulations of real-world scenarios to test transferability. Options include pure self-play for novel domains or hybrids with traditional methods for immediate gains, trading generality for speed. Pilot tests in non-game areas, such as supply chain optimization, are recommended next, alongside longer training runs to push boundaries.
Confidence in these game-specific results is high, backed by standardized tournaments and Elo ratings, but limitations include reliance on immense compute resources and confinement to perfect-information games—real-world noise, partial observability, or multi-agent dynamics remain untested. Further validation requires diverse datasets beyond self-play.
Section Summary: The Methods section outlines the architecture of conventional chess engines such as Stockfish, which represent board positions with dozens of handcrafted features, evaluate them via tuned linear weights after a quiescence search resolves tactics, and explore the game tree with alpha-beta minimax augmented by extensive domain-specific pruning, move ordering, transposition tables, opening books, and endgame databases. It contrasts this approach with AlphaZero, which employs none of these techniques and instead relies solely on self-play reinforcement learning. The section also briefly surveys earlier machine-learning chess programs that used temporal-difference learning or supervised training on expert games, most of which still incorporated substantial handcrafted knowledge or traditional search components.
In this section we describe the components of a typical computer chess program, focusing specifically on Stockfish[7], an open source program that won the 2016 TCEC computer chess championship. For an overview of standard methods, see [21].
Each position $s$ is described by a sparse vector of handcrafted features $\phi(s)$, including midgame/endgame-specific material point values, material imbalance tables, piece-square tables, mobility and trapped pieces, pawn structure, king safety, outposts, bishop pair, and other miscellaneous evaluation patterns. Each feature $\phi_i$ is assigned, by a combination of manual and automatic tuning, a corresponding weight $w_i$ and the position is evaluated by a linear combination $v(s, w) = \phi(s)^\top w$. However, this raw evaluation is only considered accurate for positions that are "quiet", with no unresolved captures or checks. A domain-specialised quiescence search is used to resolve ongoing tactical situations before the evaluation function is applied.
The final evaluation of a position $s$ is computed by a minimax search that evaluates each leaf using a quiescence search. Alpha-beta pruning is used to safely cut any branch that is provably dominated by another variation. Additional cuts are achieved using aspiration windows and principal variation search. Other pruning strategies include null move pruning (which assumes a pass move should be worse than any variation, in positions that are unlikely to be in zugzwang, as determined by simple heuristics), futility pruning (which assumes knowledge of the maximum possible change in evaluation), and other domain-dependent pruning rules (which assume knowledge of the value of captured pieces).
The search is focused on promising variations both by extending the search depth of promising variations, and by reducing the search depth of unpromising variations based on heuristics like history, static-exchange evaluation (SEE), and moving piece type. Extensions are based on domain-independent rules that identify singular moves with no sensible alternative, and domain-dependent rules, such as extending check moves. Reductions, such as late move reductions, are based heavily on domain knowledge.
The efficiency of alpha-beta search depends critically upon the order in which moves are considered. Moves are therefore ordered by iterative deepening (using a shallower search to order moves for a deeper search). In addition, a combination of domain-independent move ordering heuristics, such as killer heuristic, history heuristic, counter-move heuristic, and also domain-dependent knowledge based on captures (SEE) and potential captures (MVV/LVA).
A transposition table facilitates the reuse of values and move orders when the same position is reached by multiple paths. A carefully tuned opening book is used to select moves at the start of the game. An endgame tablebase, precalculated by exhaustive retrograde analysis of endgame positions, provides the optimal move in all positions with six and sometimes seven pieces or less.
Other strong chess programs, and also earlier programs such as Deep Blue, have used very similar architectures [21, 1] including the majority of the components described above, although important details vary considerably.
None of the techniques described in this section are used by AlphaZero. It is likely that some of these techniques could further improve the performance of AlphaZero; however, we have focused on a pure self-play reinforcement learning approach and leave these extensions for future research.
In this section we discuss some notable prior work on reinforcement learning in computer chess.
NeuroChess [22] evaluated positions by a neural network that used 175 handcrafted input features. It was trained by temporal-difference learning to predict the final game outcome, and also the expected features after two moves. NeuroChess won 13% of games against GnuChess using a fixed depth 2 search.
Beal and Smith applied temporal-difference learning to estimate the piece values in chess [23] and shogi [24], starting from random values and learning solely by self-play.
KnightCap [25] evaluated positions by a neural network that used an attack-table based on knowledge of which squares are attacked or defended by which pieces. It was trained by a variant of temporal-difference learning, known as TD(leaf), that updates the leaf value of the principal variation of an alpha-beta search. KnightCap achieved human master level after training against a strong computer opponent with hand-initialised piece-value weights.
Meep [26] evaluated positions by a linear evaluation function based on handcrafted features. It was trained by another variant of temporal-difference learning, known as TreeStrap, that updated all nodes of an alpha-beta search. Meep defeated human international master players in 13 out of 15 games, after training by self-play with randomly initialised weights.
Kaneko and Hoki [27] trained the weights of a shogi evaluation function comprising a million features, by learning to select expert human moves during alpha-beta serach. They also performed a large-scale optimization based on minimax search regulated by expert game logs [28]; this formed part of the Bonanza engine that won the 2013 World Computer Shogi Championship.
Giraffe [29] evaluated positions by a neural network that included mobility maps and attack and defend maps describing the lowest valued attacker and defender of each square. It was trained by self-play using TD(leaf), also reaching a standard of play comparable to international masters.
DeepChess [19] trained a neural network to performed pair-wise evaluations of positions. It was trained by supervised learning from a database of human expert games that was pre-filtered to avoid capture moves and drawn games. DeepChess reached a strong grandmaster level of play.
All of these programs combined their learned evaluation functions with an alpha-beta search enhanced by a variety of extensions.
An approach based on training dual policy and value networks using AlphaZero-like policy iteration was successfully applied to improve on the state-of-the-art in Hex [30].
For at least four decades the strongest computer chess programs have used alpha-beta search [21, 31]. AlphaZero uses a markedly different approach that averages over the position evaluations within a subtree, rather than computing the minimax evaluation of that subtree. However, chess programs using traditional MCTS were much weaker than alpha-beta search programs, [32, 18]; while alpha-beta programs based on neural networks have previously been unable to compete with faster, handcrafted evaluation functions.
AlphaZero evaluates positions using non-linear function approximation based on a deep neural network, rather than the linear function approximation used in typical chess programs. This provides a much more powerful representation, but may also introduce spurious approximation errors. MCTS averages over these approximation errors, which therefore tend to cancel out when evaluating a large subtree. In contrast, alpha-beta search computes an explicit minimax, which propagates the biggest approximation errors to the root of the subtree. Using MCTS may allow AlphaZero to effectively combine its neural network representations with a powerful, domain-independent search.
AlphaZero did not use any form of domain knowledge beyond the points listed above.
In this section we describe the representation of the board inputs, and the representation of the action outputs, used by the neural network in AlphaZero. Other representations could have been used; in our experiments the training algorithm worked robustly for many reasonable choices.
The input to the neural network is an $N \times N \times (M T + L)$ image stack that represents state using a concatenation of $T$ sets of $M$ planes of size $N \times N$. Each set of planes represents the board position at a time-step $t - T + 1, ..., t$, and is set to zero for time-steps less than 1. The board is oriented to the perspective of the current player. The $M$ feature planes are composed of binary feature planes indicating the presence of the player's pieces, with one plane for each piece type, and a second set of planes indicating the presence of the opponent's pieces. For shogi there are additional planes indicating the number of captured prisoners of each type. There are an additional $L$ constant-valued input planes denoting the player's colour, the total move count, and the state of special rules: the legality of castling in chess (kingside or queenside); the repetition count for that position (3 repetitions is an automatic draw in chess; 4 in shogi); and the number of moves without progress in chess (50 moves without progress is an automatic draw). Input features are summarised in Table 3.
\begin{tabularx}{\ccccccccc}{Xr | Xr | Xr}
\toprule
\multicolumn{2}{c}{Go} & \multicolumn{2}{|c|}{Chess} & \multicolumn{2}{c}{Shogi} \\
Feature & Planes & Feature & Planes & Feature & Planes \\
\midrule
P1 stone & 1 & P1 piece & 6 & P1 piece & 14 \\
P2 stone & 1 & P2 piece & 6 & P2 piece & 14 \\
&& Repetitions & 2 & Repetitions & 3 \\
&& && P1 prisoner count & 7 \\
&& && P2 prisoner count & 7 \\
\midrule
Colour & 1 & Colour & 1 & Colour & 1 \\
&& Total move count & 1 & Total move count & 1 \\
&& P1 castling & 2 &&\\
&& P2 castling & 2 &&\\
&& No-progress count & 1 &&\\
\midrule
Total & 17 & Total & 119 & Total & 362 \\
\bottomrule
\end{tabularx}
\begin{tabularx}{\ccccccccc}{Xr | Xr}
\toprule
\multicolumn{2}{c|}{Chess} & \multicolumn{2}{c}{Shogi} \\
Feature & Planes & Feature & Planes \\
\midrule
Queen moves & 56 & Queen moves & 64 \\
Knight moves & 8 & Knight moves & 2 \\
Underpromotions & 9 & Promoting queen moves & 64 \\
&& Promoting knight moves & 2 \\
&& Drop & 7 \\
\midrule
Total & 73 & Total & 139 \\
\bottomrule
\end{tabularx}
A move in chess may be described in two parts: selecting the piece to move, and then selecting among the legal moves for that piece. We represent the policy $\pi(a|s)$ by a $8 \times 8 \times 73$ stack of planes encoding a probability distribution over 4, 672 possible moves. Each of the $8 \times 8$ positions identifies the square from which to "pick up" a piece. The first 56 planes encode possible `queen moves' for any piece: a number of squares $[1..7]$ in which the piece will be moved, along one of eight relative compass directions ${ N, NE, E, SE, S, SW, W, NW }$. The next 8 planes encode possible knight moves for that piece. The final 9 planes encode possible underpromotions for pawn moves or captures in two possible diagonals, to knight, bishop or rook respectively. Other pawn moves or captures from the seventh rank are promoted to a queen.
The policy in shogi is represented by a $9 \times 9 \times 139$ stack of planes similarly encoding a probability distribution over 11, 259 possible moves. The first 64 planes encode `queen moves' and the next 2 moves encode knight moves. An additional $64 + 2$ planes encode promoting queen moves and promoting knight moves respectively. The last 7 planes encode a captured piece dropped back into the board at that location.
The policy in Go is represented identically to AlphaGo Zero [6], using a flat distribution over $19 \times 19 + 1$ moves representing possible stone placements and the pass move. We also tried using a flat distribution over moves for chess and shogi; the final result was almost identical although training was slightly slower.
The action representations are summarised in Table 4. Illegal moves are masked out by setting their probabilities to zero, and re-normalising the probabilities for remaining moves.
During training, each MCTS used 800 simulations. The number of games, positions, and thinking time varied per game due largely to different board sizes and game lengths, and are shown in Table 5. The learning rate was set to 0.2 for each game, and was dropped three times (to 0.02, 0.002 and 0.0002 respectively) during the course of training. Moves are selected in proportion to the root visit count. Dirichlet noise $\text{Dir}(\alpha)$ was added to the prior probabilities in the root node; this was scaled in inverse proportion to the approximate number of legal moves in a typical position, to a value of $\alpha = {0.3, 0.15, 0.03}$ for chess, shogi and Go respectively. Unless otherwise specified, the training and search algorithm and parameters are identical to AlphaGo Zero [6].
During evaluation, AlphaZero selects moves greedily with respect to the root visit count. Each MCTS was executed on a single machine with 4 TPUs.
\begin{tabularx}{\ccccccccc}{XXXX}
\toprule
& Chess & Shogi & Go \\
\midrule
Mini-batches & 700k & 700k & 700k \\
Training Time & 9h & 12h & 34h \\
Training Games & 44 million & 24 million & 21 million \\
Thinking Time & 800 sims & 800 sims & 800 sims \\
& 40 ms & 80 ms & 200 ms \\
\bottomrule
\end{tabularx}
To evaluate performance in chess, we used Stockfish version 8 (official Linux release) as a baseline program, using 64 CPU threads and a hash size of 1GB.
To evaluate performance in shogi, we used Elmo version WCSC27 in combination with YaneuraOu 2017 Early KPPT 4.73 64AVX2 with 64 CPU threads and a hash size of 1GB with the usi option of EnteringKingRule set to NoEnteringKing.
We evaluated the relative strength of AlphaZero (Figure 1) by measuring the Elo rating of each player. We estimate the probability that player $a$ will defeat player $b$ by a logistic function $p(a \text{ defeats } b) = \frac{1}{1 + \exp{(c_{\mathrm{elo}} (e(b) - e(a))}}$, and estimate the ratings $e(\cdot)$ by Bayesian logistic regression, computed by the BayesElo program [16] using the standard constant $c_{\mathrm{elo}} = 1/400$. Elo ratings were computed from the results of a 1 second per move tournament between iterations of AlphaZero during training, and also a baseline player: either Stockfish, Elmo or AlphaGo Lee respectively. The Elo rating of the baseline players was anchored to publicly available values [6].
We also measured the head-to-head performance of AlphaZero against each baseline player. Settings were chosen to correspond with computer chess tournament conditions: each player was allowed 1 minute per move, resignation was enabled for all players (-900 centipawns for 10 consecutive moves for Stockfish and Elmo, 5% winrate for AlphaZero). Pondering was disabled for all players.
\begin{tabularx}{\ccccccccc}{XXXX}
\toprule
Program & Chess & Shogi & Go \\
\midrule
\emph{AlphaZero} & 80k & 40k & 16k \\
\emph{Stockfish} & 70, 000k & \\
\emph{Elmo} && 35, 000k & \\
\bottomrule
\end{tabularx}
In this section we include 10 example games played by AlphaZero against Stockfish during the 100 game match using 1 minute per move.
White: Stockfish Black: AlphaZero
White: Stockfish Black: AlphaZero
White: AlphaZero Black: Stockfish
White: AlphaZero Black: Stockfish
White: AlphaZero Black: Stockfish
White: AlphaZero Black: Stockfish
White: AlphaZero Black: Stockfish
White: AlphaZero Black: Stockfish
White: AlphaZero, Black: Stockfish
White: AlphaZero, Black: Stockfish
Section Summary: This section compiles academic papers, books, theses, and online resources documenting the history and technical progress of computer programs that play chess and related board games. It includes foundational works on search algorithms and early machine learning, landmark achievements such as IBM’s Deep Blue and DeepMind’s AlphaGo systems, and studies of modern engines like Stockfish. The references also cover performance analyses of hardware accelerators and methods for training evaluation functions through reinforcement learning and large-scale optimization.
[1] M. Campbell, A. J. Hoane, and F. Hsu. Deep Blue. Artificial Intelligence, 134:57–83, 2002.
[2] Feng-hsiung Hsu. Behind Deep Blue: Building the Computer that Defeated the World Chess Champion. Princeton University Press, 2002.
[3] A. L. Samuel. Some studies in machine learning using the game of checkers II - recent progress. IBM Journal of Research and Development, 11(6):601–617, 1967.
[4] Chris J. Maddison, Aja Huang, Ilya Sutskever, and David Silver. Move evaluation in Go using deep convolutional neural networks. In International Conference on Learning Representations, 2015.
[5] David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484–489, January 2016.
[6] David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, Yutian Chen, Timothy Lillicrap, Fan Hui, Laurent Sifre, George van den Driessche, Thore Graepel, and Demis Hassabis. Mastering the game of go without human knowledge. Nature, 550:354–359, 2017.
[7] Tord Romstad, Marco Costalba, Joona Kiiski, et al. Stockfish: A strong open source chess engine. https://stockfishchess.org/. Retrieved November 29th, 2017.
[8] David N. L. Levy and Monty Newborn. How Computers Play Chess. Ishi Press, 2009.
[9] Victor Allis. Searching for Solutions in Games and Artificial Intelligence. PhD thesis, University of Limburg, Netherlands, 1994.
[10] Hiroyuki Iida, Makoto Sakuta, and Jeff Rollason. Computer shogi. Artificial Intelligence, 134:121–144, 2002.
[11] Computer Shogi Association. Results of the 27th world computer shogi championship. http://www2.computer-shogi.org/wcsc27/index_e.html. Retrieved November 29th, 2017.
[12] Wilhelm Steinitz. The Modern Chess Instructor. Edition Olms AG, 1990.
[13] Emanuel Lasker. Common Sense in Chess. Dover Publications, 1965.
[14] John Knudsen. Essential Chess Quotations. iUniverse, 2000.
[15] Norman P. Jouppi, Cliff Young, Nishant Patil, et al. In-datacenter performance analysis of a tensor processing unit. In Proceedings of the 44th Annual International Symposium on Computer Architecture, ISCA '17, pages 1–12. ACM, 2017.
[16] R. Coulom. Whole-history rating: A Bayesian rating system for players of time-varying strength. In International Conference on Computers and Games, pages 113–124, 2008.
[17] Claude E Shannon. Xxii. programming a computer for playing chess. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 41(314):256–275, 1950.
[18] Oleg Arenz. Monte Carlo chess. Master's thesis, Technische Universitat Darmstadt, 2012.
[19] Omid E David, Nathan S Netanyahu, and Lior Wolf. Deepchess: End-to-end deep neural network for automatic learning in chess. In International Conference on Artificial Neural Networks, pages 88–96. Springer, 2016.
[20] Online chess games database, 365chess, 2017. URL: https://www.365chess.com/.
[21] Tony Marsland. Computer chess methods. In S. Shapiro, editor, Encyclopedia of Artificial Intelligence. John Wiley & sons, New York, 1987.
[22] Sebastian Thrun. Learning to play the game of chess. In Advances in neural information processing systems, pages 1069–1076, 1995.
[23] Donald F. Beal and Martin C. Smith. Temporal difference learning for heuristic search and game playing. Inf. Sci., 122(1):3–21, 2000.
[24] Donald F. Beal and Martin C. Smith. Temporal difference learning applied to game playing and the results of application to shogi. Theoretical Computer Science, 252(1–2):105–119, 2001.
[25] J. Baxter, A. Tridgell, and L. Weaver. Learning to play chess using temporal differences. Machine Learning, 40(3):243–263, 2000.
[26] J. Veness, D. Silver, A. Blair, and W. Uther. Bootstrapping from game tree search. In Advances in Neural Information Processing Systems, pages 1937–1945, 2009.
[27] Tomoyuki Kaneko and Kunihito Hoki. Analysis of evaluation-function learning by comparison of sibling nodes. In Advances in Computer Games - 13th International Conference, ACG 2011, Tilburg, The Netherlands, November 20-22, 2011, Revised Selected Papers, pages 158–169, 2011.
[28] Kunihito Hoki and Tomoyuki Kaneko. Large-scale optimization for evaluation functions with minimax search. Journal of Artificial Intelligence Research (JAIR), 49:527–568, 2014.
[29] Matthew Lai. Giraffe: Using deep reinforcement learning to play chess. Master's thesis, Imperial College London, 2015.
[30] Thomas Anthony, Zheng Tian, and David Barber. Thinking fast and slow with deep learning and tree search. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pages 5366–5376, 2017.
[31] D. E. Knuth and R. W Moore. An analysis of alpha–beta pruning. Artificial Intelligence, 6(4):293––326, 1975.
[32] Raghuram Ramanujan, Ashish Sabharwal, and Bart Selman. Understanding sampling style adversarial search methods. In Proceedings of the 26th Conference on Uncertainty in Artificial Intelligence (UAI), 2010.