In the late 1970's, political scientist Robert Axelrod held a computer tournament designed to investigate the prisoner's dilemma situation.2 Contestants in the tournament submitted computer programs that would compete in an iterated prisoner's dilemma game of approximately two hundred rounds, using the same matrix shown in Figure 2. Each contestant's program played five iterated games against each of the other programs submitted, and after all games had been played the scores were tallied.
The contestants in Axelrod's tournament included professors of political science, mathematics, psychology, computer science, and economics. The winning program--the program with the highest average score--was submitted by Anatol Rapoport, a professor of psychology at the University of Toronto. In this problem set, we will pursue Axelrod's investigations and make up our own Scheme programs to play the iterated prisoner's dilemma game. The second (optional) part of this problem set is itself an experiment in the spirit of Axelrod's tournament: a contest of programs that play a three-person prisoner's dilemma game.
Before we look at the two-player program, it is worth speculating on what possible strategies might be employed in the iterated prisoner's dilemma game. Here are some examples:
All of these strategies are extremely simple. (Indeed, the first three do not even pay any attention to the other player; their responses are uninfluenced by the previous rounds of the game.) Nevertheless, simplicity is not necessarily a disadvantage. Rapoport's first-prize program employed the tit-for-tat strategy, and achieved the highest average score in a field of far more complicated programs.