To compare the performance of different learning rules, we consider two players who interact in a repeated game. In each round, players independently decide whether to cooperate or defect. As a result, each player obtains a payoff (Fig. REF a). After every round, players interact for another round with probability \(\lambda \) . They decide whether to cooperate based on their strategies. A strategy is a rule that tells the player what to do in the next round, given the previous history of play. In the simplest version of the model, players use memory-one strategies [1]}, [2]}, [3]}, which rely on information from only the last round of play and which humans are adept at using in behavioral experiments [4]}, [5]}, [6]}, [7]}. A memory-one strategy for player \(X\)  consists of an initial probability of cooperation, \(p_{0}\) , together with a four-tuple of conditional cooperation probabilities, \(\mathbf {p}=\left(p_{CC},p_{CD},p_{DC},p_{DD}\right)\in \left[0,1\right]^{4}\) . Here, \(p_{xy}\)  is the probability that \(X\)  cooperates in the next round when \(X\)  played \(x\)  and \(Y\)  played \(y\)  in the previous round. For example, an unconditional defector is represented by a memory-one strategy with \(p_{0}=0\)  and \(\mathbf {p}=\left(0,0,0,0\right)\) . Tit-for-tat takes the form \(p_{0}=1\)  and \(\mathbf {p}=\left(1,0,1,0\right)\) . Given the strategies \(\mathbf {p}\)  and \(\mathbf {q}\)  of the two players, we can compute how likely they are to cooperate over the course of the game, and which overall payoffs \(\pi _{X}\left(\mathbf {p},\mathbf {q}\right)\)  and \(\pi _{Y}\left(\mathbf {p},\mathbf {q}\right)\)  they obtain (Fig. REF b and Methods).
<FIGURE>