ViewWiki

The world, a little closer

Game theory.

In a single game, betraying always pays more. So why do selfish players who meet again and again end up cooperating?

Explore the scene Interactive article

01 / The experiment

Betray once. Meet again.

Set the mix of players and how many rounds each match lasts, then drag Generations to watch thirty generations of the tournament play out.

Still of the Game theory 3D scene, which explores: If betraying always pays more in a single game, how can cooperation win?
Interactive scene

Loading the interactive version…

The explanation below is available while the scene loads.

A round-robin tournament of the repeated prisoner's dilemma: every player meets every other in a match of several rounds, scoring 3 each for mutual cooperation, 1 each for mutual defection, and 5 against 0 when one betrays the other. Each gold coin is half a point a round; players who score more leave more copies in the next generation.Players never make mistakes, there are only three strategies, and the population is treated as so large that luck plays no part; the 40 pawns show its make-up rounded to whole players. Only the first three rounds of each match are drawn over the table, while the scores count every round.

02 / Three strategies

Trusting, ruthless, fair.

Each plays five rounds against a cooperator (top pair) and a defector (bottom pair). Green is cooperate, red is defect; the scores average a ten-round match.

The trusting01
ThisCooperatorThisDefector

Always cooperate

Never betrays and never hits back. Wonderful company for other cooperators, and a free meal for every defector at the table.

First move
Cooperate
After a betrayal
Cooperates anyway
Against a cooperator
3 points a round
Against a defector
0 points a round
Against its own kind
3 points a round
The exploiter02
ThisCooperatorThisDefector

Always defect

Takes the top score from anyone who trusts it, so it thrives while cooperators last. Among its own kind it scores only 1 a round.

First move
Defect
After a betrayal
Defects, as always
Against a cooperator
5 points a round
Against a defector
1 points a round
Against its own kind
1 points a round
The reciprocator03
ThisCooperatorThisDefector

Tit for tat

Opens kindly, then copies the other player’s last move. It loses one round to a defector and nothing more, and cooperates fully with anyone who cooperates.

First move
Cooperate
After a betrayal
Defects next round
Against a cooperator
3 points a round
Against a defector
0.9 points a round
Against its own kind
3 points a round
The big idea

Tit for tat never outscores the player it faces, yet it wins the tournament: it earns the full reward from everyone willing to cooperate, and leaves a defector almost nothing to feed on. The longer players keep meeting, the closer its score against a defector gets to the defector's own.

1 − 1/m

A game with a catch

Two people are caught for a crime and questioned in separate rooms. Each can stay silent, protecting the other, or betray the other to the police. If both stay silent, both get a short sentence. If both betray, both get a long one. If one betrays and the other stays silent, the betrayer walks free and the silent one gets the longest sentence of all.

This is the prisoner’s dilemma, worked out at the RAND Corporation in 1950 by Merrill Flood and Melvin Dresher and given its story by Albert Tucker. It turns up wherever two sides would both do well by cooperating but each is tempted to take advantage: two shops setting prices, two countries building weapons, two animals grooming each other for parasites.

In the scene the sentences become points, printed on the felt. Cooperating together earns 3 each. Defecting together earns 1 each. A defector facing a cooperator takes 5 and leaves the cooperator with 0.

Why betrayal wins a single game

Game theory is the mathematics of decisions whose results depend on what others decide. Its first move is to look at each choice against each of the other player’s choices.

Suppose the other player cooperates. You get 3 by cooperating, 5 by defecting: defecting is better. Suppose they defect. You get 0 by cooperating, 1 by defecting: defecting is better again. Whatever they do, you score more by defecting. A choice like that is called a dominant strategy.

Both players reason the same way, so both defect and score 1 each, when they could have had 3 each. Neither can do better by changing their own move alone, which makes mutual defection the game’s Nash equilibrium, after John Nash, who proved in 1950 that every game with finitely many choices has at least one such resting point, once players may also choose at random. The dilemma is that the equilibrium is worse for both than an outcome they cannot reach.

