How to calculate
Use the payoff matrix to score both moves each round. Tit for tat starts with cooperation and copies the other player’s previous move. Grim trigger starts with cooperation and switches permanently after the other player defects.
Worked example
Use Game length One round · Player A strategy Always cooperate · Player B strategy Always defect · T · Defect against cooperation 5 · R · Both cooperate 3 · P · Both defect 1 · S · Cooperate against defection 0. The result is A 0 · B 5.
Input and result notes
Higher payoffs are better. The classic ordering is T > R > P > S. Choose 1 to 1,000 rounds. Scores include every round, and long games show the first 150 plus the final round.
Stanford Encyclopedia of Philosophy on the Prisoner’s Dilemma