Computing Elo Ratings of Move Patterns. Game of Go

Similar documents
Computing Elo Ratings of Move Patterns in the Game of Go

Computing Science (CMPUT) 496

Monte Carlo Tree Search

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

Game-playing: DeepBlue and AlphaGo

Analyzing the Impact of Knowledge and Search in Monte Carlo Tree Search in Go

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

Recent Progress in Computer Go. Martin Müller University of Alberta Edmonton, Canada

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

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

CS221 Project Final Report Gomoku Game Agent

Move Prediction in Go Modelling Feature Interactions Using Latent Factors

ARTIFICIAL INTELLIGENCE (CS 370D)

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

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec

Andrei Behel AC-43И 1

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

By David Anderson SZTAKI (Budapest, Hungary) WPI D2009

More Adversarial Search

Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Outcome Forecasting in Sports. Ondřej Hubáček

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

Challenges in Monte Carlo Tree Search. Martin Müller University of Alberta

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

Goal threats, temperature and Monte-Carlo Go

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

Decision Tree Analysis in Game Informatics

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

Ar#ficial)Intelligence!!

Virtual Global Search: Application to 9x9 Go

Game playing. Chapter 5, Sections 1 6

Game Playing: Adversarial Search. Chapter 5

Programming an Othello AI Michael An (man4), Evan Liang (liange)

Artificial Intelligence. Minimax and alpha-beta pruning

A Bandit Approach for Tree Search

A Complex Systems Introduction to Go

CS 387: GAME AI BOARD GAMES

Poker AI: Equilibrium, Online Resolving, Deep Learning and Reinforcement Learning

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

game tree complete all possible moves

Foundations of Artificial Intelligence

Google DeepMind s AlphaGo vs. world Go champion Lee Sedol

Game Theory and Randomized Algorithms

Monte Carlo Go Has a Way to Go

CSC321 Lecture 23: Go

CS221 Final Project Report Learn to Play Texas hold em

Introduction to Game Theory

Foundations of AI. 6. Board Games. Search Strategies for Games, Games with Chance, State of the Art

Artificial Intelligence

The first topic I would like to explore is probabilistic reasoning with Bayesian

Adversarial Search. Chapter 5. Mausam (Based on slides of Stuart Russell, Andrew Parks, Henry Kautz, Linda Shapiro) 1

JAIST Reposi. Detection and Labeling of Bad Moves Go. Title. Author(s)Ikeda, Kokolo; Viennot, Simon; Sato,

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search

SERGEY I. NIKOLENKO AND ALEXANDER V. SIROTKIN

CS-E4800 Artificial Intelligence

Adverserial Search Chapter 5 minmax algorithm alpha-beta pruning TDDC17. Problems. Why Board Games?

More on games (Ch )

Programming Project 1: Pacman (Due )

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

Hex 2017: MOHEX wins the 11x11 and 13x13 tournaments

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

The Glicko system. Professor Mark E. Glickman Boston University

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

Building Opening Books for 9 9 Go Without Relying on Human Go Expertise

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

Solving Problems by Searching: Adversarial Search

CS221 Project Final: DominAI

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

Real-time Grid Computing : Monte-Carlo Methods in Parallel Tree Searching

CS 771 Artificial Intelligence. Adversarial Search

A Study of UCT and its Enhancements in an Artificial Game

Associating domain-dependent knowledge and Monte Carlo approaches within a go program

CSE 473: Artificial Intelligence. Outline

Machine Learning in Iterated Prisoner s Dilemma using Evolutionary Algorithms

Learning from Hints: AI for Playing Threes

Igo Math Natural and Artificial Intelligence

More on games (Ch )

Adversary Search. Ref: Chapter 5

Adversarial Search (Game Playing)

The Game-Theoretic Approach to Machine Learning and Adaptation

Automated Suicide: An Antichess Engine

CS 188: Artificial Intelligence

A Parallel Monte-Carlo Tree Search Algorithm

Optimizing Media Access Strategy for Competing Cognitive Radio Networks Y. Gwon, S. Dastangoo, H. T. Kung

General Game Playing (GGP) Winter term 2013/ Summary

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

CS 5522: Artificial Intelligence II

Generalized Game Trees

