Google DeepMind s AlphaGo vs. world Go champion Lee Sedol

Similar documents
If a pawn is still on its original square, it can move two squares or one square ahead. Pawn Movement

Chess Rules- The Ultimate Guide for Beginners

YourTurnMyTurn.com: chess rules. Jan Willem Schoonhoven Copyright 2018 YourTurnMyTurn.com

Movement of the pieces

NSCL LUDI CHESS RULES

Chess Handbook: Course One

46.1 Introduction. Foundations of Artificial Intelligence Introduction MCTS in AlphaGo Neural Networks. 46.

Game-playing: DeepBlue and AlphaGo

Mastering Chess and Shogi by Self- Play with a General Reinforcement Learning Algorithm

LEARN TO PLAY CHESS CONTENTS 1 INTRODUCTION. Terry Marris December 2004

OCTAGON 5 IN 1 GAME SET

Essential Chess Basics (Updated Version) provided by Chessolutions.com

Foundations of Artificial Intelligence Introduction State of the Art Summary. classification: Board Games: Overview

Monte Carlo Tree Search

Andrei Behel AC-43И 1

Computer Go: from the Beginnings to AlphaGo. Martin Müller, University of Alberta

Welcome to the Brain Games Chess Help File.

The game of Paco Ŝako

DELUXE 3 IN 1 GAME SET

CSC321 Lecture 23: Go

CS-E4800 Artificial Intelligence

How AI Won at Go and So What? Garry Kasparov vs. Deep Blue (1997)

Foundations of Artificial Intelligence

CS440/ECE448 Lecture 11: Stochastic Games, Stochastic Search, and Learned Evaluation Functions

Foundations of Artificial Intelligence

CS 188: Artificial Intelligence

Chess, a mathematical definition

Unit-III Chap-II Adversarial Search. Created by: Ashish Shah 1

School of EECS Washington State University. Artificial Intelligence

Artificial Intelligence Search III

Chess Puzzle Mate in N-Moves Solver with Branch and Bound Algorithm

Game-playing AIs: Games and Adversarial Search I AIMA

3. Bishops b. The main objective of this lesson is to teach the rules of movement for the bishops.

CS 380: ARTIFICIAL INTELLIGENCE MONTE CARLO SEARCH. Santiago Ontañón

Artificial Intelligence

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 2, 2016 Tim French

Games (adversarial search problems)

Lecture 14. Questions? Friday, February 10 CS 430 Artificial Intelligence - Lecture 14 1

Adversary Search. Ref: Chapter 5

COMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search

John Griffin Chess Club Rules and Etiquette

COMP219: Artificial Intelligence. Lecture 13: Game Playing

Artificial Intelligence Adversarial Search

After learning the Rules, What should beginners learn next?

An End Game in West Valley City, Utah (at the Harman Chess Club)

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask

Artificial Intelligence. Minimax and alpha-beta pruning

TTIC 31230, Fundamentals of Deep Learning David McAllester, April AlphaZero

ChesServe Test Plan. ChesServe CS 451 Allan Caffee Charles Conroy Kyle Golrick Christopher Gore David Kerkeslager

CHESS SOLUTION PREP GUIDE.

Automated Suicide: An Antichess Engine

More Adversarial Search

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

CPS331 Lecture: Search in Games last revised 2/16/10

ARTICLE 1. THE CHESSBOARD

Game Playing State-of-the-Art CSE 473: Artificial Intelligence Fall Deterministic Games. Zero-Sum Games 10/13/17. Adversarial Search

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:

CS 229 Final Project: Using Reinforcement Learning to Play Othello

CSE 473: Artificial Intelligence. Outline

The Basic Rules of Chess

Artificial Intelligence

A Simple Pawn End Game

Adversarial Search. CMPSCI 383 September 29, 2011

Its topic is Chess for four players. The board for the version I will be discussing first

ARTIFICIAL INTELLIGENCE (CS 370D)

The Principles Of A.I Alphago

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5

Monte Carlo Tree Search and AlphaGo. Suraj Nair, Peter Kundzicz, Kevin An, Vansh Kumar

Today. Types of Game. Games and Search 1/18/2010. COMP210: Artificial Intelligence. Lecture 10. Game playing

