## Saturday, November 17, 2012

### Game Theory: The Prisoner's Dilemma

A couple months ago, I posted several times about the fascinating aspects of game theory, which is the mathematics of games. However, the strategies that we played are formally referred to as spiteful; we won by forcing the opponent to lose. In this post, I will bring up a counterargument that brings up a case where playing spitefully will cost you the game.

This is probably the most classic game theory example: The Prisoner's Dilemma. To put it simply, two prisoners are getting charged for a crime that they most likely did together, but the police aren't sure. So, they set up a deal where they question each suspect privately, and they can choose to cooperate (admit to committing the crime) or defect (claim they did not commit the crime). The punishments are as follows:

If one prisoner cooperates and the other defects, the cooperator is let free while the defector must spend thirty years in prison.

If both prisoners defect, the police don't want to risk wasting the lives of two innocent men, so give them each an eighteen month sentence.

If both prisoners cooperate, they will be punished for their crime with a ten year sentence.

If we were to draw a matrix to represent the prisoners' payoffs, it would resemble this:

CooperateDefect
Cooperate             -10, -10             0, -30
Defect       -30, 0     -1.5, -1.5

The dominant strategy is clearly to cooperate, with -10 and 0 as your payoffs verses -30 and -1.5 as your payoffs. Defecting seems to be insane.

Try playing this game with a friend repeatedly, and you will find that you both are cooperating every time, leading to a rough sentence for each of you. However, wouldn't you both be better off by both defecting?

Let's say there is a point where you stop playing, maybe twenty times. On the last one, you can get away with cooperating and your accomplice will have just earned himself a thirty year sentence. You just won the game. But maybe your friend thinks the same strategy, so you decide to betray him in the nineteenth game. And it goes on and on until you are cooperating from turn one.

There are a few strategies that seem to work well, which I will list below:

Strategy One: Defect until your friend betrays you

This strategy is the simplest of these three, and is by far the most spiteful. You start by defecting, and expect your friend to do the same. However, the moment he cooperates with the police, start betraying him. Never forgive him, as he deserves this punishment. It is hurting your payoff, but is hurting his even more.

Strategy Two: Do whatever your friend's most recent move was

This strategy is known as "Tit for Tat," which is supposed to come from this for that. Your first move is a defection, and from then on, do whatever your friend did the last turn. If he cooperates in turn two, you cooperate in turn three. This will never make you win, but you will always be extremely close, and if you were in a situation where everyone played their strategy against ten other people, you would come close to winning.

It is effective because of three main reasons (four are generally presented, but I lumped two together since they are closely related):

Niceness/Non-Competitiveness - You are starting by defecting, and it isn't striving to beat out your friend. You won't betray them at the end either, which leads to a mutual trust. As I said earlier, you can't win, so people will be happy to play against you.

Retaliation - If someone decides to betray you, you won't let it slide. You will punish them by cooperating the next turn, which will lose them points as well. In a big competition, they will not like this.

Forgiveness - After you punish your accomplice, you are back on good terms very quickly. If they are willing to regain your friendship, you are happy to start defecting with them.

Tit for Tat is personally my favorite strategy, but some people feel it is still too mean. If you are playing someone who is also doing Tit for Tat, but breaks his strategy to get a few extra points, you are going to be punishing each other each turn for the punishment they gave you. It is then impossible to forgive each other.

Strategy Three: Always defect unless your friend crosses the line

Personally, I think this strategy is too nice. You will always defect except for these four situations:

1. Your accomplice cooperates on the first turn. Immediately switch to tit for tat.
2. Your accomplice cooperates twice in three turns. Switch to tit for tat.
3. Your accomplice cooperates three times in twenty turns. Switch to tit for tat.
4. Your accomplice cooperates five times in one hundred turns. Switch to tit for tat.

It is easier to forgive your accomplice, and will eventually retaliate. However, I think the retaliation is a little to nice. Nonetheless, they are all great strategies that you won't find in your everyday game.

#### 1 comment:

1. Informative Blog. i liked it very much!
cool math 4 kids