peter van emde boas: what is the size of a game ? games and complexity 2011 what is the size of a...

66
Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services B.V. ILLC-FNWI-Univ. of Amsterdam Roger van der Weyden: Last Judgement, Hospices Civils de Beaune, France rences and slides available at: http://staff.science.uva.nl/~peter/teaching/gac11.html

Upload: zoe-young

Post on 12-Jan-2016

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

What is the size of a Game ?

Peter van Emde Boas

Bronstee.com Software & Services B.V.

ILLC-FNWI-Univ. of Amsterdam

Roger van der Weyden: Last Judgement, Hospices Civils de Beaune, France

References and slides available at: http://staff.science.uva.nl/~peter/teaching/gac11.html

Page 2: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Hoe lang is een Chinees ?(How long is a Chinese?)

Hu Liang is een Chinees

Page 3: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Games and Computer Science

• You can design or play (computer) games– but that’s not the purpose of this course

• You can ask questions about games– which may guide you to some interesting Mathematics

• You can answer such questions using a Computer– which is done in a special branch of AI but not in this

course

• You can use Game based models when solving Computer Science Questions– we shall encounter some examples in this course

Page 4: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

© Games Workshop © Games Workshop

URGATOrc Big Boss

THORGRIMDwarf High King

Introducing the Opponents

Games involve strategic interaction ......Games involve strategic interaction ......

Page 5: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

A Game….

X

X

O

Questions: Will the Game terminate ?

Can somone win the Game ?

If So: Who ?

Victorious Warriors win first and then go to War, while defeated Warriors go to War first and then seek to win.

Sun Tzu, the Art of War.

Page 6: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

A Game….

X

X

O

Questions: Will the Game terminate ?Trivially YesCan somone win the Game ?

If So: Who ?

Victorious Warriors win first and then go to War, while defeated Warriors go to War first and then seek to win.

Sun Tzu, the Art of War.

Page 7: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

A Game….

X

X

O

Questions: Will the Game terminate ?Trivially YesCan somone win the Game ?If both play well a draw resultsIf So: Who ?

Victorious Warriors win first and then go to War, while defeated Warriors go to War first and then seek to win.

Sun Tzu, the Art of War.

Page 8: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Another Game

from H.W. Lenstra: Aeternitatem Cogita

Questions: Will the Game terminate ?

Can somone win the Game ?

If So: Who ?

white to move and wins

Page 9: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Another Game

from H.W. Lenstra: Aeternitatem Cogita

Questions: Will the Game terminate ?The rules make it soCan somone win the Game ?Unknown until todayIf So: Who ?

white to move and wins

Page 10: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Ganzenborden• may terminate in an unexpected state

Ghica in pit

Peter in jail

Termination is not guaranteed; all players may be killed by the hunter over and over again.....

There is no strategy in this game; Random moves only

Page 11: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

the game of NIM

Skavenslaves© the Games Workshop

Plague Monks© the Games Workshop

Clanrat Warriors© the Games Workshop

URGAT© the Games Workshop

THORGRIM© the Games Workshop

TURN:1: select a group of prisoners2: feed some of them ( ≥ 1) to the Ogres3: if no prisoners remain you loose

© the Games Workshop

Page 12: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

The game of NIM

Positions are determined by the sizes of the piles( 24, 14, 15 ) in the exampleNim-sum of these numbers in binarydetermines whether position is won or lost

24 = 1 1 0 0 014 = 0 1 1 1 015 = 0 1 1 1 1sum = 1 1 0 0 1

Page 13: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

A Game in Mathematics

Position: a finite list of non-negative numbers:

5, 5, 3, 4, 0, 1, 12

Move: Replace a single number by a finite list of smaller numbers ( 0 only may be removed )

5, 3, 3, 2, 0, 3, 4, 0, 1, 12

Player unable to move looses the game.

Page 14: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about this game in mathematics: Will it terminate ?

Can one of the players win ?

If so: Which Player ?

And what strategy should the winner use ….?

Page 15: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about this game in Mathematics: Will it terminate ?Yes: but to see this requires more advanced set theory(or use a cleverly designed lexicographical order)

Can one of the players win ?Yes: but this game is not covered by Zermelo's theorem

If so: Which Player ?A simple parity argument works here: There must exist anumber with an odd number of occurrences in order to win.

And what strategy should the winner use ….?Use the largest number with an odd number of occurrencesand make the number of occurrences of all numbers even.

Page 16: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

CONWAY’S PERSPECTIVE

© Peter van Emde Boas 19761208 @ SMC, Amsterdam

© Peter van Emde Boas 19761208 @ SMC, Amsterdam © Peter van Emde Boas 19761208 @ SMC, Amsterdam

