the row player selects a row, e.g., i, and, at the same time,
the column player selects a column, j,
after which
the column player pays G(i,j) units to the row player,
with the understanding that if G(i,j)<0 then the
row player pays -G(i,j) units to the column player
R S P
R 0 1 -1
S -1 0 1
P 1 -1 0
0 1 -1
G = -1 0 1
1 -1 0
x1 &ge 0, x2 &ge 0, x3 &ge 0, and x1+x2+x3=1.
Sn = Stochastic n-vectors
xTGy is the average payoff (to the row player) per round.
min xTGy yÎSn
xTG = [x3-x2 x1-x3 x2-x1]
p = [0 1 0]T
min xTGy = xTGp = min xTG = min GTx yÎSn
Hence, the optimal row strategy is achieved by solving
max min GTx xÎSm
max z
(LPr) z*ones(n,1)-GTx &le 0
xÎSm
rsprow
Optimization terminated.
Best RSP row strategy
0.3333
0.3333
0.3333
Average payoff
0
diary
You are pleased that it gave the expected answer, but look forward to
the unexpected.
We note that a given column stategy y is assured of losing no more than
max xTGy xÎSm
max xTGy = max Gy xÎSm
min max Gy yÎSn
min z
(LPc) Gy - z*ones(m,1) &le 0
yÎSn
rspcol
Optimization terminated.
Best RSP column strategy
0.3333
0.3333
0.3333
Average payout
0
diary
And so indeed, the two optimal strategies coincide, and the maximal
row payoff is precisely the minimum column payout. The
MiniMax Theorem: min max xTGy = max min xTGy
yÎSn xÎSm xÎSm yÎSn
In preparation for the week's assignment let us move beyond the simple RSP game.
hide 1, guess 1
hide 1, guess 2
hide 2, guess 1
hide 2, guess 2
0 2 -3 0
-2 0 0 3
G = 3 0 0 -4
0 -3 4 0
morra
Optimization terminated.
Best Morra row strategy
0
0.6000
0.4000
0
Average payoff
0
Optimization terminated.
Best Morra column strategy
0
0.6000
0.4000
0
Average payout
0
diary
Hence, the game is fair and a best strategy is to play (hide 1,guess 2)
with probability 3/5 and (hide 2, guess 1) with probability 2/5.
We see that it is best is to suppose that your opponent's cache is
opposite of yours.
We now introduce a slight twist, stemming from the row player's modesty. You see, he is a bit uncomfortable bleating out his guess (as required) at exactly the same moment as his lovely opponent, and so offers that she be allowed to speak first. She considers his polite offer and reasons that as her guess bears no relation to the number of tokens she herself has hidden that the game remains fair. Let us see.
While her pure strategies remain unchanged, he now has, in addition, the option to
hide 1, echo her guess hide 1, counter her guess hide 2, echo her guess hide 2, counter her guess
0 2 -3 0
-2 0 0 3
G = 3 0 0 -4
0 -3 4 0
0 0 -3 3
-2 2 0 0
3 -3 0 0
0 0 4 -4
morrap
Optimization terminated.
Best Polite Morra row strategy
0
0.5657
0.4040
0
0
0.0202
0
0.0101
Average payoff
0.0404
Optimization terminated.
Best polite Morra column strategy
0.2828
0.3030
0.2121
0.2020
Average payout
0.0404
diary
we see that it pays to be a gentleman!
In particular, he gains (and she loses) 4/99 on average per round.
He does this by countering her guess about three percent of the time.
He never echoes her guess. Although linprog has generated a new
best strategy for her, it will, in fact do no better than if she had
stuck with her old one.