Reanalyzing 12 experiments on the repeated prisoner's dilemma (PD), we robustly observe three distinct subject types: defectors, cautious cooperators and strong cooperators. The strategies used by these types are surprisingly stable across experiments and uncorrelated with treatment parameters, but their population shares are highly correlated with treatment parameters. As the discount factor increases, the shares of defectors decrease and the relative shares of strong cooperators increase. Structurally analyzing behavior, we next find that subjects have limited foresight and assign values to all states of the supergame, which relate to the original stage-game payoffs in a manner compatible with inequity aversion. This induces the structure of coordination games and approximately explains the strategies played using Schelling's focal points: after (c;c) subjects play according to the coordination game's cooperative equilibrium, after (d;d) they play according to its defective equilibrium, and after (c;d) or (d;c) they play according to its mixed equilibrium.