Combinatorial games Recall: Winning strategies - b

Outline for today
Stat155
Game Theory
Lecture 4: More Combinatorial Games
Impartial combinatorial games
Nim in various disguises
Partisan combinatorial games
Theorem: Someone has a winning strategy.
Examples
Peter Bartlett
Subtraction game
Hex
September 6, 2016
1 / 21
Recall: Combinatorial games
2 / 21
Recall: Winning strategies
A combinatorial game has positions X , legal moves MI , MII ⊂ X × X .
An impartial game: MI = MII .
A partisan game: MI 6= MII .
Theorem
Progressively bounded: For every x0 ∈ X , B(x) < ∞.
(B(x) denotes the maximum number of moves before the game ends.)
In a progressively bounded impartial
combinatorial game under normal
play, X = N ∪ P.
That is, from any initial position, one
of the players has a winning strategy.
A terminal position for a player has no legal move to another position.
x is terminal for player I if there is no y ∈ X with (x, y ) ∈ MI .
N is the set of positions where the Next player to move can
guarantee a win, provided that they play optimally.
P is the set of positions where the other player—the player that
moved Previously—can guarantee a win, provided that they play
optimally.
3 / 21
4 / 21
Key Ideas: Progressively bounded impartial games
Example: Nim
Theorem: Every position is in N (positions where the next player has
a winning strategy) or P (positions where the previous player has a
winning strategy).
P: Every move leads to N.
N: Some move leads to P (hence cannot contain terminal positions).
Positions X = {(n1 , . . . , nk ) : ni ≥ 0}.
Moves = (x, y ) ∈ X 2 : some i has yi < xi , and yj = xj for j 6= i .
Terminal position: 0.
“Normal play”: the player who moves to 0 wins.
5 / 21
Example: Nim
6 / 21
Outline
Bouton’s Theorem
Impartial combinatorial games
A Nim position (x1 , . . . , xk ) is in P iff
the Nim-sum of its components is 0.
Nim in various disguises
Partisan combinatorial games
Theorem: Someone has a winning strategy.
Examples
The Nim-sum of x = (x1 , . . . , xk ) is written x1 ⊕ x2 ⊕ · · · ⊕ xk .
The binary representation of the Nim-sum is the bitwise sum, in
modulo-two arithmetic, of the binary representations of the
components of x.
Subtraction game
Hex
7 / 21
8 / 21
Staircase Nim
Staircase Nim
Progressively bounded. (Why?)
Claim: This game is equivalent to Nim, in the sense that we can
define a mapping φ : X → XNim , such that
P = {x ∈ X : φ(x) ∈ PNim } .
Position: a non-negative pile of chips on each step of a finite staircase.
Moves: transfer at least one chip from a single step to the step below
it.
Terminal positions: every pile of chips is empty, except for the pile on
the bottom step.
For a position x = (x1 , x2 , . . . , xk ) (number of chips on each step),
define φ(x) = (x2 , x4 , . . . , x2bk/2c ) (the number of chips on the even
steps).
(Notice that, unlike the text, we number the steps from 1.)
This allows all of the standard Nim moves (by moving chips from an
even step to the next step down).
It also allows some non-standard moves: a pile can be increased by
moving chips from an odd step to an even step. These moves also
lead to valid Nim positions.
9 / 21
Staircase Nim
Outline
Why is P = {x ∈ X : φ(x) ∈ PNim }?
1
2
3
10 / 21
φ(x) = 0 for x terminal.
Some move from N leads to P:
This is true because all of the standard Nim moves are still available.
Every move from P leads to N:
We need only check that if φ(x) has Nim-sum zero, then any move to
φ(y ) has a non-zero Nim-sum.
We know this is true for a standard Nim move. It is also true when
chips move from an odd step to an even step. (Why?)
11 / 21
Impartial combinatorial games
Nim in various disguises
Partisan combinatorial games
Theorem: Someone has a winning strategy.
Examples
Subtraction game
Hex
12 / 21
Partisan Games
Partisan Subtraction Game
Recall:
Start with 11 chips.
An impartial game has the same set of legal moves for both players:
MI = MII .
Player I can remove either 1 or 4.
A partisan game has different sets of legal moves for the players.
The winner is the player who is the last to remove a chip.
Player II can remove either 2 or 3.
14 / 21
13 / 21
Partisan Subtraction Game
Partisan combinatorial games and winning strategies
We can construct sets:
NI : positions from which Player I, playing next, can force a win.
Theorem
PI : positions from which, if Player I is playing next, the previous
player can force a win.
Consider a progressively bounded partisan
combinatorial game under normal play, with no ties
allowed. From any initial position, one of the players
has a winning strategy.
NII : positions from which Player II, playing next, can force a win.
PII : positions from which, if Player II is playing next, the previous
player can force a win.
Why? See Homework 1.
Here, {1, 2, 4, 5} ⊂ NI , {2, 3, 5} ⊂ NII , {0, 3} ⊂ PI , {0, 1, 4} ⊂ PII .
15 / 21
16 / 21
Partisan Games
Hex
Hex
(Karlin and Peres, 2016)
(Karlin and Peres, 2016)
17 / 21
Partisan Games
18 / 21
Partisan Games
Theorem
Hex
On a symmetric Hex board, the first player has a
winning strategy.
(Karlin and Peres, 2016)
Partisan.
Progressively bounded.
Ties not possible.
(Obvious, but nontrivial to prove. See KP 1.2.2 and 1.2.3)
So someone has a winning strategy!
19 / 21
Assume that the second player has a winning strategy
(i.e., a mapping S from a position to a move)
The first player plays an arbitrary first move mI ,1 .
To play the nth move, the first player calculates the position xn−1 of
the board as if only moves mII ,1 , mI ,2 , . . . , mII ,n−1 were played, and
then plays mI ,n = Srot (x),
where Srot is S with the board rotated 90o and colors switched.
(And if mI ,n is not a legal move because that hexagon has already
been played, choose something else.)
An extra hexagon can only help.
So Player I also has a winning strategy.
But both players cannot have winning strategies.
20 / 21
Outline
Impartial combinatorial games
Nim in various disguises
Partisan combinatorial games
Theorem: Someone has a winning strategy.
Examples
Subtraction game
Hex
21 / 21