Last time we introduced mixed strategies, and generalized the idea of Nash equilibrium to mixed strategies. Now let’s look at an example.
In the game of matching pennies, each player has a penny and must secretly turn the penny to either heads or tails. They then reveal their choices simultaneously. If the pennies match—both heads or both tails—player A keeps both pennies, so he wins one from player B. If the pennies do not match—one heads and one tails—B keeps both pennies, so she wins one from A.
Let’s write this game in normal form! If the pennies match, A wins one penny and B loses one, so their payoffs are (1,-1). If they pennies don’t match, A loses one and B wins one, so their payoffs are (-1,1). If we say
• choice 1 is heads
• choice 2 is tails
then the normal form looks like this:
We can also break this into two matrices in the usual way, one showing the payoff for A:
and one showing the payoff for B:
If you examine this game, it’s easy to see no pure strategy is a Nash equilibrium. If A chooses heads, B will want to choose tails. But if B chooses tails, A will want to choose tails. And if A chooses tails, B will want to choose heads. And if B chooses heads, A will want to choose heads! There’s always someone who would do better by changing their choice. It’s a lot like rock, paper, scissors.
However, there is a Nash equilibrium if we allow mixed strategies, where the players can randomly make their choice according to a certain probability distribution.
Let’s see if we can guess where this Nash equilibrium is. If you were player A, can you guess what you should do? Should you choose heads 90% of the time? 80% of the time? 70% of the time?
A student says: “50% of the time.”
Yes, that seems right. After all, if player A chooses heads most of the time, player B can win most of the time by always choosing tails! And if player A chooses tails most of the time, B can win most of the time by always choosing heads! The only way out is for player A to choose heads with probability 1/2.
But what about player B? What should player B do?
A student says: “She should also choose heads 50% of the time.”
Yes, that makes sense too—for the same sort of reason.
So, let’s see if these mixed strategies give a Nash equilibrium. Remember that we write
for A’s mixed strategy. is the probability that A makes choice 1: that is, chooses heads. is the probability that A makes choice 2: that is, chooses tails. So, what are we guessing here?
The students say:
Okay, that’s A’s mixed strategy. And what about B’s mixed strategy?
The students say:
Okay, now lets see if these are really a Nash equilibrium! Remember the definition from last time:
Definition. Given a 2-player normal form game, a pair of mixed strategies one for player A and one for player B, is a Nash equilibrium if:
1) For all mixed strategies for player A,
2) For all mixed strategies for player B,
We want to check this for our and This looks hard, because we have to check part 1) for all and part 2) for all But sometimes it’s easy, and I’ve picked a game where it’s easy.
Why is it easy? Well, first consider part 1). For this we need to show
To show this, let’s start by computing
Hey! It’s the zero vector, a list of all zeros! We write this simply as 0. So, we’re trying to show
but of course this is true, because both sides equal the number zero!
What’s going on here? The point is that if B uses mixed strategy A’s expected payoff is zero no matter what mixed strategy A uses! If A uses any mixed strategy the expected value of his payoff is always since
Now let’s check part 2). This should be similar. Now we need to show that for any mixed strategy
Hey, this is actually a bit different! Before we could use to get the job done. But now we see showing up, and is any mixed strategy, so we can’t calculate this! What do we do?
We need to use the power of math!
We need to use a fact about matrices and dot products! For any vectors and and any matrix we have
Here is the transpose of the matrix that is, the matrix we get by switching rows and columns:
Here’s the formula for the transpose:
Someday when I’ll in a bad mood I’ll make you prove in your homework.
Anyway, applying this equation to the matrix we can take part 2):
and rewrite it like this:
Notice that shows up on both sides now. So, we should start by computing this! We have
so taking the transpose doesn’t actually do anything in this particular case:
and we get:
Hey! It’s the zero vector again! You should have guessed that was coming. So, the thing we’re trying to show:
simply boils down to
which is true because both sides are zero.
Yay, we’re done! We found a Nash equilibrium! And the point of our last little calculation is that if A uses mixed strategy B’s expected payoff is zero no matter what mixed strategy B uses. This is just the mirror image of what we saw before: if B uses mixed strategy A’s expected payoff is zero no matter what mixed strategy A uses.
So, when both A and B are choosing heads or tails with 50% probabilities, independently, either one can unilaterally change their mixed strategy without improving their expected payoff. That’s a Nash equilibrium for you!
The coin-matching game
Just for fun, let me warn you about a scam that involves matching pennies. I’ll quote this article:
• Coin-matching game, Wikipedia.
A coin-matching game (also a coin smack or smack game) is a confidence trick in which two con artists set up one victim.
The first con artist strikes up a conversation with the victim, usually while waiting somewhere. The con artist suggests matching pennies (or other coins) to pass the time. The second con artist arrives and joins in, but soon leaves for a moment. The first con artist then suggests cheating. The victim, thinking they are going to scam the second con artist, agrees to match coins each time.
When the second con artist returns and begins losing, he accuses the two of cheating and threatens to call the police. The first con artist offers a sizable sum of hush money, and the victim pitches in. After the victim leaves, the two con artists split up the money extorted from the victim.
So, watch out if someone suggests playing ‘matching pennies’ with you! It could be legit, but if a second person joins in and starts placing bets on the two of you, it’s probably a coin smack!
For more con games, see:
I’m not trying to teach you how to con people! I’m trying to help you defend yourself. Of course the best way to avoid scams is a generally cautious, skeptical attitude, especially in any situation where someone seems to be helping you get money or get around the law. And don’t forget: successful con artists don’t usually look suspicious, like this:
They look and act trustworthy. As the saying goes:
The most important thing is sincerity. If you can fake that, you’ve got it made.