game of chaos: 35e nederlands mathematisch congres utrecht; 19990408 the game of chaos peter

22
Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408 The Game of Chaos Peter van Emde Boas ILLC-WINS-UvA Plantage Muidergracht 24 1018 TV Amsterdam [email protected] Evert van Emde Boas Lord Trevor Productions Franz Lisztlaan 5 2102 CJ Heemstede 35e Nederlands Mathematisch Congres Utrecht 19990408 © Wizards of the Coast, inc.

Post on 21-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

The Game of Chaos

Peter van Emde BoasILLC-WINS-UvA

Plantage Muidergracht 241018 TV [email protected]

Evert van Emde BoasLord Trevor Productions

Franz Lisztlaan 52102 CJ Heemstede

35e Nederlands Mathematisch CongresUtrecht 19990408

© Wizards of the Coast, inc.

Page 2: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

The Game of ChaosSorry: it is a French CardGame of ChaosSorcery

Play head or tails against atarget opponent. The looserof the game looses one life.The winner of the game gainsone life, and may choose torepeat the procedure. For everyrepetition the ante in life isdoubled.© Wizards of the Coast, inc.

Page 3: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Magic; the GatheringCustomizable card game: build a deck using a very large collectionof available cards.Both players start out with 20 lives. Number of lives ≤ 0 means you have lost the duel.Move = playing land, casting a spell, combat, ....Attack: summoning creatures, damaging spells, damaging effectsDefense: Blocking attacking creatures, protecting spells and effectsSpells require Mana obtained by tapping lands or activating otherMana sources. Mana exists in 5 colors and a generic variant.Spells exist in the same 5 colors or a generic variant (artifacts)

For almost every rule in the game there exists a card creating an exception against it when successfully cast.....

Page 4: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Game Trees

Root

Thorgrim’s turn

Urgat’s turn

Terminal node

Non Zero-Sum Game:Payoffs explicitly designated at terminal node

2 / 0

5 / -71 / 4

-1 / 4

3 / 1

-3 / 21 / -1

Page 5: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Backward Induction

2 / 0

5 / -71 / 4

-1 / 4

3 / 1

-3 / 21 / -12 / 0

3 / 1

1 / 4-3 / 2

1 / 4

At terminal nodes: Pay-off as explicitly given

At Thorgrim’s nodes: Pay-off inherited from Thorgrim’s optimal choice

At Urgat’s nodes: Pay-off inherited from Urgat’s optimal choice

For strictly competitive games this is the Max-Min rule

T

TU

U

T

UT T

T

UU

U

Page 6: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

CHANCE MOVES

• Chance moves controlled by another player (Nature) who is not interested in the result

• Nature is bound to choose his moves fairly with respect to commonly known probabilities

• Resulting outcomes for active players become lotteries

Page 7: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Lotteries

priceprob.

$31/3

$121/6

-$21/2

Expectation:1/2 . -2 + 1/6 . 12 + 1/3 . 3 = 2

Page 8: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Compound Lottery

priceprob.

$31/3

$121/6

-$21/2

$31/2

-$21/2

1/5 4/5

priceprob.

$37/15

$121/30

-$21/2

In compound lotteries all drawings are assumed to be independent

Page 9: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Flipping a coin

HEADS TAILS

1 / -1 -1/ 1 -1 / 1 1 / -1

h ht t1/21/2 1/21/2

Expectation 0 / 0 0 / 0

Thorgrim calls head or tails and Urgat flips the coin. Urgat’s move is irrelevant. Nature determines the outcome.

Page 10: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

The Game Tree

0

1 -1

3 -31-1

7 -1 3 -5 5 -3 1 -7

7 -9 11 -5 5 -11 9 -7

33 / -3

1/2 1/2

Denotes

X

Y

Y

XThorgrim and Urgat bothstart with 5 lives

Page 11: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

WHY UTILITY FUNCTIONS?

• Backward Induction is based on preferences rather than numbers

• Numbers as a tool for expressing preferences works OK when chance moves are absent

• We like to compute expected pay-off at chance nodes.

• Expected pay-off is sensitive to scaling• Comparing complex lotteries is non-trivial

Page 12: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Comparing Complex LotteriesAllais Example

0 1 00.01 0.89 0.10

0.89 0.11 00.9 0 0.1

$0M $1M $5M $0M $1M $5M

$0M $1M $5M $0M $1M $5M

??

??

Page 13: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Von Neumann-Morgenstern Utility

Rational Players may be assumed to maximize theexpectation of Something.

Let’s call this Something Utility.

Works nice for 2-outcome Lotteries: Something = chance of winning.

So let’s reduce the n-outcome Lotteries to 2-outcomeCompound Lotteries:

Each intermediate outcome is “equivalent” to a suitable 2-outcome Lottery. The involved chance