CS2212 PROGRAMMING CHALLENGE II EVALUATION FUNCTIONS N. H. N. D. DE SILVA

Perry High School. 2 nd Semester!

Adversarial Search and Game- Playing C H A P T E R 6 C M P T : S P R I N G H A S S A N K H O S R A V I

Intelligent Non-Player Character with Deep Learning. Intelligent Non-Player Character with Deep Learning 1

AlphaGo and Artificial Intelligence GUEST LECTURE IN THE GAME OF GO AND SOCIETY

Using Neural Network and Monte-Carlo Tree Search to Play the Game TEN

a b c d e f g h i j k l m n

Cover and Interior design Olena S. Sullivan Interior format and copyediting Luise Lee

Contents. Foundations of Artificial Intelligence. Problems. Why Board Games?

Success Stories of Deep RL. David Silver

Artificial Intelligence. Topic 5. Game playing

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville

Ar#ficial)Intelligence!!

The Game. Getting Sarted

Algorithms for Data Structures: Search for Games. Phillip Smith 27/11/13

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

Computing Science (CMPUT) 496

CS 331: Artificial Intelligence Adversarial Search II. Outline

CPS 570: Artificial Intelligence Two-player, zero-sum, perfect-information Games

CS 188: Artificial Intelligence Spring Announcements

Announcements. CS 188: Artificial Intelligence Spring Game Playing State-of-the-Art. Overview. Game Playing. GamesCrafters

Foundations of AI. 5. Board Games. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard and Luc De Raedt SA-1

More on games (Ch )

Mastering the game of Go without human knowledge

Game Playing: Adversarial Search. Chapter 5

CSE 40171: Artificial Intelligence. Adversarial Search: Game Trees, Alpha-Beta Pruning; Imperfect Decisions

Programming Project 1: Pacman (Due )

AI, AlphaGo and computer Hex

Aja Huang Cho Chikun David Silver Demis Hassabis. Fan Hui Geoff Hinton Lee Sedol Michael Redmond

Transcription:

Google DeepMind s AlphaGo vs. world Go champion Lee Sedol Review of Nature paper: Mastering the game of Go with Deep Neural Networks & Tree Search Tapani Raiko Thanks to Antti Tarvainen for some slides

Slide from my lecture on 26 March 2015: Future of Go AI In 2015, a computer vision based approach (deep convolutional neural network) was trained to mimick human player moves This resulted in surprisingly strong AI without any look-ahead (almost competitive with Monte-Carlo) Two approaches are very different in nature Perhaps a good combination will beat humans in near future (Aalto University) Artificial Intelligence 2016 2 / 71

Lee Sedol vs. AlphaGo 1 brain 80 watts 1202 CPUs, 176 GPUs >100 000 watts

Table of Contents Game of Go Deep Learning for Go Monte Carlo tree search (Aalto University) Artificial Intelligence 2016 5 / 71

Go (or Baduk or Weiqi) Two-player fully-observable deterministic zero-sum board game Oldest game still played with same simple rules Most popular board game in the world AI won human champion in March 2016 (Aalto University) Artificial Intelligence 2016 6 / 71

Game 1: Lee Sedol (black) resigned here (Aalto University) Artificial Intelligence 2016 7 / 71

White is leading a bit (Aalto University) Artificial Intelligence 2016 8 / 71

Amateurs would have finished e.g. like this (Aalto University) Artificial Intelligence 2016 9 / 71

...and count that white won by 4.5 points (Aalto University) Artificial Intelligence 2016 10 / 71

Beginners (or simple AI rollouts) continue (Aalto University) Artificial Intelligence 2016 11 / 71

...until scoring is really obvious (Aalto University) Artificial Intelligence 2016 12 / 71

Capturing (Aalto University) Artificial Intelligence 2016 13 / 71

Capturing (Aalto University) Artificial Intelligence 2016 14 / 71

Capturing (Aalto University) Artificial Intelligence 2016 15 / 71

Capturing (Aalto University) Artificial Intelligence 2016 16 / 71

Capturing (Aalto University) Artificial Intelligence 2016 17 / 71

Capturing (Aalto University) Artificial Intelligence 2016 18 / 71