A Game isa Set.

Page 17: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

A GAME IS A SET

• Pick an element, this is again a set

• Give it to the other player, it is now his turn

• Player looses if there is no element remaining: the empty set represents the (unique) lost game

• Let’s play REALS !

Page 18: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

The game REALS• real r = Dedekind Cut < L,R >• L, R subsets of rationals Q such that .....• rational q is equiv. class of fractions• fraction t/n is ordered pair of integers• integer z is equiv. class of differences• difference a - b is ordered pair of

naturals• natural n = { 0, 1, .... , n-1 } ; 0 = • ordered pair < a,b > = {{a},{a,b}}

Page 19: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Another way of playing multisets

• A position is a finite collection of sets, repetitions allowed (multiset)

• A move consists of– Select one of the sets– Replace this set by a finite collection of

its elements, repetitions allowed

• The player unable to move looses• Why does this game terminate?

Page 20: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Playing Multisets

{ A, A, B, B, B, C , D , E }

( B = { p, p, q, r, r, s, t } )

{ A, A, B, B, p, q, q, s, s, t, C , D , E }

Page 21: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Playing Multisets

Game tree of the multiset game becomes infinite

Tree representing an individual play of the multisetgame is both Finitely Branching (due to the rules)and anti-well founded (due to well foundedness of sets)and therefore Finite on behalf of Königs Lemma

Therefore the multiset game terminates.

Page 22: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Napoleon PatienceTake a deck of cards, and place them randomly in 4 rows of 13 cards each.Next pick the four aces and place them in a random orderat the front of the four rows.This is the initial position.

Subsequently you may move a non-ace card behind itspredecessor, provided there is a gap in the row there(but a row's lenght never should exceed 14).A gap behind a King can't be filled; therefore a positionwhere no move is possible can arise.....You win if you reach a position where all rows are ordered.

Page 23: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Napoleon Patience

Gaps before moving Aces

Gaps during game

Page 24: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about Napoleon Patience: Will the game terminate ?

Is there a player who can win ?

If so, who ?

What strategy should the winner use ….?

Page 25: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about Napoleon Patience: Will the game terminate ?Not at all evident; why can't a position be repeated there is something to prove here.....

Is there a player who can win ?Meaningless question; it's a solitaire game;The question is whether you can always win this game ?

And can you ?With bad luck NO; all Aces may be placed after Kings initially

What strategy should the winner use ….?I have no idea ....

Page 26: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Termination proofAssign to every occurrence of card j directly followingcard j-1 of the same suit a value of 14 - j points.The value of a position is the sum of all points assigned to the 4 * 13 adjacent pairs on the board.

It is not hard to see that every move will strictly increasethe value of a position ( by at least one point )

The desired target position has the maximal value possible( 4 * (12 * 13 / 2) ) = 312 points.

This yields also an upper bound on the number of consecutive moves possible.

Page 27: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

L-game E. de Bono

Popular psychology from the early seventies

The companion book “the five day course ofthinking” introduces the L-game as a training tool

I hate psychology

Therefore:

Let’s kill this game by solving it on a computer.

Project performed in 1976 by: V.W. Gijlswijk, G.A.P. Kindervater, G.J. van Tubergen & J.J.O.O. Wiegerinck

Page 28: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

de Bono’s L-GameBoard: 4 by 4 square

Pieces: Red’s L-piece Green’s L-piece 2 Neutral stones

Source: van Gijlswijk et.al.: Computer Analysis of E. de Bono’s L-GameRep. MI-UvA-76-18

Move: 1) remove your L-piece, and place it somewhere else2) may move one of the neutral stones

Page 29: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

de Bono’s L-GameBoard: 4 by 4 square

Pieces: Red’s L-piece Greens’s L-piece 2 Neutral stones

Source: van Gijlswijk et.al.: Computer Analysis of E. de Bono’s L-GameRep. MI-UvA-76-18

Move: 1) remove your L-piece, and place it somewhere else2) may move one of the neutral stones

Page 30: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

de Bono’s L-GameBoard: 4 by 4 square

Pieces: Red’s L-piece Green’s L-piece 2 Neutral stones

Source: van Gijlswijk et.al.: Computer Analysis of E. de Bono’s L-GameRep. MI-UvA-76-18

Move: 1) remove your L-piece, and place it somewhere else2) may move one of the neutral stones

Page 31: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

de Bono’s L-GameBoard: 4 by 4 square

Pieces: Red’s L-piece Green’s L-piece 2 Neutral stones

Source: van Gijlswijk et.al.: Computer Analysis of E. de Bono’s L-GameRep. MI-UvA-76-18

Move: 1) remove your L-piece, and place it somewhere else2) may move one of the neutral stones

