CHECKMATE! A Brief Introduction to Game Theory. Dan Garcia UC Berkeley. The World. Kasparov

Similar documents
150 Students Can t Be Wrong! GamesCrafters,, a Computational Game Theory Undergraduate Research and Development Group at UC Berkeley

CS10 : The Beauty and Joy of Computing


CS10 : The Beauty and Joy of Computing

Surreal Numbers and Games. February 2010

Contents. MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes. 1 Wednesday, August Friday, August Monday, August 28 6

A Combinatorial Game Mathematical Strategy Planning Procedure for a Class of Chess Endgames

Legend. The Red Goal. The. Blue. Goal

Analyzing ELLIE - the Story of a Combinatorial Game

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Crossing Game Strategies

Lecture 33: How can computation Win games against you? Chess: Mechanical Turk

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games

Plan. Related courses. A Take-Away Game. Mathematical Games , (21-801) - Mathematical Games Look for it in Spring 11

Circular Nim Games. S. Heubach 1 M. Dufour 2. May 7, 2010 Math Colloquium, Cal Poly San Luis Obispo

Decomposition Search A Combinatorial Games Approach to Game Tree Search, with Applications to Solving Go Endgames

Adversarial Search (Game Playing)

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

Sequential games. We may play the dating game as a sequential game. In this case, one player, say Connie, makes a choice before the other.

Combined Games. Block, Alexander Huang, Boao. icamp Summer Research Program University of California, Irvine Irvine, CA

1 In the Beginning the Numbers

Game Theory and Algorithms Lecture 19: Nim & Impartial Combinatorial Games

EXPLORING TIC-TAC-TOE VARIANTS

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Game Playing in Practice

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game?

Grade 6 Math Circles Combinatorial Games - Solutions November 3/4, 2015

Impartial Combinatorial Games Berkeley Math Circle Intermediate II Ted Alper Evans Hall, room 740 Sept 1, 2015

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

Jim and Nim. Japheth Wood New York Math Circle. August 6, 2011

Adversarial Search Aka Games

STAJSIC, DAVORIN, M.A. Combinatorial Game Theory (2010) Directed by Dr. Clifford Smyth. pp.40

Obliged Sums of Games

Artificial Intelligence. Minimax and alpha-beta pruning

ADVERSARIAL SEARCH. Chapter 5

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties:

Tutorial 1. (ii) There are finite many possible positions. (iii) The players take turns to make moves.

Game Playing. Philipp Koehn. 29 September 2015

A Brief Introduction to Game Theory

Games, Triangulations, Theory

Artificial Intelligence

CS 188: Artificial Intelligence. Overview

Game Playing AI Class 8 Ch , 5.4.1, 5.5

On Variations of Nim and Chomp

Introduction To Game Theory: Two-Person Games of Perfect Information and Winning Strategies. Wes Weimer, University of Virginia

UNIT 13A AI: Games & Search Strategies

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5

Open Problems at the 2002 Dagstuhl Seminar on Algorithmic Combinatorial Game Theory

Intuition Mini-Max 2

Game, Set, and Match Carl W. Lee September 2016

game tree complete all possible moves

Copyright 2010 DigiPen Institute Of Technology and DigiPen (USA) Corporation. All rights reserved.

Game Tree Search. Generalizing Search Problems. Two-person Zero-Sum Games. Generalizing Search Problems. CSC384: Intro to Artificial Intelligence

Math 152: Applicable Mathematics and Computing

Z0Z. 0j0 ZPZ. 0J0 b c d

Game Theory Basics. Bernhard von Stengel

Games CSE 473. Kasparov Vs. Deep Junior August 2, 2003 Match ends in a 3 / 3 tie!

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

Another Form of Matrix Nim

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

Adversarial Search Lecture 7

CS 380: ARTIFICIAL INTELLIGENCE

Math 152: Applicable Mathematics and Computing

(b) In the position given in the figure below, find a winning move, if any. (b) In the position given in Figure 4.2, find a winning move, if any.

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5

Game, Set, and Match A Personal Journey

Game playing. Chapter 6. Chapter 6 1

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

HKUST Theoretical Computer Science Center Research Report HKUST-TCSC

On Variants of Nim and Chomp

Game Simulation and Analysis

CSC384: Introduction to Artificial Intelligence. Game Tree Search

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

Mohammad Hossein Manshaei 1394

Exercises for Introduction to Game Theory SOLUTIONS

SF2972 Game Theory Written Exam March 17, 2011