determines the Utility.

Page 14: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Utility Intermediate Outcome

W L

p 1-ppp :=

u(L) = au(W) = bu(D) = x

a < bD

Lot-1 Lot-3

EELot-1( u ) = p.b + (1-p).a EELot-3( u ) = x

If p is large (almost 1) : Lot-1 > Lot-3For p small (almost 0) : Lot-1 < Lot-3

So for some intermediate p, say q: Lot-1 ≈ Lot-3

qq ≈ Lot-3 whence u(D) = q.b + (1-q).a !

Page 15: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Utility Lottery = Expected Utility Outcomes

p1 pn

1 ni

pi p1 pnpi

W L

qi 1-qi

W L

piqi 1- piqi

u(W) = 1 , u(L) = 0 , u(i) = qi

piqi = u(Lot-3) = piu( i ) = EE Lot-1 u(outcome)

Lot-1 Lot-2 Lot-3

Page 16: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Game of Chaos3

3 / -31/2 1/2

Denotes

X

Y

Y

X

Structure of the game tree independent of the choice of the utilities.

uT,1: uT,1(n) = nuT,2: uT,2(n) = if n ≥ vopp then 1 elif n ≤ - vself then -1 else 0 fi

uU,1: uU,1(n) = -nuU,2: u U,2(n) = if n ≥ vself then - 1 elif n ≤ - vopp then 1 else 0 fi

© Wizards of the Coast, inc.

Page 17: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Linear Utilities0/0

-1/11/-1

3/-3

7/-7

7/-7

-1/1 1/-1 -3/3

-3/3-1/1

-9/9

3/-3

11/-11

5/-5

5/-5

1/-1-7/7

-7/7-11/11 9/-9

-5/5

-5/5

Both Thorgrim and Urgat use utility u1

Thorgrim and Urgat bothstart with 5 lives

Page 18: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Go for the Kill!0

1 -1

3 -31-1

7 -1 3 -5 5 -3 1 -7

7 -9 11 -5 5 -11 9 -7

1/-1

1/-11/-1 1/-1 1/-1

1/-10/0

0/0

0/0

0/0

0/0 0/0 0/0

.5/-.5 .5/-.5-.5/.5 -.5/.5

-1/1 -1/1 -1/1 -1/1

-1/1 -1/1

Both Thorgrim and Urgat use utility u2

Thorgrim and Urgat bothstart with 5 lives

Page 19: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Mixed Utilities0

1 -1

3 -31-1

7 -1 3 -5 5 -3 1 -7

7 -9 11 -5 5 -11 9 -7

1/-7

1/-111/-7 1/-5 1/-9

1/-50/1

0/-1

0/0

0/1

0/-3 0/3 0/-1

.5/-3 .5/-1-.5/1 -.5/3

-1/9 -1/5 -1/11 -1/7

-1/5 -1/7

Thorgrim uses u2 ; Urgat uses u1

Thorgrim and Urgat bothstart with 5 lives

Page 20: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Winning is all0

1 -1

3 -31-1

7 -1 3 -5 5 -3 1 -7

7 -9 11 -5 5 -11 9 -7

1/0

1/01/0 1/0 1/0

1/0.5/.5

.75/.25 .75/.25.25/.75 .25/.75

0/1 0/1 0/1 0/1

0/1 0/1

Utilities: Thorgrim uses u3,T: u3.T(n) = if n ≥ vopp then 1 else 0 fi Urgat uses u3,U: u3.U(n) = if - n ≥ vopp then 1 else 0 fi

.5/.5.5/.5

.5/.5

.5/.5 .5/.5

.5/.5Thorgrim and Urgat bothstart with 5 lives

Page 21: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Unequal Start0

1 -1

3 -31-1

7 -1 3 -5 5 -3 1 -7

7 -9 11 -5 5 -11 9 -7

1/-1

1/-1

1/-1

1/-1 1/-1

1/-10/0

.25/-.25 0/0

0/0

0/0 0/0

.5/-.5 .5/-.5

-.5/.5

-.5/.5

-1/1

-1/1 -1/1

-1/1

Thorgrim: 6 livesUrgat: 4 livesutilities used u2

3 -13

-2111 17 -13

-1/1-1/1

1/-1

1/-1

-1/1

0/0

.5/-.5

0/0

.125/-.125

Page 22: Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408   The Game of Chaos Peter

Game of Chaos: 35e Nederlands Mathematisch Congres Utrecht; 19990408

Thorgrim’s last stand

0

1

-1

3 -1

7 -1

Thorgrim: 1 liveUrgat: 6 lives

Utilities: Thorgrim uses u3: u3(n) = if n ≥ vopp then 1 else 0 fi Urgat uses u2

1/-1 0/1

.5/00/1

0/1.25/.5

.125/.75