Page 32: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

de Bono’s L-GameBoard: 4 by 4 square

Pieces: Red’s L-piece Green’s L-piece 2 Neutral stones

Source: van Gijlswijk et.al.: Computer Analysis of E. de Bono’s L-GameRep. MI-UvA-76-18

Move: 1) remove your L-piece, and place it somewhere else2) may move one of the neutral stones

Page 33: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Move / Lost position

Complete move for Red

Lost Position for Green Initial position

Page 34: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions on the L-Game: Will the game terminate ?

Can one of the players force to win the game ?

If so: Which Player can win the game ?

And what strategy should he use

Page 35: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions on L-Game: Termination ?No - The game can run in a cycle forever....

Can a player force to win ?In some position yes, but not in the initial position

If so: Which player?The game in the initial position is a draw

Strategy ….?Hard to see; there exists a database for playing this game,printed in the report mentioned below.

Source: van Gijlswijk, J.J.O.O Wiegerinck et.al.: Computer Analysis of E. de Bono’s L-GameRep. MI-UvA-76-18

Page 36: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Lets use a Computer…

In order to answer these questions using a computeryou should tell the computer first what is the game he is supposed to analyse ….

How to represent a Game in a Computer ?

Which leads to the problem of finding good formalmathematical models for Games.

Page 37: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Extensive format: Game Tree

initial position

end position

Red to move

Green to move

end position

Winner explicitly mentionedat terminal positions

R

RG

G

R

GR

Page 38: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Backward Induction

end position

Red to move

Green to move

end position R

RG

G

R

GR

R

R

GG

G

Both players choseeverywhere theiroptimal moveinitial position

Page 39: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Zermelo’s Theorem

Zermelo's Theorem Is based on a sufficient condition for making the Backward Induction Algorithm work:

In a finite two-person game where a draw is impossible one of the two players must have a winning strategy

Originally proposed to solve the Chess Game

Page 40: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

The game of HEX

Page 41: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

The game of HEX

Red and Green alternatively colour one cell usingtheir own color.

The first player connecting both side regions with his color by a continuous path in his color wins thegame

Green is the first to move

Page 42: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

In this position Green wins the game

Page 43: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Green has won the Game…

Page 44: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about HEX: Will the game terminate ?

Is there a player who can win ?

If so, who ?

What strategy should the winner use ….?

Page 45: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Why is a Draw impossible?

Page 46: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about HEX: Will the game terminate ?Trivially; Yes

Is there a player who can win ?Yes; Zermelo's Theorem tells us so, since draws areimpossible

If so, who ?It must be Green (first player); otherwise a contradictionarises (strategy stealing argument).

What strategy should the winner use ….?Still Unknown

Page 47: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Backward induction on Game Graphsstart

RG

Initial labeling:only terminal positionsare labeled. Player unable tomove looses

start

RG

Final labeling:iterative apply BI rulesuntil no new nodes arelabeled. Remaining nodes are Draw D

D

R

G

G

G

R

R

RR

D D

Page 48: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

A Game

© Donald Duck 1999 # 35

Starting with 15 matchesplayers alternatively take1, 2 or 3 matches away untilnone remain. The playerending up with an oddnumber of matches winsthe game

A Game specified by describing A Game specified by describing the rules of the game ....the rules of the game ....

redgreen

Page 49: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Questions about this Game

• What if the number of matches is even?

• Can any of the two players force a win by clever playing?

• How does the winner depend on the number of matches

• Is this dependency periodic? If so WHY?

Page 50: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Analysis of the DD gameExtension used:Red wins if he hasan odd number when thegame terminates.This allows for even n .

Four types of configurations remain:R/E : Red has to play and has an even numberR/O : Red has to play and has an odd numberG/E : Green plays, while Red has an even numberG/O : Green plays, while Red has an odd number

Relevant feature: parity of number of matches collectedso far (not the number itself!)

redgreen

Page 51: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Backward Induction Tablen G / E G / O R / E R / O

18 G G R / 1 R / 217 G R R / 1 G16 G R G R / 315 G G R / 2 R / 314 G G R / 2 R / 113 R G G R / 112 R G R / 3 G11 G G R / 3 R / 210 G G R / 1 R / 2 9 G R R / 1 G 8 G R G R / 3 7 G G R / 2 R / 3 6 G G R / 2 R / 1 5 R G G R / 1 4 R G R / 3 G 3 G G R / 3 R / 2 2 G G R / 1 R / 2 1 G R R / 1 G 0 G R G R

Page 52: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Bi-Matrix Game / Strategic Form

© Games Workshop © Games Workshop© Games Workshop© Games Workshop

© Games Workshop© Games Workshop

Runesmith Dragon SquiggOgre