Game Playing. Garry Kasparov and Deep Blue. 1997, GM Gabriel Schwartzman's Chess Camera, courtesy IBM.

Last update: March 9, Game playing. CMSC 421, Chapter 6. CMSC 421, Chapter 6 1

arxiv: v2 [cs.cc] 18 Mar 2013

Game Playing State of the Art

The game of Reversi was invented around 1880 by two. Englishmen, Lewis Waterman and John W. Mollett. It later became

CS 188: Artificial Intelligence Spring 2007

Game playing. Outline

Game-playing AIs: Games and Adversarial Search I AIMA

PRIMES STEP Plays Games

Aspects of Game Theory & John Nash

Game Playing: Adversarial Search. Chapter 5

UNIT 13A AI: Games & Search Strategies. Announcements

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

Definition 1 (Game). For us, a game will be any series of alternating moves between two players where one player must win.

CS 4700: Artificial Intelligence

Game Playing. Why do AI researchers study game playing? 1. It s a good reasoning problem, formal and nontrivial.

Game, Set, and Match Carl W. Lee September 2016

Figure 1: A Checker-Stacks Position

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four 1

POSITIONS OF VALUE *2 IN GENERALIZED DOMINEERING AND CHESS

of Nebraska - Lincoln

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter , 5.7,5.8

Artificial Intelligence

V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax

Transcription:

CHECKMATE! The World A Brief Introduction to Game Theory Dan Garcia UC Berkeley Kasparov

Welcome! Introduction Topic motivation, goals Talk overview Combinatorial game theory basics w/examples Computational game theory Analysis of some simple games Research highlights A Brief Introduction to Game Theory 2/39

Game Theory: Economic or Combinatorial? Economic von Neumann and Morgenstern s 1944 Theory of Games and Economic Behavior Matrix games Prisoner s dilemma Incomplete info, simultaneous moves Goal: Maximize payoff Combinatorial Sprague and Grundy s 1939 Mathematics and Games Board (table) games Nim, Domineering Complete info, alternating moves Goal: Last move A Brief Introduction to Game Theory 3/39

Why study games? Systems design Decomposition into parts with limited interactions Complexity Theory Management Determine area to focus energy / resources Artificial Intelligence testing grounds People want to understand the things that people like to do, and people like to play games Berlekamp & Wolfe A Brief Introduction to Game Theory 4/39

Combinatorial Game Theory History Early Play Egyptian wall painting of Senat (c. 3000 BC) Theory C. L. Bouton s analysis of Nim [1902] Sprague [1936] and Grundy [1939] Impartial games and Nim Knuth Surreal Numbers [1974] Conway On Numbers and Games [1976] Prof. Elwyn Berlekamp (UCB), Conway, & Guy Winning Ways [1982] A Brief Introduction to Game Theory 5/39

What is a combinatorial game? Two players (Left & Right) move alternately No chance, such as dice or shuffled cards Both players have perfect information No hidden information, as in Stratego & Magic The game is finite it must eventually end There are no draws or ties Normal Play: Last to move wins! A Brief Introduction to Game Theory 6/39

What games are out, what are in? Out In All card games All dice games Nim, Domineering, Dots-and-Boxes, Go, etc. In, but not normal play Chess, Checkers, Othello, Tic-Tac-Toe, etc. A Brief Introduction to Game Theory 7/39

Combinatorial Game Theory The Big Picture Whose turn is not part of the game SUMS of games You play games G 1 + G 2 + G 3 + You decide which game is most important You want the last move (in normal play) Analogy: Eating with a friend, want the last bite A Brief Introduction to Game Theory 8/39

Classification of Games Impartial Same moves available to each player Partisan The two players have different options Example: Nim Example: Domineering A Brief Introduction to Game Theory 9/39

Nim : The Impartial Game pt. I Rules: Several heaps of beans On your turn, select a heap, and remove any positive number of beans from it, maybe all Goal Take the last bean Example w/4 piles: (2,3,5,7) 2 3 5 7 A Brief Introduction to Game Theory 10/39

Nim: The Impartial Game pt. II Dan plays room in (2,3,5,7) Nim Pair up, play (2,3,5,7) Query: First player win or lose? Perfect strategy? Feedback, theories? Every impartial game is equivalent to a (bogus) Nim heap 2 3 5 7 A Brief Introduction to Game Theory 11/39

Nim: The Impartial Game pt. III 01 Binary rep. of heaps 10 2 Nim Sum == XOR 11 3 Winning or losing? Zero == Losing, 2nd P win Winning move? Find MSB in Nim Sum Find heap w/1 in that place Invert all heap s bits from sum to make sum zero 101 111 11 00 A Brief Introduction to Game Theory 12/39 5 7

