A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play

· Science

7 min read Original article ↗

One program to rule them all

Computers can beat humans at increasingly complex games, including chess and Go. However, these programs are typically constructed for a particular game, exploiting its properties, such as the symmetries of the board on which it is played. Silver et al. developed a program called AlphaZero, which taught itself to play Go, chess, and shogi (a Japanese version of chess) (see the Editorial, and the Perspective by Campbell). AlphaZero managed to beat state-of-the-art programs specializing in these three games. The ability of AlphaZero to adapt to various game rules is a notable step toward achieving a general game-playing system.

Science, this issue p. 1140; see also pp. 1087 and 1118

Abstract

The game of chess is the longest-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. By contrast, the AlphaGo Zero program recently achieved superhuman performance in the game of Go by reinforcement learning from self-play. In this paper, we generalize this approach into a single AlphaZero algorithm that can achieve superhuman performance in many challenging games. Starting from random play and given no domain knowledge except the game rules, AlphaZero convincingly defeated a world champion program in the games of chess and shogi (Japanese chess), as well as Go.

Register and access this article for free

As a service to the community, this article is available for free.

Access the full article

View all access options to continue reading this article.

Supplementary Material

Summary

Materials and Methods

Figs. S1 to S4

Tables S1 to S9

References (33–50)

Data S1

Resources

File (aar6404-silver-sm.pdf)

File (aar6404_datas1.zip)

References and Notes

1

M. Campbell, A. J. Hoane Jr., F. Hsu, Deep Blue. Artif. Intell. 134, 57–83 (2002).

2

F.-H. Hsu, Behind Deep Blue: Building the Computer That Defeated the World Chess Champion (Princeton Univ., 2002).

3

B. Pell, A strategic metagame player for general chess-like games. Comput. Intell. 12, 177–198 (1996).

4

M. R. Genesereth, N. Love, B. Pell, General game playing: overview of the AAAI competition. AI Mag. 26, 62–72 (2005).

5

A. L. Samuel, Some studies in machine learning using the game of checkers. II—Recent progress. IBM J. Res. Dev. 11, 601–617 (1967).

6

G. Tesauro, TD-Gammon, a self-teaching backgammon program, achieves master-level play. Neural Comput. 6, 215–219 (1994).

7

C. J. Maddison, A. Huang, I. Sutskever, D. Silver, paper presented at the International Conference on Learning Representations 2015, San Diego, CA, 7 to 9 May 2015.

8

D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, D. Hassabis, Mastering the game of Go with deep neural networks and tree search. Nature 529, 484–489 (2016).

9

D. Silver, J. Schrittwieser, K. Simonyan, I. Antonoglou, A. Huang, A. Guez, T. Hubert, L. Baker, M. Lai, A. Bolton, Y. Chen, T. Lillicrap, F. Hui, L. Sifre, G. van den Driessche, T. Graepel, D. Hassabis, Mastering the game of Go without human knowledge. Nature 550, 354–359 (2017).

10

See the supplementary materials for additional information.

12

D. N. L. Levy, M. Newborn, How Computers Play Chess (Ishi Press, 2009).

13

V. Allis, “Searching for solutions in games and artificial intelligence,” Ph.D. thesis, Transnational University Limburg, Maastricht, Netherlands (1994).

14

H. Iida, M. Sakuta, J. Rollason, Computer shogi. Artif. Intell. 134, 121–144 (2002).

16

W. Steinitz, The Modern Chess Instructor (Edition Olms, 1990).

17

E. Lasker, Common Sense in Chess (Dover Publications, 1965).

18

J. Knudsen, Essential Chess Quotations (iUniverse, 2000).

19

N. P. Jouppi, C. Young, N. Patil, D. Patterson, G. Agrawal, R. Bajwa, S. Bates, S. Bhatia, N. Boden, A. Borchers, R. Boyle, P. Cantin, C. Chao, C. Clark, J. Coriell, M. Daley, M. Dau, J. Dean, B. Gelb, T. V. Ghaemmaghami, R. Gottipati, W. Gulland, R. Hagmann, C. R. Ho, D. Hogberg, J. Hu, R. Hundt, D. Hurt, J. Ibarz, A. Jaffey, A. Jaworski, A. Kaplan, H. Khaitan, D. Killebrew, A. Koch, N. Kumar, S. Lacy, J. Laudon, J. Law, D. Le, C. Leary, Z. Liu, K. Lucke, A. Lundin, G. MacKean, A. Maggiore, M. Mahony, K. Miller, R. Nagarajan, R. Narayanaswami, R. Ni, K. Nix, T. Norrie, M. Omernick, N. Penukonda, A. Phelps, J. Ross, M. Ross, A. Salek, E. Samadiani, C. Severn, G. Sizikov, M. Snelham, J. Souter, D. Steinberg, A. Swing, M. Tan, G. Thorson, B. Tian, H. Toma, E. Tuttle, V. Vasudevan, R. Walter, W. Wang, E. Wilcox, D. H. Yoon, in Proceedings of the 44th Annual International Symposium on Computer Architecture, Toronto, Canada, 24 to 28 June 2017 (Association for Computing Machinery, 2017), pp. 1–12.

