But these villagers are neighbors. They will not make this decision once; they will make it every year. This is called an iterated prisoner's dilemma: a game in which you know you must play with the same person over and over again. You know they will remember how you treat them. This is the value of remembering. Using knowledge of your opponent's past behavior to influence future choices. The villages agree to cooperate. For years they are at peace. They maximize their total grain production as a pair, rather than seeking to have more grain than their rival. Then, on the sixth year, a misunderstood letter or a change in leadership or the influence of an outside power makes one village attack. It has defected. How do we reply? That depends on the strategy we are using. There are many strategies. Examples: Unconditional cooperation. Cooperate no matter what the other village does. This strategy achieves the greatest total grain output, but only if it is playing against another cooperative village. Berserker. Always attack, no matter what the other village does. It always beats the unconditional cooperator. Optimal strategy in a one-off game. Random. Flip a coin to decide whether to attack. Tit for tat. Do whatever the other village did last. Punitive tit for tat. Whenever the village attacks, attack the next two years in a row. Learning tit for tat. Each time the other village attacks, increase the number of years you attack in response. This strategy must have memory; it needs to remember backwards more than one year. Grim trigger. Cooperate until the other village attacks, then always attack. Probe. Begin with an attack, then cooperate for two years. Base your further decisions on how the other village reacts.