Domineering: A partisan game Left (blue) Right (Red) Rules (on your turn): Place a domino on the board Left places them North-South Right places them East-West Goal Place the last domino Example game Query: Who wins here? A Brief Introduction to Game Theory 13/39

Domineering: A partisan game = Left (blue) Right (Red) + + + + + Key concepts By moving correctly, you guarantee yourself future moves. For many positions, you want to move, since you can steal moves. This is a hot game. This game decomposes into noninteracting parts, which we separately analyze and bring results together. A Brief Introduction to Game Theory 14/39

What do we want to know about a particular game? What is the value of the game? Who is ahead and by how much? How big is the next move? Does it matter who goes first? What is a winning / drawing strategy? To know a game s value and winning strategy is to have solved the game Can we easily summarize strategy? A Brief Introduction to Game Theory 15/39

Combinatorial Game Theory The Basics I - Game definition A game, G, between two players, Left and Right, is defined as a pair of sets of games: G = {G L G R } G L is the typical Left option (i.e., a position Left can move to), similarly for Right. G L need not have a unique value Thus if G = {a, b, c, d, e, f, }, G L means a or b or c or and G R means d or e or f or... A Brief Introduction to Game Theory 16/39

Combinatorial Game Theory The Basics II - Examples: 0 The simplest game, the Endgame, born day 0 Neither player has a move, the game is over { Ø Ø } = { }, we denote by 0 (a number!) Example of P, previous/second-player win, losing Examples from games we ve seen: Nim Domineering Game Tree A Brief Introduction to Game Theory 17/39

Combinatorial Game Theory The Basics II - Examples: * The next simplest game, * ( Star ), born day 1 First player to move wins { 0 0 } = *, this game is not a number, it s fuzzy! Example of N, a next/first-player win, winning Examples from games we ve seen: Nim Domineering Game Tree 1 A Brief Introduction to Game Theory 18/39

Combinatorial Game Theory The Basics II - Examples: 1 Another simple game, 1, born day 1 Left wins no matter who starts { 0 } = 1, this game is a number Called a Left win. Partisan games only. Examples from games we ve seen: Nim Domineering Game Tree A Brief Introduction to Game Theory 19/39

Combinatorial Game Theory The Basics II - Examples: 1 Similarly, a game, 1, born day 1 Right wins no matter who starts { 0 } = 1, this game is a number. Called a Right win. Partisan games only. Examples from games we ve seen: Nim Domineering Game Tree A Brief Introduction to Game Theory 20/39

Combinatorial Game Theory The Basics II - Examples Calculate value for Domineering game G: Calculate value for Domineering game G: G = = { } = { 1 1 } = ± 1 this is a fuzzy hot value, confused with 0. 1st player wins. Left Right G = = {, } = { 1, 0 1 } = { 0 1 } = {.5 } this is a cold fractional value. Left wins regardless who starts. A Brief Introduction to Game Theory 21/39

Combinatorial Game Theory The Basics III - Outcome classes With normal play, every game belongs to one of four outcome classes (compared to 0): Zero (=) Negative (<) Positive (>) Fuzzy ( ), incomparable, confused Left starts and R has winning strategy and L has winning strategy Right starts and L has winning strategy ZERO G = 0 2nd wins POSITIVE G > 0 L wins and R has winning strategy NEGATIVE G < 0 R wins FUZZY G 0 1st wins A Brief Introduction to Game Theory 22/39

Combinatorial Game Theory The Basics IV - Negatives & Sums Negative of a game: definition G = { G R G L } Similar to switching places with your opponent Impartial games are their own neg., so G = G Examples from games we ve seen: Nim Domineering Game Tree 1 2 1 2 Rotate 90 G G G G A Brief Introduction to Game Theory 23/39 G Flip G

Combinatorial Game Theory The Basics IV - Negatives & Sums Sums of games: definition G + H = {G L + H, G + H L G R + H, G + H R } The player whose turn it is selects one component and makes a move in it. Examples from games we ve seen: G + H = { G L + H, G+H 1 L, G+H 2 L G R + H, G+H R } + = {, +, +, + } A Brief Introduction to Game Theory 24/39

Combinatorial Game Theory The Basics IV - Negatives & Sums G + 0 = G The Endgame doesn t change a game s value G + ( G) = 0 = 0 means is a zero game, 2nd player can win Examples: 1 + ( 1) = 0 and * + * = 0 Nim Domineering Game Tree 1 * 1 1 1 * * * 1 1 0 A Brief Introduction to Game Theory 25/39