Capturing (Aalto University) Artificial Intelligence 2016 19 / 71

Capturing (Aalto University) Artificial Intelligence 2016 20 / 71

Capturing (Aalto University) Artificial Intelligence 2016 21 / 71

Rules of Chess (1/2) Chess is played on a chessboard, a square board divided into 64 squares (eight-by-eight) of alternating color. No matter what the actual colors of the board, the lighter-colored squares are called light or white, and the darker-colored squares are called dark or black. Sixteen white and sixteen black pieces are placed on the board at the beginning of the game. The board is placed so that a white square is in each player s near-right corner. Horizontal rows are called ranks and vertical rows are called files. At the beginning of the game, the pieces are arranged as follows: The rooks are placed on the outside corners, right and left edge. The knights are placed immediately inside of the rooks. The bishops are placed immediately inside of the knights. The queen is placed on the central square of the same color of that of the player: white queen on the white square and black queen on the black square. The king takes the vacant spot next to the queen. The pawns are placed one square in front of all of the other pieces. White moves first, then players alternate moves. Making a move is required; it is not legal to skip a move. Play continues until a king is checkmated, a player resigns, or a draw is declared. Each type of chess piece has its own method of movement. A piece moves to a vacant square except when capturing an opponent s piece. Except for any move of the knight and castling, pieces cannot jump over other pieces. A piece is captured (or taken) when an attacking enemy piece replaces it on its square (en passant is the only exception). The captured piece is thereby permanently removed from the game. The king can be put in check but cannot be captured (see below). The king moves exactly one square horizontally, vertically, or diagonally. A special move with the king known as castling is allowed only once per player, per game (see below). A rook moves any number of vacant squares in a horizontal or vertical direction. It also is moved when castling. A bishop moves any number of vacant squares in any diagonal direction. The queen moves any number of vacant squares in a horizontal, vertical, or diagonal direction. A knight moves to the nearest square not on the same rank, file, or diagonal. The knight is not blocked by other pieces: it jumps to the new location. Pawns have the most complex rules of movement: A pawn moves straight forward one square, if that square is vacant. If it has not yet moved, a pawn also has the option of moving two squares straight forward, provided both squares are vacant. Pawns cannot move backwards. Pawns are the only pieces that capture differently from how they move. A pawn can capture an enemy piece on either of the two squares diagonally in front of the pawn (but cannot move to those squares if they are vacant). The pawn is also involved in the two special moves en passant and promotion. Castling consists of moving the king two squares towards a rook, then placing the rook on the other side of the king, adjacent to it. Castling is only permissible if all of the following conditions hold: The king and rook involved in castling must not have previously moved; There must be no pieces between the king and the rook; The king may not currently be in check, nor may the king pass through or end up in a square that is under attack by an enemy piece (though the rook is permitted to be under attack and to pass over an attacked square); The king and the rook must be on the same rank.. (Aalto University) Artificial Intelligence 2016 22 / 71

Rules of Chess (2/2) En passant. When a pawn advances two squares from its original square and ends the turn adjacent to a pawn of the opponent s on the same rank, it may be captured by that pawn of the opponent s, as if it had moved only one square forward. This capture is only legal on the opponent s next move immediately following the first pawn s advance. Pawn promotion. If a player advances a pawn to its eighth rank, the pawn is then promoted (converted) to a queen, rook, bishop, or knight of the same color at the choice of the player (a queen is usually chosen). The choice is not limited to previously captured pieces. Check. A king is in check when it is under attack by at least one enemy piece. A piece unable to move because it would place its own king in check (it is pinned against its own king) may still deliver check to the opposing player. A player may not make any move which places or leaves his king in check. The possible ways to get out of check are: Move the king to a square where it is not threatened. Capture the threatening piece (possibly with the king). Block the check by placing a piece between the king and the opponent s threatening piece. If it is not possible to get out of check, the king is checkmated and the game is over. Draw. The game ends in a draw if any of these conditions occur: The game is automatically a draw if the player to move is not in check but has no legal move. This situation is called a stalemate. An example of such a position is shown in the diagram to the right. The game is immediately drawn when there is no possibility of checkmate for either side with any series of legal moves. This draw is often due to insufficient material, including the endgames king against king; king against king and bishop; king against king and knight; king and bishop against king and bishop, with both bishops on squares of the same color. Both players agree to a draw after one of the players makes such an offer. The player having the move may claim a draw by declaring that one of the following conditions exists, or by declaring an intention to make a move which will bring about one of these conditions: Fifty-move rule: There has been no capture or pawn move in the last fifty moves by each player. Threefold repetition: The same board position has occurred three times with the same player to move and all pieces having the same rights to move, including the right to castle or capture en passant. (Aalto University) Artificial Intelligence 2016 23 / 71