Try it: slide Rounds per match down to 1, then drag Generations to 30 generations later. As long as anyone defects at the start, the red defectors take the whole table.

Back to the experiment

Meeting again changes the game

Most real dilemmas are not played once. Neighbours, colleagues and trading partners meet again and again, and what you do today can be answered tomorrow. Around 1980 the political scientist Robert Axelrod asked which strategy does best in a repeated prisoner’s dilemma, and ran two computer tournaments to find out. Game theorists, economists and computer scientists sent in programs; each played every other in long matches, scored with the same 5, 3, 1 and 0.

Both tournaments were won by the simplest program entered, submitted by the psychologist Anatol Rapoport. It is called tit for tat: cooperate in the first round, then do whatever the other player did in the round before.

Tit for tat never scores more than the player it is facing. Against a defector it loses the first round and then they defect together; against a cooperator they cooperate throughout. It wins tournaments not by beating anyone, but by making cooperation pay and betrayal stop paying.

How tit for tat rises

The scene runs an ecological tournament of the kind Axelrod used next. Three strategies share the table: blue tit for tat, green players who always cooperate, and red players who always defect. Everyone plays everyone, and each strategy’s coin stack shows its average points a round. Then comes the next generation, in which each strategy’s share of the players grows in proportion to how well it scored.

With the starting mix, the defectors at first do best. They meet the green cooperators and take 5 points every round, so their share grows. But each generation there are fewer cooperators to exploit, and against tit for tat a defector gets only one good round before being answered with defection. Within a few generations the defectors’ average falls below tit for tat’s, by generation four it is below the table’s average, and from then on their share shrinks until none are left.

Try it: drag Generations slowly from Starting mix and watch the red coin stacks. They are the tallest at first and the shortest by generation ten.

Back to the experiment

How long the matches last decides everything. In a long match, tit for tat’s one lost round is a small price, and the many rounds of cooperation with its own kind are a big reward. With this starting mix, matches of three rounds let the defectors win and matches of four let tit for tat win.

Try it: slide Rounds per match from 3 to 4, then slide Defectors at the start up to 80% and find how long the matches must be before tit for tat can still take over.

Back to the experiment

Axelrod summed up the strategies that did well in a few words. They were nice: never the first to defect. They were retaliatory: a defection was answered at once. They were forgiving: one round of punishment, then back to cooperation if the other came back too. And they were clear, easy for the other player to read and learn to cooperate with.

Beyond the prisoner’s dilemma

Game theory began with the mathematician John von Neumann, who studied games like poker in which one player’s gain is exactly the other’s loss, and with his 1944 book with the economist Oskar Morgenstern. Nash’s equilibrium extended it to every kind of game, including the many in which both sides can win or lose together.

Biologists took it up in the 1970s, led by John Maynard Smith: in place of reasoning players, genes and behaviours compete, and the payoff is the number of offspring. That is the reading this scene uses. Nobody in it decides anything; strategies that score well simply become more common. The same mathematics now guides the design of auctions, the study of traffic, and how computer networks share bandwidth.

What this model leaves out

The players here make no mistakes. Real players misread a move or slip, and two tit for tat players can then fall into an endless echo of revenge. Strategies that forgive a little more, such as generous tit for tat, which sometimes lets a defection go, do better in a noisy world.

Only three strategies take part, so tit for tat never meets the cleverer rivals that can beat it, and nothing new ever arises by mutation. Once the defectors are gone, the green cooperators and tit for tat score exactly the same, so the mix between them freezes; in a real, finite population chance would let it drift, and a cooperative population could again be invaded by defectors.

The population is treated as infinitely large, and the pawns only show its make-up rounded to whole players, so the change from one generation to the next is smooth and repeatable. The strategies also ignore when a match will end. If a player knew, a strictly logical player would defect in the last round, then in the one before, and so on back to the first: a puzzle about rationality that the real tournaments, and real people, mostly ignore.

Reuse with credit to ViewWiki and a link to this page.

04 / Learn this in a course

Practise it, step by step.

This lesson teaches the topic with checked questions.

  1. Game theory Mathematics · Patterns and chance