Tit-for-tat is a strategy for the iterated prisoner's dilemma in which a prisoner cooperates on the first move, and thereafter copies the previous move of the other prisoner. It was submitted by A. Rapoport to Axelrod's computer tournaments, where it performed notably well despite its simplicity (Axelrod 1980ab, Axelrod and Hamilton 1981).
Write
for cooperation and
for defection. If two tit-for-tat players have been cooperating and one accidentally
plays
, their outcome changes from
to
or
. If they both copy the other's
actual move thereafter and there are no further errors, the two asymmetric outcomes
alternate indefinitely. Generous tit-for-tat starts by cooperating and always cooperates
after
, but cooperates with a fixed positive probability
after
. This allows two such players to return to
after an error (Nowak and Sigmund 1992, Veritasium 2023).
In an error-free match with equally weighted rounds, tit-for-tat never earns a larger total payoff than its opponent (Veritasium 2023). To see
this, let
be 1 if the opponent defects in round
and 0 otherwise, and set
. The payoff difference in round
is
, where
and
are the temptation and sucker's payoffs
in the prisoner's dilemma. The payoff differences
telescope to
over
rounds. Thus the total payoffs are equal if the opponent ends with
, and the opponent earns
more if the final move is
.
Tit-for-tat is neither uniformly optimal nor uniquely successful among simple strategies. For example, Nowak and Sigmund (1993) described a win-stay, lose-shift strategy that can outperform tit-for-tat.
Wolfram (2026) found that, among deterministic 2-state-machine strategies for the iterated prisoner's dilemma, tit-for-tat ranks below the top performer for long-run average payoff.