Model 6: The Card Game

Download Report

Transcript Model 6: The Card Game

Brian Duddy
Two players, X and Y, are playing a card gamegoal is to find optimal strategy for X
 X has red ace (A), black ace (A), and red two (2)
 Y has red ace (A), black ace (A), black two (2)
 On each turn, each player turns over one card
 If both cards are the same color, X wins value of
his card (1 for ace); if they are different, Y wins
value of his card, except if both players play 2,
neither player wins anything

Y
X
A
A
2
A
+1
-1
+2
A
-1
+1
-1
2
-2
+1
0
Positive numbers: units won by X (colors match)
Negative numbers: units won by Y (colors do not match)
From what was given in the model, I found
2 possible sets of rules for the game.
 The game lasts an indefinite number of
turns; on each turn, either player can play
any of their cards. (Game 1)
 The game lasts 3 turns; players can not
play the same card twice. (Game 2)
These two games have very different
strategies!
What is the optimal strategy for this game?
It depends!
Depending on the strategy of your opponent (Y), the optimal
strategy can differ dramatically!
For example, if Y was very greedy, and thus played his or her black 2 often,
your optimal strategy would involve playing your black ace
Y
more often than it otherwise might.
On a basic level, Y will either play essentially randomly or
at least attempt to play intelligently, and this makes a
X
big difference.
A
A
2
A
+1
-1
-2
A
-1
+1
+1
2
+2
-1
0
If Y plays truly randomly (i.e. he plays each of his cards 1/3 of the
time), it is possible to calculate, on average, how much X will gain
or lose for each card he plays-this can be done by multiplying the
gain or loss of each possible outcome by how often it will appear
(which in this case is always 1/3)
Red A: 1(1/3)-1(1/3)-2(1/3) = -2/3 dollars
Black A: -1(1/3)+1(1/3)+1(1/3) = +1/3 dollars
Red 2: 2(1/3)-1(1/3)+0(1/3) = +1/3 dollars
Therefore, X can play his black ace and red 2 in any combination and
gain, on average, 1/3 dollars per turn
However...
If Y does not play truly randomly (few humans do!),
this may not work; for example, if X always plays
the black ace, eventually Y will start playing his red
ace. Therefore, if playing against a real person who
seems to play semi-randomly, X should vary his
choices between the two cards and try not to fall
into a pattern Y will notice.
Y
X
A
A
2
A
+1
-1
-2
A
-1
+1
+1
2
+2
-1
0
If Y is an intelligent player (and he knows that X is as well), he will
likely deduce that there’s no reason for X to play his red ace. Why?
The red 2 can always do better or the same; i.e., it dominates the
red ace.
 If Y plays a red ace, X’s red 2 will win 2 units instead of just 1.
 If Y plays a black ace, X’s red ace and 2 both lose 1 unit.
 If Y plays a black 2, X’s red ace loses two and his red 2 loses none!
Now, Y’s red 2 is dominated by his red ace, because he knows X
should never play the red ace.
We now have a simpler grid, as each player only has 2
real possibilities (and they will never gain by switching
to the other. However, it is impossible to determine an
optimal strategy for X without knowing what Y’s is. At this
point X should use psychology; maybe Y will more often
play his/her black ace, to avoid losing 2. Any specific
pattern will be exploited by an intelligent human
opponent, so some randomness must come into play.
Y
X
A
A
2
A
+1
-1
-2
A
-1
+1
+1
2
+2
-1
0
 Because
each player only has 3 cards,
this game only lasts 3 turns. Also, the
strategies are obviously different
because each move affects the next
moves, and on the 2nd and 3rd moves of
the game, there are less choices.
Y
Again, what X should do depends
very much on what Y’s strategy is.

X
A
A
2
A
+1
-1
-2
A
-1
+1
+1
2
+2
-1
0

Assuming Y has an equal chance of playing any
of his cards, we can again find the expected
payout for any particular strategy of X. Let’s
assume he starts by playing his red ace.
If Y responds with his own red ace, X gains one unit. Now, on the second turn,
X has a choice of two cards: black ace and red two.
Finally,
If
Y
X instead
plays
if Xhis
plays
responds
black
red
2
his
and
ace
red
with
Yand
2plays
aand
Yblack
again
Ya plays
black
2,responds
X still
the
ace,black
gains
Y with
2,
1; X
rd
another
on
gains
will
the
end
one;
final
black
upon
turn
with
the
ace,
X
a3total
will
X turn
gains
lose
of X
+2.
1;
one,
will
on
Again,
have
making
the final
ifthe
Y is
for
black
turn
playing
a net
they
bothand
gain
ace
randomly,
of
must
1Yfor
the
X
play
will
X.black
The
their
gain
average
2.
21.5
X
and
will
units
there
gain,
gain
onisa
then,
average
no
total
gain
for
of with
X
1.
for this
either. Therefore,
playing
strategy.
the red ace
X is
will
1.5.
gain a total of 2.
Eight more cases of this type have to be considered!
Y
X
A
A
2
A
+1
-1
-2
A
-1
+1
+1
2
+2
-1
0

After all of that analysis, the final result…
No matter X’s strategy, if Y plays
randomly, the game is, on
average, a draw!
Expected value after 3 moves
Y’s first play
X’s first play
A
A
2
Total
A
+1.5
0
-1.5
0
A
-2
+0.
5
+1.
5
0
-1.5
0
0
2
+1.5
Y
X
A
A
2
A
+1
-1
-2
A
-1
+1
+1
2
+2
-1
0
 Let’s
look at that chart again… but this
time, from the point of view of Y, assuming
Y’s first play
X is playing randomly.
X’s first play
Unlike X, Y does have a difference
in his choices; his black ace, if
played first, will on average win him
1/3 dollar per game, and his red
ace will lose him 1/3 dollar per
game.
A
A
2
A
+1.5
0
-1.5
A
-2
+0.5
+1.5
2
+1.5
-1.5
0
Total
+1
-1
0
(Remember that + indicates scores for X and
– indicates scores for Y!)

An intelligent Y might then be expected to play his black
ace first more often; if this is true, X should counter with his
own black ace to maximize the expected value. However, Y
might figure out X’s strategy and begin leading with his red
ace, which gives him a large advantage. Again, there is no
mathematical formula for what X should do; only analyzing
the opponent and his play style will allow X to make money
in the long term.
Y’s first play
X’s first play
Note: In all cases, for both X and Y, the
selection of the second card is a “wash”neither card is better then the other.
Psychology might again come into play,
but both players need to remember that
the third card needs to be played as well!
A
A
2
A
+1.5
0
-1.5
A
-2
+0.5
+1.5
2
+1.5
-1.5
0
-1
0
Total +1
(Remember that + indicates scores for X and
– indicates scores for Y!)
 If
the game is played an indefinite number
of times, X should play only his black ace or
red 2 and try to avoid playing them in a
specific pattern
 If cards cannot be played more then once, X
should probably start with his black ace
most of the time, but he should make sure Y
does not catch on to this strategy
 In either case, if a human opponent is being
played against, no specific strategy is
always the best; the opponent’s own strategy
and psychology must be taken into account