Game Playing State-of-the-Art

COMP3211 Project. Artificial Intelligence for Tron game. Group 7. Chiu Ka Wa ( ) Chun Wai Wong ( ) Ku Chun Kit ( )

CS 331: Artificial Intelligence Adversarial Search II. Outline

Lecture 5: Game Playing (Adversarial Search)

Symbolic Classification of General Two-Player Games

A Move Generating Algorithm for Hex Solvers

Alpha-beta Pruning in Chess Engines

CS229 Project: Building an Intelligent Agent to play 9x9 Go

Adversarial Search. Read AIMA Chapter CIS 421/521 - Intro to AI 1

Artificial Intelligence. 4. Game Playing. Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder

Transcription:

in the Game of Go Presented by Markus Enzenberger. Go Seminar, University of Alberta. May 6, 2007

Outline Introduction Minorization-Maximization / Bradley-Terry Models Experiments in the Game of Go Usage in a MC-Program Conclusion

Introduction Patterns are useful for Go programs Prune search trees Order moves Improve random simulations in Monte-Carlo programs One approach for learning patterns: Extract frequent patterns from expert games New supervised learning algorithm based on Bradley-Terry model (theoretical basis of Elo system)

Elo rating system Assign numerical strength value to players Compute strength from game results Estimates a probability distribution for future game results Apply to move patterns Each move is a victory of one pattern over the others Elo ratings give a probability distribution over moves

Related Work Related Work Simplest approach: Measure frequency of play of each pattern (Bouzy/Chaslot 2005) (Moyo Go Studio) Rating(Pattern) = number of times played number of times present Stronger patterns are played sooner higher rating Does not take strength of competing patterns into account (Elo-rating analogy: measure only winning rate independent of opponent strength)

Related Work Bayesian pattern ranking (Stern/Herbrich/Graepel 2006) Takes strength of opponents into account Patterns to evaluate grows exponentially with number of features Restricted to only a few move features Maximum-entropy classification (Araki/Yoshida/Tsuruoka/Tsujii 2007) Addresses the problem of combining move features Does not take strength of opponents into account High computational cost

Minorization-Maximization / Bradley-Terry Models Introduction Minorization-Maximization / Bradley-Terry Models Elo Ratings and the Bradley-Terry Model Generalizations of the Bradley-Terry Model Relevance of the Bradley-Terry Model Bayesian Inference Minorization-Maximization Experiments in the Game of Go Usage in a MC-Program Conclusion

Elo Ratings and the Bradley-Terry Model Elo Ratings and the Bradley-Terry Model γ i is a (positive) value for the strength of individual i Estimation fo the probability that i beats j: P(i beats j) = γ i γ i + γ j (Elo rating of i is defined by r i = 400 log 10 (γ i ))

Generalizations of the Bradley-Terry Model Generalizations of the Bradley-Terry Model Competitions between more than one individual: i {1,..., n}, P(i wins) = γ i γ 1 + γ 2 +... + γ n Competitions between teams: P(1-2-3 wins against 4-2 and 1-5-6-7) = γ 1 γ 2 γ 3 γ 1 γ 2 γ 3 + γ 4 γ 2 + γ 1 γ 5 γ 6 γ 7 (Hunter 2004)

Relevance of the Bradley-Terry Model Relevance of the Bradley-Terry Model Strong assumptions about what is being modeled No cycles Strength of a team is the sum of its members (in Elo ratings)

Bayesian Inference Bayesian Inference The values γ i have to be estimated from past results R using Bayesian inference: P(γ R) = P(R γ)p(γ) P(R) Find γ that maximizes P(γ R) Convenient way to choose a prior distribution P(γ) by virtual game results R : P(γ) = P(R γ) maximize P(R, R γ)

Minorization-Maximization Minorization-Maximization Notation n individuals with unknown strengths γ 1,..., γ n N results R 1,..., R N Probability of one result R j as a function of γ i : P(R j ) = A ijγ i + B ij C ij γ i + D ij A ij, B ij, C ij, D ij do not depend on γ i. Either A ij or B ij is 0. Objective to maximize: L(γ i ) = N P(R j ) j=1