20

Note that the original AlphaGo Zero study used graphics processing units (GPUs) to train the neural networks.

21

R. Coulom, in Proceedings of the Sixth International Conference on Computers and Games, Beijing, China, 29 September to 1 October 2008 (Springer, 2008), pp. 113–124.

22

The prevalence of draws in high-level chess tends to compress the Elo scale, compared with that for shogi or Go.

23

Stockfish is designed to exploit CPU hardware and cannot make use of GPUs or TPUs, whereas AlphaZero is designed to exploit GPU-TPU hardware rather than CPU hardware.

24

A first generation TPU is roughly similar in inference speed to a Titan V GPU, although the architectures are not directly comparable.

25

AlphaGo Zero was ultimately trained for 3.1 million steps over 40 days.

26

Many TCEC opening positions are unbalanced according to both AlphaZero and Stockfish, resulting in more losses for both players.

28

The Stockfish variant used the Cerebellum opening book downloaded from https://zipproth.de/#Brainfish. AlphaZero did not use an opening book. To ensure diversity against a deterministic opening book, AlphaZero used a small amount of randomization in its opening moves (10); this avoided duplicate games but also resulted in more losses.

30

C. E. Shannon, XXII. Programming a computer for playing chess. London Edinburgh Dublin Philos. Mag. J. Sci. 41, 256–275 (1950).

31

O. Arenz, “Monte Carlo chess,” master’s thesis, Technische Universität Darmstadt (2012).

32

O. E. David, N. S. Netanyahu, L. Wolf, in Artificial Neural Networks and Machine Learning—ICANN 2016, Part II, Barcelona, Spain, 6 to 9 September 2016 (Springer, 2016), pp. 88–96.

33

T. Marsland, Encyclopedia of Artificial Intelligence, S. Shapiro, Ed. (Wiley, 1987).

34

G. Tesauro, Programming backgammon using self-teaching neural nets. Artif. Intell. 134, 181–199 (2002).

35

G. Tesauro, G. R. Galperin, On-line policy improvement using Monte-Carlo search. Adv. Neural Inf. Process. Syst. 9, 1068–1074 (1996).

36

S. Thrun, Is learning the n-th thing any easier than learning the first? Adv. Neural Inf. Process. Syst. 8, 1069–1076 (1995).

37

D. F. Beal, M. C. Smith, Temporal difference learning for heuristic search and game playing. Inf. Sci. 122, 3–21 (2000).

38

D. F. Beal, M. C. Smith, Temporal difference learning applied to game playing and the results of application to shogi. Theor. Comput. Sci. 252, 105–119 (2001).

39

J. Baxter, A. Tridgell, L. Weaver, Learning to play chess using temporal differences. Mach. Learn. 40, 243–263 (2000).

40

J. Veness, D. Silver, A. Blair, W. Uther, Bootstrapping from game tree search. Adv. Neural Inf. Process. Syst. 22, 1937–1945 (2009).

41

T. Kaneko, K. Hoki, in Advances in Computer Games – 13th International Conference, ACG 2011, Revised Selected Papers, Tilburg, Netherlands, 20 to 22 November 2011 (Springer, 2012), pp. 158–169.

42

K. Hoki, T. Kaneko, Large-scale optimization for evaluation functions with Minimax search. J. Artif. Intell. Res. 49, 527–568 (2014).

43

M. Lai, “Giraffe: Using deep reinforcement learning to play chess,” master’s thesis, Imperial College London (2015).

44

T. Anthony, Z. Tian, D. Barber, Thinking fast and slow with Deep Learning and Tree Search. Adv. Neural Inf. Process. Syst. 30, 5366–5376 (2017).

45

D. E. Knuth, R. W. Moore, An analysis of alpha-beta pruning. Artif. Intell. 6, 293–326 (1975).

46

R. Ramanujan, A. Sabharwal, B. Selman, in Proceedings of the 26th Conference on Uncertainty in Artificial Intelligence (UAI 2010), Catalina Island, CA, 8 to 11 July (AUAI Press, 2010).

47

C. D. Rosin, Multi-armed bandits with episode context. Ann. Math. Artif. Intell. 61, 203–230 (2011).

48

K. He, X. Zhang, S. Ren, J. Sun, in Computer Vision – ECCV 2016, 14th European Conference, Part IV, Amsterdam, Netherlands, 11 to 14 October 2016 (Springer, 2016), pp. 630–645.

49

The TCEC world championship disallows opening books and instead starts two games (one from each color) from each opening position.