Teaching objectives
Why does cooperation emerge among selfish individuals who only seek their own benefit? This upper-secondary lab rebuilds Robert Axelrod's famous experiment (1980): a tournament where different strategies face each other playing the prisoner's dilemma over and over. From the one-shot dilemma we move to the repeated game, to the everyone-vs-everyone tournament and, finally, to evolutionary models —including spatial ones— that show how cooperation can emerge… or collapse. The conclusion is surprising: the winning strategy is not the cleverest or the most aggressive, but a very simple one based on reciprocity.
What you learn
The core idea: in a world of repeated interactions, cooperating can be rational, and cooperation can emerge and sustain itself even without prior trust or an authority to impose it — but it can also collapse easily.
- Understand the dilemma (rooms 1-8). The payoff matrix (reward, temptation, punishment, sucker), the Nash equilibrium, real examples (the Cold War, teamwork, three classmates who copy each other), the one-shot dilemma and its trap, and why the repeated game with an uncertain ending —the shadow of the future— changes the rules.
- The strategies (rooms 9-11). The classics of the tournament (Tit-for-Tat, Cooperator, Defector, Random, Grudger, Pavlov), Axelrod's surprising result (the nice ones win; the Defector sinks) and how everything changes with the composition: in a class of defectors, cooperating no longer pays.
- Build your strategy (room 12). A builder: a first move + a loop of rules (including a fine 2×2 table of defection probability by the rival's last two moves). It is tested in real-time matches and taken to the class tournament.
- Tournament and evolution (rooms 13-14). The class tournament (the teacher collects the students' strategies and adds famous ones) and the evolutionary tournament: replicator dynamics, where the best scorers reproduce generation by generation.
- Social consequences (rooms 15-16). Two spatial models: a cellular automaton where lone cooperators die but survive and spread in clusters (spatial reciprocity), and the defection gene, where a tiny selfish mutation is enough for cooperation to collapse (the tragedy of the commons, emerging on its own).
Key mathematical ideas
- Prisoner's dilemma: T > R > P > S and 2R > T + S. Defecting is the one-shot dominant strategy, yet it leads to a worse outcome for both than cooperating.
- Nash equilibrium vs Pareto optimum: the stable point (Defect, Defect) does not match the best for the pair (Cooperate, Cooperate). The tragedy of the commons in miniature.
- Repeated game and the shadow of the future: with an uncertain number of rounds there is no backward induction, and reciprocity (Tit-for-Tat) becomes viable.
- Direct reciprocity: cooperating conditional on the other cooperating; why such a simple rule as Tit-for-Tat survives a whole tournament without winning a single duel.
- Evolutionary (replicator) dynamics: each strategy's frequency grows in proportion to its payoff advantage; it allows the study of invasion, coexistence and dominance depending on the initial mix.
- Spatial reciprocity (Nowak & May, 1992): on a grid, cooperators survive and spread by forming clusters even though they would lose in a well-mixed population — spatial structure changes the result.
- Mutation–selection and the tragedy of the commons: starting from pure cooperation, a small "selfish" mutation is selected and spreads; with no structure to stop it, cooperation erodes until it collapses.
Room-by-room contents
Room 1 · The payoff matrix
Opens with a story (revealed scene by scene): you and a friend, arrested and questioned separately. The payoff matrix appears in NEGATIVE (years in prison) and the student taps the four cells. Then DECIDES (silent/defect): the friend always defects, so the student feels first-hand why defecting dominates.
Student tasks
- Read the story and explore the four cells (years in prison).
- Decide and check that defecting pays whatever the friend does.
Room 2 · The Nash equilibrium
Definition of the Nash equilibrium and a search across THREE different matrices (the equilibrium is never in the cell with the biggest number). On a wrong tap, an animation shows that a player would gain by switching alone (+Δ): not an equilibrium.
Student tasks
- Learn the definition of Nash.
- Find the equilibrium in all three matrices.
Room 3 · The Cold War
The USA/USSR arms race as a dilemma, with the text-cell table. The student first finds the equilibrium (both invest in weapons); the "both save" cell is not one because either side gains by investing.
Student tasks
- Recognise the arms race as a prisoner's dilemma.
- Find the Nash equilibrium (invest, invest).
Room 4 · Is it a prisoner's dilemma?
Five real situations (tidying with a sibling, group project, two shops cutting prices, choosing ice cream, driving on the right). The student classifies each as PD or not and checks all at once. Kind hint on errors.
Student tasks
- Classify the five situations as PD or not PD.
- Tell a PD apart from coordination or a conflict-free choice.
Room 5 · The one-shot dilemma
The student plays a single decision (silent/defect) against a hidden rival who, being rational, defects. After a few rounds the trap appears: both end at (Defect, Defect), worse than cooperating.
Student tasks
- Play several rounds against the hidden rival.
- See why the rational move leads to (Defect, Defect).
Room 6 · Teamwork
Iterated dilemma with the payoff matrix on show: if you and your partner always defect you score nothing. A slider explores what percentage of cooperation is needed to "pass" (threshold ~38%), compared with the pair next door.
Student tasks
- Explore the % of cooperation with the slider.
- Find the minimum threshold to pass.
Room 7 · Three top students and you
The student joins a group of three classmates who play Tit-for-Tat. With three buttons (cooperate / defect / defect at random) they see who "passes": defecting leaves you alone failing, cooperating passes the whole group.
Student tasks
- Try the three ways of playing.
- See that cooperating pays best in a cooperating group.
Room 8 · The shadow of the future
Compares a known vs an unknown ending. With a known end (5 rounds), the animated backward induction collapses cooperation; with an uncertain end the induction can't start and cooperating makes sense again.
Student tasks
- Compare a known and an uncertain ending.
- Understand why uncertainty sustains cooperation.
Room 9 · The main strategies
Introduces Axelrod's tournament (1980) and the classic strategies (Tit-for-Tat, Cooperator, Defector, Random, Grudger, Pavlov). The student plays several and then ranks the three best, which is SCORED against the real podium (2 points for the right place, 1 for being on the podium).
Student tasks
- Meet and play against at least four strategies.
- Rank the three best and compare with the real podium.
Room 10 · Axelrod's results
Replayable round-robin tournament (randomness shifts the order a bit). The surprising result: the nice strategies take the top and the Defector —which never loses a duel— sinks. Multiple-choice on what the top ones have in common.
Student tasks
- Run the tournament several times and see who is always on top.
- Identify that the top ones are the nice strategies.
Room 11 · What if I join a class of defectors?
The same tournament, but the student controls the COMPOSITION with a per-strategy selector. As the number of Defectors rises, the Cooperator sinks and the Defector starts to pay: in a world of slackers, cooperating no longer pays.
Student tasks
- Change the count of each strategy.
- See how the Defector starts to win when there are many.
Room 12 · Build your strategy ★
BUILDER: the student sets the 1st move (silent/defect) and a repeating LOOP of rules (Silent, Defect, Tit-for-Tat, defect after 2 defections, in one of the last 2, by threshold X%, at random X%, and "Fine tuning": a 2×2 table of defection probability by the rival's last two moves, summing to 100). They test the strategy in animated real-time matches (8 rounds) against the famous ones and, after at least two, pit it against all in a tournament. The strategy is saved for the class tournament.
Student tasks
- Build a strategy (opening + rule loop + fine tuning).
- Test it in matches and pit it against all in the tournament.
Room 13 · The class tournament
The teacher collects the strategies built by all students and adds whichever famous ones they want; they compete in a round-robin. Each student sees their rank, with their strategy highlighted. (Distribution like the Mazes lab.)
Student tasks
- Wait for the teacher to launch the class tournament.
- Read the ranking and find your strategy.
Room 14 · The evolutionary tournament
Replicator dynamics: each generation the best scorers reproduce and the worst die out. Animated strip chart (40 generations). With presets (balanced / mostly defectors) and adjustable mix; includes the student's strategy and the class's.
Student tasks
- Choose the initial population and run the evolution.
- See who dominates depending on the starting mix.
Room 15 · The world on a grid ★
CELLULAR AUTOMATON (Nowak-May): a grid where each cell plays 5 rounds with its 8 neighbours and copies the best-scoring one. SOCIAL CONSEQUENCE: a lone cooperator (or 10 scattered) dies surrounded by defectors, but a CLUSTER of cooperators defends itself and grows — spatial structure saves cooperation. Presets: cooperator cluster, scattered cooperators, scattered defectors and biased random.
Student tasks
- Compare a lone cooperator with a cluster.
- Discover that cooperation survives and spreads if it sticks together.
Room 16 · The defection gene ★
A grid of PURE cooperators where each cell carries a "defection gene" (the % it defects with, 0 at first). Each generation: play, copy the best neighbour's gene and, with probability p (slider), MUTATE ±10%. SOCIAL CONSEQUENCE: a tiny selfish mutation is enough for the defection gene to spread and cooperation to collapse (the tragedy of the commons emerging on its own); with mutation 0, cooperation holds.
Student tasks
- Watch how the average defection gene evolves.
- Vary the mutation rate and see when selfishness creeps in.
Rooms to project
The most striking ones to show and discuss in class.