Combinatorial Game Theory The Basics IV - Negatives & Sums G = H If the game G + ( H) = 0, i.e., a 2nd player win Examples from games we ve seen: Is G = H? Is G = H? Play G + ( H) and see if 2nd player win Yes! Left Right Play G + ( H) and see if 2nd player win No... A Brief Introduction to Game Theory 26/39

Combinatorial Game Theory The Basics IV - Negatives & Sums G H (Games form a partially ordered set!) If Left can win the sum G + ( H) going 2nd Examples from games we ve seen: Is G H? Is G H? Play G + ( H) and see if Left wins going 2nd Yes! Left Right Play G + ( H) and see if Left wins going 2nd No... A Brief Introduction to Game Theory 27/39

Combinatorial Game Theory The Basics IV - Negatives & Sums G H (G is incomparable with H) If G + ( H) is with 0, i.e., a 1st player win Examples from games we ve seen: Is G H? Is G H? Play G + ( H) and see if 1st player win No... Left Right Play G + ( H) and see if 1st player win YES! A Brief Introduction to Game Theory 28/39

Combinatorial Game Theory The Basics IV - Values of games What is the value of a fuzzy game? It s neither > 0, < 0 nor = 0, but confused with 0 Its place on the number scale is indeterminate Often represented as a cloud Let s tie the theory all together! -2-1.5-1 -.5 0.5 1 1.5 2 A Brief Introduction to Game Theory 29/39

Combinatorial Game Theory The Basics V - Final thoughts There s much more! More values Up, Down, Tiny, etc. Simplicity, Mex rule Dominating options Reversible moves Number avoidance Temperatures Normal form games Last to move wins, no ties Whose turn not in game Rich mathematics Key: Sums of games Many (most?) games are not normal form! What do we do then? A Brief Introduction to Game Theory 30/39

Computational Game Theory (for non-normal play games) Large games Can theorize strategies, build AI systems to play Can study endgames, smaller version of original Examples: Quick Chess, 9x9 Go, 6x6 Checkers, etc. Small-to-medium games Can have computer solve and teach us strategy GAMESMAN does exactly this A Brief Introduction to Game Theory 31/39

Computational Game Theory Simplify games / value Store turn in position Each position is (for player whose turn it is) Winning ( losing child) Losing (All children winning) Tieing (! losing child, but tieing child) Drawing (can t force a win or be forced to lose) W... W W W T... W W W L T L... W W W D D... W W W W W A Brief Introduction to Game Theory 32/39

GAMESMAN Analysis: TacTix, or 2-D Nim Rules (on your turn): Take as many pieces as you want from any contiguous row / column Goal Take the last piece Query Column = Nim heap? Zero shapes A Brief Introduction to Game Theory 33/39

GAMESMAN Analysis: Tic-Tac-Toe Rules (on your turn): Place your X or O in an empty slot Goal Get 3-in-a-row first in any row/column/diag. Misére is tricky A Brief Introduction to Game Theory 34/39

GAMESMAN Tic-Tac-Toe Visualization Visualization of values Example with Misére Outer rim is position Next levels are values of moves to that position Recursive image Legend: Lose Tie Win A Brief Introduction to Game Theory 35/39

Exciting Game Theory Research at Berkeley Combinatorial Game Theory Workshop MSRI July 24-28th, 2000 1994 Workshop book: Games of No Chance Prof. Elwyn Berlekamp Dots & Boxes, Go endgames Economist s View of Combinatorial Games A Brief Introduction to Game Theory 36/39

Exciting Game Theory Research Chess Kasparov vs. World, Deep Blue II Endgames, tablebases Stiller, Nalimov Combinatorial GT applied Values found [Elkies, 1996] SETI@Home parallel power to build database? Historical analysis... White to move, wins in move 243 with Rd7xNe7 A Brief Introduction to Game Theory 37/39

Exciting Game Theory Research Solving games 4x4x4 Tic-Tac-Toe [Patashnik, 1980] Connect-4 [Allen, 1989; Allis, 1988] Go-Moku [Allis et al., 1993] Nine Men s Morris [Gasser, 1996] One of oldest games boards found c. 1400 BC Checkers almost solved [Schaeffer, 1996] A Brief Introduction to Game Theory 38/39

Summary Combinatorial game theory, learned games Computational game theory, GAMESMAN Reviewed research highlights A Brief Introduction to Game Theory 39/39