SCIT1003 Chapter 2: Sequential games

advertisement
SCIT1003
Chapter 2: Sequential games - perfect
information extensive form

Prof. Tsang
1
Games of Perfect Information
• The information concerning an opponent’s
move is well known in advance. Players have
perfect information of what has happened
every time a decision needs to be made, e.g.
chess.
• All sequential move games are of this type.
• Otherwise, the game is one of imperfect
information.
2
2- Person Sequential Game:
Simple Nim
(Also called the ‘subtraction game’)
Rules
• Two players take turns removing objects from a single
heap or pile of objects.
• On each turn, a player must remove exactly one or two
objects.
• The winner is the one who takes the last object
Demonstration: http://education.jlab.org/nim/index.html
http://en.wikipedia.org/wiki/Nim
3
Simplified Nim: winning strategy (proof)
Lemma: Suppose that Players A and B are playing the Nim
subtraction game where at each move a player can remove
between 1 and c counters, then a player has a winning
strategy if they can play a move that leaves k(c+1) counters.
Proof
We prove this for Player A
(1) Base Case (k=1):
Suppose A leaves c+1 counters, then B has to choose to
remove x:1≤x≤c.
This implies that there are y = c+1-x left, where 1 ≤ y ≤ c.
Then A chooses y and wins.
4
Simplified Nim: proof (2)
(2) Inductive step:
Assume the statement is true for k=n (n≥1).
I.e. if Player A leaves n(c+1) , then player A wins.
Suppose A leaves (n+1)(c+1) counters left, i.e. nc+n+c+1
If B chooses x:1≤x≤c, this leaves nc+n+c+1-x.
Then A chooses c+1-x, leaving n(c+1).
(3) Completion of proof by induction:
Thus if the case k=n is true, then so is the case k=n+1
We have the base case k=1, is true, so the statement is
true for k=2,3,… and so on.
The Lemma is thus proved by induction for all values of k.
5
Another Example: 21-flags game
p.44
•
•
•
•
21 flags are planted in the field
2 teams (players)
Each team moves sequentially and
removes 1, 2 or 3 flags each time (0 is not
allowed)
• The team to take the last flag wins.
6
Game characteristics
• Sequential: linear chain of moves
• Perfect information
• No uncertainty (in probabilistic or strategic
sense)
• Linear chain of reasoning: if I do this he can
does that, then I can respond by …
• Study by drawing a game-tree
• Game will end at some point (finite game)
7
Thinking forward
• At the end, the winning team should leave the
other side 4 flags (why?)
• What should the winning team do before the
end?
• … and before that?
8
Thinking forward to the end
A
-3 (0)
-1 (3)
B
(4)
-2 (2)
Winner: A
-2 (0)
-3 (1)
-1 (0)
9
Thinking forward to before the end
A
-3 (4)
-1 (7)
B
(8)
-2 (6)
Winner: A
-2 (4)
-3 (5)
-1 (4)
10
Reasoning backward
• Whoever (A) moves first will win by removing 1
flag, leaving 20
• If B removes 1, A removes 3, leaving 16
• If B removes 2, A removes 2, leaving 16
• If B removes 3, A removes 1, leaving 16
• Next round
• If B removes 1, A removes 3, leaving 12
• If B removes 2, A removes 2, leaving 12
• If B removes 3, A removes 1, leaving 12
11
Otherwise
• If A removes 3 leaving 18, B removes 2 leaving
16
• If A removes 2 leaving 19, B removes 3 leaving
16
• …
• At the end A will lose the game
12
Extensive form: decision/game tree
-1 (17)
A
-2 (16)
-1 (20)
-1 (18)
A
(21)
-2 (19)B
-3 (18)
-3 (15)
-2 (17)
-3 (16)
13
Rule # 1: Backward reasoning (induction)
• Think forward
• Reason backward
Next Example: Truel
14
A truel is like a duel, except that there are three players.
Each player has a gun and can either fire, or not fire, his
gun at either of the other two players.
Each player’s preferences are:
Being the lone surviver (best payoff = 4),
Survival with another player (the second best = 3),
All players survive (the second worst=2),
The player’s own death (worst case=1).
15
If they have to make their choice simultaneously, what
will they do?
Ans. All of them will fire at either one of the other two
players.
If their choices are made sequentially (A>B>C>A>B>…)
and the game will continue until only one player lift, what
will they do? (assume the probability to hit on target is
100%)
Ans. They will never shoot.
16
17
US Presidential game
Every year, the US Congress passes bill to authorize
expenditures in different areas.
President can sign or veto the bill depends on whether he
likes it or not.
When the Congress and President are controlled by
different parties, there is always a flight over how money
should be spent, e.g. on M (missile defense) or U (urban
renewal).
p.41
18
Which is a better system?
• With Line-item veto (proposed by Ronald
Reagan in 1980s, the president can select the
item he opposes to veto), or
• Without Line-item veto (current system, the
president just veto the entire bill)
19
Presidential game: without Line item veto
p.42
20
Presidential game: with Line item veto
p.42
21
Hong Kong Democratic Reform game
Demo-parties
Accept
No reform 0
Gradual
Central
reform
Government
One-step
reform
Reject
-1
-1
0
1
0
1
-1
-1
1
-1
-1
22
Summary: Ch. 2
• In study a sequential game, it is useful to
analyzing it with a game-tree.
• Think forward – examining all possible endgame situations.
• Reason backward – to figure out the correct
moves (strategy). [backward induction]
23
Discussions
• Is there a first mover advantage in sequential
game?
• Sometimes there is
– Give an example
• Sometimes there is not
– Give an example
• Determine whether order matters in the
following examples:
– Adoption of new technology
– Class presentation of a project
Assignment 2.1
• Analyze the “Century Mark” game described
below and figure out a winning strategy:
– 2 players taking turns
– At each turn each player chooses an integer
between 1 & 10, inclusively, and sum it cumulatively
(initial sum = 0)
– The first player take the cumulative sum greater
than or equal to 100 wins the game.
• Is there a first mover advantage in this game?
25
Assignment 2.2
Assignment 2.3
Download