*This blog is part of a series related to Gov 1372: Political Psychology, a course at Harvard University taught by Professor Ryan D. Enos*.

There are many different strategies for cooperation. In this blog post, I will be exploring different types of strategies for cooperation from Axelrod (2006) with simulations of the Prisoner’s dilemma game.

# My Game

In my game, just like Axelrod (2006), I pit different strategies in Prisoner’s dilemma games against each other so that each strategy plays one other. To replicate playing repeated games, each match-up is run with 100 rounds per game and 100 simulations of each game. I chose six strategies from a list of ~20: *titfortat*, *handshaker*, *winStayer*, *inverser*, *cycler*, and *thuemorser*. These six were selected randomly using a random number generator, labeling each strategy on the list with a random number. After collecting the results, I present my findings with a table and plot below.

**Strategy Rules**

**titfortat**

1. Cooperates the first time it plays a new opponent.

2. Mirrors the last move of each opponent in subsequent encounters.

**handshaker**

1. Cooperates the first time it plays a new opponent.

2. Defects the second time it plays the same opponent.

3. If opponent matches its first 2 moves, cooperates forever. If not, defects forever.

**winStayer**

1. Cooperates the first time it plays a new opponent.

2. Changes behavior every time it doesn’t beat its opponent in the previous round.

**inverser**

1. Cooperates the first time it plays a new opponent.

2. Defects with a probability that diminishes relative to how long ago the opponent last defected.

**cycler**

1. Cooperates 3 times in a row, then defect once.

2. Repeats sequence until the end of the tournament.

**thuemorser**

1. Cooperates or defects according to the Thue-Morse sequence (binary sequence obtained by starting with 0 and successively appending the Boolean complement of the sequence obtained thus far: 0, 01, 0110, 01101001, 0110100110010110, etc.).

# Findings

Based on the total number of wins (not including ties), the handshaker and winStayer strategies tied for first place with 4 wins each. cycler and inverser both came in last with only 1 win each. I notice that titfortat, the best strategy determined by Axelrod (2006), didn’t even place in this challenge - it only had ties and losses. However, when we look at the total number of points, we can see that titfortat actually ranks third with winStayer coming out in first and handshaker in second. The last two place strategies, cycler and inverser, are very close to one other with only a one point difference in total score.

These rankings make a lot of sense, following the methods and reasoning in Axelrod (2006). First, most of these strategies implement some level of kindness, or cooperating at the start. The only outlier would be thuemorser, which follows the Thue-Morse sequence in a seemingly random sequence. Next, the top three strategies: winStayer, handshaker, and titfortat all have some type of retaliation strategy. inverser also has a retaliation strategy, but it is based on a probability of how much its opponent defects so it is not always a certain retaliation. Then when it comes to forgiveness, I think this is what sets winStayer apart from handshaker: winStayer has a forgiveness method, but handshaker does not. The top three strategies are also great in terms of clarity in that they do not try to sneak in any defects. They only do when the other opponent does first, or in terms of handshaker just defects or cooperates forever.

I think that the reason titfortat didn’t do as well in this round is due to the fewer number of other strategies that it encountered. If there were more strategies, especially more unforgiving strategies, some of the strategies here would not do as well as titfortat. However, the overall winner, winStayer is very similar to titfortat in that it also reacts to what its opponent does first.

Moving on to the graph and focusing on winStayer’s plot first, we see that winStayer actually did best against inverser and handshaker. This makes sense as inverser doesn’t have an absolute retaliation strategy and handshaker defected forever once it realized that winStayer was cooperating. It did worst against thuemorser and titfortat. This also makes sense because thuemorser is based on an almost random sequence and titfortat has a very similar strategy to winStayer (so they probably went back and forth switching moves against each other).

Considering the outcomes for all six strategies in the whole plot, we can first see that winStayer actually tied with titfortat, which makes sense given how similar their strategies are to one another. We can also see that when titfortat did lose, it only lost by a very small margin. In the other times it tied, so we can say that titfortat is definitely the most consistent strategy, which is why it is the best when competing against more strategies. winStayer, on the other hand, won with much higher margins most of the time against the other strategies other than titfortat (tied). We can also see that handshaker, the only strategy here without forgiveness, did the worst against titfortat and winStayer, the two strategies that act based on the move of the opponent and have forgiveness.

# Conclusion

So what did we learn from this game and why is this relevant to politics? Well let’s take the example of negative campaign advertising. Should a campaign run attack ads against its opponent? We can evaluate the different responses using the Prisoner’s Dilemma outline. Both candidates would be better of if they didn’t run attack ads against each other. This reduces the hostility in the election and would encourage each candidate to instead run other advertisements that might be more informative about each candidates’ policy positions. However, if one candidate runs attack ads on the other candidate, then the other candidate would be left having to fight on the defense instead of promoting better ideas and solutions. If both candidates run attack ads, they both have to go on the defense but then the voters become more informed about why each candidate is bad instead of their policy positions and ideas.

Before, I mentioned some of the factors that the best strategies Axelrod (2006) found: niceness, retaliation, forgiveness, and clarity. Politics today have gained too much retaliation and too little clarity. This might be ok for the short-term, but the long-term effects could be damaging for the American political system. There needs to be more forgiveness everywhere and more niceness brought back. This was one of the main messages used by President Biden during his 2020 presidential campaign - to restore the soul of the nation. And I agree, there needs to be a shift back away from so much retaliation and more niceness and forgiveness.