Rules of Go Go is played on 19 19 square grid of points, by players called Black and White. Each point on the grid may be colored black, white or empty. A point P, is said to reach color C, if there is a path of (vertically or horizontally) adjacent points of P s color from P to a point of color C. Clearing a color means emptying all points of that color that don t reach empty. Starting with an empty grid, the players alternate turns, starting with Black. A turn is either a pass; or a move that doesn t repeat an earlier grid coloring. A move consists of coloring an empty point one s own color; then clearing the opponent color, and then clearing one s own color. The game ends after two consecutive passes. A player s score is the number of points of her color, plus the number of empty points that reach only her color. White gets 7.5 points extra. The player with the higher score at the end of the game is the winner. (Aalto University) Artificial Intelligence 2016 24 / 71

Easier to make territory in the corner (Aalto University) Artificial Intelligence 2016 25 / 71

Opening (Aalto University) Artificial Intelligence 2016 26 / 71

Opening (Aalto University) Artificial Intelligence 2016 27 / 71

Opening (Aalto University) Artificial Intelligence 2016 28 / 71

Opening (Aalto University) Artificial Intelligence 2016 29 / 71

Opening (Aalto University) Artificial Intelligence 2016 30 / 71

Opening (Aalto University) Artificial Intelligence 2016 31 / 71

Opening (Aalto University) Artificial Intelligence 2016 32 / 71

Opening (Aalto University) Artificial Intelligence 2016 33 / 71

Opening (Aalto University) Artificial Intelligence 2016 34 / 71

Opening (Aalto University) Artificial Intelligence 2016 35 / 71

Why 19x19 grid? Third and forth lines about equally important. (Aalto University) Artificial Intelligence 2016 36 / 71

Why 19x19 grid? If white blocks black... (Aalto University) Artificial Intelligence 2016 37 / 71

Why 19x19 grid?...white is always connected. (Aalto University) Artificial Intelligence 2016 38 / 71

Why 19x19 grid? White has blocked black. (Aalto University) Artificial Intelligence 2016 39 / 71

Why 19x19 grid? But black can cut. A fight will ensue. (Aalto University) Artificial Intelligence 2016 40 / 71

Go should be in easy category of AI problems Fully observable vs. partially observable Single agent vs. multiagent Deterministic vs. stochastic Episodic vs. sequential Static vs. dynamic Discrete vs. continuous Known vs. unknown (Aalto University) Artificial Intelligence 2016 41 / 71

Go AI progress (Aalto University) Artificial Intelligence 2016 42 / 71

Why Go was difficult for AI Go is visual and thus easy for people Could not show 8 Chess moves in one image Branching factor is large (no brute force) Heuristic evaluation is difficult Horizon effect is strong (easy to delay capture) (Aalto University) Artificial Intelligence 2016 43 / 71

Table of Contents Game of Go Deep Learning for Go Monte Carlo tree search (Aalto University) Artificial Intelligence 2016 44 / 71

AlphaGo uses four networks Three of them output a probability distribution p(a s) over the next move a Last one evaluates the value v(s) of a position (Aalto University) Artificial Intelligence 2016 45 / 71

Supervised learning (nets 1&2) Predict human moves p(a s) 160 000 game records from 6-9 dan amateurs log p(a s) θ Gradient-based learning: θ Rollout policy uses handcrafted features and no hidden units (2µs to evaluate) SL policy network uses a convolutional network (4.8ms to evaluate, 57% prediction accuracy) (Sutskever & Nair, 2008) (Maddison et al., 2015) (Clark & Storkey, 2015) (Aalto University) Artificial Intelligence 2016 46 / 71