Minorization-Maximization Make inital guess γ 0 Find function m that minorizes L at γ 0 m(γ 0 ) = L(γ 0 ) γ : m(γ) L(γ) Compute maximum γ 1 of m γ 1 is an improvement over γ 0

Minorization-Maximization Function to be maximized Take logarithm: log L(γ i ) = L(γ i ) = N j=1 A ij γ i + B ij C ij γ i + D ij N log(a ij γ i + B ij ) j=1 Define number of wins: W i = {j A ij 0} Remove terms that do not depend on γ i f (γ i ) = W i log γ i N log(c ij γ i + D ij ) j=1 N log(c ij γ i + D ij ) j=1

Minorization-Maximization Logarithms can be minorized by their tangent at x 0 :

Minorization-Maximization Minorizing function to be maximized becomes: Maximum of m is at: N C ij γ i m(γ i ) = W i log γ i C ij γ i + D ij j=1 γ i = W i N C ij j=1 C ij γ i +D ij

Minorization-Maximization Minorization-Maximization Formula: γ i W i N C ij j=1 C ij γ i +D ij A win counts more if team mates are weak (C ij ) overall strength of participants is high (C ij γ i + D ij ) Updates can be done one γ i at a time in batches (only for mutually exclusive features)

Experiments in the Game of Go Introduction Minorization-Maximization / Bradley-Terry Models Experiments in the Game of Go Data Features Prior Results Discussion Usage in a MC-Program Conclusion

Each position of a game is a competition The played move is the winner Each move is a team of features

Data Data Game records by strong players on the KGS Go server Either one player is 7d or stronger or both are 6d Training set: 652 games (131,939 moves) Test set: 551 games (115,832 moves)

Features Features Tactical features 1. pass 2. capture 3. extension 4. self-atari 5. atari 6. distance to border 7. distance to previous move 8. distance to move before previous move Monte-Carlo owner (63 random games) Shape patterns (16,780 shapes of radius 3 10 that occur at least 5000 times in training set)

Prior Prior Virtual opponent with γ = 1 Add one virtual win and one virtual loss against the virtual opponent for each feature In Elo-rating, this corresponds to a symmetric probability distribution with mean 0 and standard deviation 302

Results Results

Results

Results Mean log-evidence per game stage Mean logarithm of probability of selecting the target move Better in the middle and endgame, worse in the beginning (but Stern/Herbrich/Graepel used 12,000,000 shape patterns)

Results Probability of finding the target move within n best moves

Discussion Discussion Best result among results published in academic papers (De Groot (Moyo Go Studio) claims 42 % not backed by publication) Used much less games (652) and shape patterns (16,780) than Stern/Herbrich/Graepel (181,000 games; 12,000,000 shape patterns) Training took only 1 hour CPU time and 600 MB RAM

Usage in a MC-Program Introduction Minorization-Maximization / Bradley-Terry Models Experiments in the Game of Go Usage in a MC-Program Random Simulations Progressive Widening Performance against GNU Go Conclusion

Random Simulations Random Simulations Patterns provide probability distributions for random games Only fast, lightweight features 3 3 shapes extension (without ladder knowledge) capture (without ladder knowledge) self-atari contiguity to previous move Contiguity to previous move is a strong feature Produces sequences of contiguous moves like in MoGo

Progressive Widening Progressive Widening Crazy Stone uses patterns to prune the search tree Full set of features 1. Node in search tree is first searched for a while with random simulations 2. Then node is promoted to internal node and pruning is applied Pruning algorithm: Restrict search to first n node, with n growing with the logarithm of number of simulations: add n th node (n 2) after 40 1.4 n 2 simulations Due to strength of contiguity feature, this tends to produce a local search

Performance against GNU Go Performance against GNU Go GNU Go 3.6 Opteron 2.2 GHz: 15,500 sim/sec (9 9), 3,700 sim/sec (19 19)

Conclusion / Future Work Generalized Bradley-Terry model is a powerful technique for pattern learnung simple and efficient allows large number of features produces probability distribution over legal moves for MC Principle of Monte Carlo features could be exploited more Validity of the model could be tested and improved: Use only one (or few) sample per game to improve independence of samples Test linearity hypothesis of Bradley-Terry model (strength of team is sum of strength of members) Estimate the strength of some frequent feature pairs