R

D

O S

1/-1

1/-1

-1/1

-1/1

A Game specified by describing A Game specified by describing the Pay-off Matrix ....the Pay-off Matrix ....

Page 53: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Von Neumann’s Theorem

( )/2 :+ ( )/2+© Games Workshop © Games Workshop© Games Workshop© Games Workshop

© Games Workshop© Games Workshop

R D SO

R

D

O S

1/-1

1/-1

-1/1

-1/1

Mixed Strategy Mixed Strategy Nash EquilibriumNash Equilibrium; ; no player can improve his pay-off by deviation.no player can improve his pay-off by deviation.

Page 54: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

My first encounter with Game Theory

December 1962

Anatol Rapoport

Inventor ofTit for Tat

Page 55: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Strategic (bi-Matrix) Form Games

Players : finite set of agents

Strategies: finite set for each player

Strategy profile: each player chooses a strategy

Pay-off: given the strategy profile each player collects some pay-off value (utility, outcome)

Preference: Each player has a preference order for outcomes

The favoured model for Game theory in Economics

Page 56: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Tosca and the prisoners Dilemma

Page 57: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

WHY WORRY ABOUT MODELS?

Algorithmic problem

Instances

Solutions

InstanceFormat

Question

Instance Size

Algorithm Space/TimeComplexity

The rules of the game called “Complexity Theory”

MachineModel

Page 58: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Format and Input SizeThink about simple games like Tic-Tac-ToeNaive size of the game indicated by measures like:

-- size configuration ( 9 cells possibly with marks)-- depth (duration) game (at most 9 moves)

The full game tree is much larger : ~986410 nodes(Size of the strategic form beyond imagination.....)

What size measure should we use for complexitytheory estimates ??

Page 59: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

The Impact of the FormatThe gap between the experienced size and the size of the game tree is Exponential !

(Another Exponential Gap between the game tree and the strategic form.)

These Gaps are highly relevant for Complexity!

The Challenge: Estimate Complexity of Game Analysis in terms of Wood Measure.

Wood Measure : configuration size & depth

Page 60: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

REASONABLE GAMESFinite Complete Information (Zero Sum)

two player games (probabilistic moves allowed)

Structure: game tree T given by intensional description X, properties like:

is p a legal position ?, is p terminal ? is p initial ?, who must move in p ?,

which moves are allowed in p?what are predecssor positions of p

are simply decidable problems (P-time in X)One can traverse the game tree T in time

proportional to the size of T .....

The game duration must be polynomial in X.X : “Wood Measure”

Page 61: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Extension of this classFinite Complete Information (Zero Sum)

two player games (probabilistic moves allowed)

Structure: game graph G given by intensional description X, properties like:

is p a legal position ?, is p terminal ? is p initial ?, who must move in p ?,

which moves are allowed in p?what are predecssor positions of p

are simply decidable problems (P-time in X)One can search the game graph G in time

proportional to the size of G .....

The game duration must be polynomial in X.X : “Wood Measure”

Page 62: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Decision problems

Termination

(Bi-matrix format: No Problem !Extensive: Reachability Analysis - Graph TraversalNaive: Implicite traversal

Trivial for finite game trees…..

Complexity: proportional / polynomial in the numberof nodes in the game graph.

Page 63: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Decision ProblemsDetermination of winner

(Bi-matrix format: Just read the matrix !)Extensive: Backward Analysis - Graph TraversalNaive: Backward Analysis - Implicite traversal

Complexity: proportional / polynomial in the numberof nodes in the game tree for the tree case.General graph: ~ number of nodes + number of edges

Recursive backward analysis of game tree:Memory size: ~ woodmeasure * duration game

THIS WILL BE THE THEME OF FUTURE CLASSES

Page 64: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

ConclusionsThe Strategic Bi-matrix format is useless for algoritmicgame analysis and irrelevant.

Reasonable games can be exponentially large in theWood measure; Still recursive backward analysis in PSPACE is a possibility.

Reductions can be used to establish correspondingPSPACE lowerbounds; which proves PSPACE completeness

Among the given examples the “Mathematical” game isdeviant: it is infinite (but its analysis is trivial….)

Page 65: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

Choice of model depends on perspective:What aspect of games do you want to model/investigate ??

E.G., the Strategic Form is OK if your interest is thestudy of solution concepts in Game Theory....

How Large is a Game

Exponential gaps between the sizes of the different models are a fact of life

“how large” thus becomes a game, like other partsof mathematics …..

Page 66: Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011 What is the size of a Game ? Peter van Emde Boas Bronstee.com Software & Services

Peter van Emde Boas: What is the size of a game ? Games and Complexity 2011

GAME OVER

© Morris & Goscinny