Convolutional architecture for policy nets (2&3) Output: probability of next move a in each location Input: board state s as 19 19 48, 5 5 filters 12 layers of 19 19 192, 3 3 filters zero padding, stride 1 ReLU activations softmax at the end About 4 million params θ (Aalto University) Artificial Intelligence 2016 47 / 71

Convolution Convolutional networks are used in computer vision (LeCun et al., 1989) (Aalto University) Artificial Intelligence 2016 48 / 71

Reinforcement learning of policy net (3) Initialize by net 2, learn from self-play 30 million games Policy gradient (Williams, 1992, Sutton et al., 2000): θ log p(a t s t ) z t θ where z t { 1, 1} is the outcome of the game This reaches 3 dan amateur strength (without any look-ahead, 4.8ms per move) (Aalto University) Artificial Intelligence 2016 49 / 71

Convolutional architecture for value net (4) Output: expected outcome v t = E[z t ] of the game from state s with RL policy Similar architecture, but a fully connected layer with 256 ReLUs and single output with tanh at the top (Aalto University) Artificial Intelligence 2016 50 / 71

Reinforcement learning of value net (4) Self-play (net 3) to generate 30 million positions, each from different game Regression: θ v(s t) θ (z t v(s t )) where z t { 1, 1} is the outcome of the game, v(s t ) is the predicted outcome (Aalto University) Artificial Intelligence 2016 51 / 71

(Aalto University) Artificial Intelligence 2016 52 / 71

(Aalto University) Artificial Intelligence 2016 53 / 71

Table of Contents Game of Go Deep Learning for Go Monte Carlo tree search (Aalto University) Artificial Intelligence 2016 54 / 71

Monte Carlo tree search (Coulom, 2006) Self-play from current state s 17 000 simulations per second Each path adds a new leaf node to search tree Not full-width search Final choice is move that was chosen most times (Aalto University) Artificial Intelligence 2016 55 / 71

Example (single agent) 0/0 0/0 Show number of wins/trials for each node (Aalto University) Artificial Intelligence 2016 56 / 71

1/1 1/1 win (Aalto University) Artificial Intelligence 2016 57 / 71

1/1 1/1 0/0 (Aalto University) Artificial Intelligence 2016 58 / 71

1/2 1/1 0/1 loss (Aalto University) Artificial Intelligence 2016 59 / 71

2/3 1/1 0/1 1/1 win (Aalto University) Artificial Intelligence 2016 60 / 71

3/4 2/2 0/1 1/1 1/1 win (Aalto University) Artificial Intelligence 2016 61 / 71

3/5 2/2 0/1 1/2 1/1 0/1 loss (Aalto University) Artificial Intelligence 2016 62 / 71

4/6 3/3 0/1 1/2 1/1 1/1 0/1 win (Aalto University) Artificial Intelligence 2016 63 / 71

Step 1/4: Selection Choose action by arg max a Q(a s) + where p(a s) is from SL policy net (2) 5p(a s) 1+count(a s) (Aalto University) Artificial Intelligence 2016 64 / 71

Step 2/4: Expansion Create one new node (Run SL policy net only once) (Aalto University) Artificial Intelligence 2016 65 / 71

Step 3/4: Evaluation Evaluation Q(s) is average of Value network (4) and outcome of self-play by Rollout policy (net 1) (Aalto University) Artificial Intelligence 2016 66 / 71

Step 4/4: Backup Q(a s) along the path are updated to track the mean of Q in subtree below (Aalto University) Artificial Intelligence 2016 67 / 71

Strength AlphaGo won Lee Sedol (4 games out of 5) Strongest AI with any 2/3 features enabled Single machine version professional level, too (Aalto University) Artificial Intelligence 2016 68 / 71

AlphaGo s new move (game 2, move 37) (Aalto University) Artificial Intelligence 2016 69 / 71

Lee Sedol s hand of god (game 4, move 78) (Aalto University) Artificial Intelligence 2016 70 / 71

Comparison to Deep Blue (1997) AlphaGo learns uses 100 000 times faster hardware evaluates 1000 times fewer positions per second is not restricted to deterministic adversarial search (Deep Blue was based on alpha-beta pruning)