About Prisoner's Dilemma
Two players each choose, at the same moment, to cooperate or to betray. If both cooperate they get 3 points each; if both betray, 1 each. If one betrays and the other cooperates, the betrayer gets 5 and the trusting one gets nothing. Whatever the other player does, betraying scores more for you; yet two betrayers end up with 1 each when they could have had 3. That is the dilemma. Played again and again with the same partner, it becomes a different game: today's betrayal can be paid back tomorrow.
PLAY: you against one of twelve strategies. Press COOPERATE or BETRAY (or the keys C and B; N starts a new game). The two rows of stamps are the moves so far, blue rings for cooperating and red boxes for betraying, with the running totals at the end of each line. Pick Mystery and the page doesn't say who you're playing until the end. With UNKNOWN length, every round from the 8th on has a 1 in 10 chance of being the last (50 at most, which about 1 game in 80 reaches), so there is almost never a known last round to cheat in.
TOURNAMENT: every strategy you tick plays every other one (and its own twin, if ticked), each pairing several times. Noise is the chance that a move comes out the opposite of what was meant, a misunderstanding. The table ranks them by average points a round; NICE marks a strategy that is never the first to betray. The grid shows each row's points a round against each column: click a square to see how that match went. COPY LINK copies the line-up and settings.
EVOLUTION starts a population with an equal share of each strategy (or half Always Betray). Each generation, a strategy's share grows in proportion to how well it scores against the population as it is now, using the tournament's scores. RUN plays the generations and stops at the end.
THE STORY
The game was devised in January 1950 by Merrill Flood and Melvin Dresher at the RAND Corporation in California, where game theory was being studied for the Cold War. They had two colleagues play it 100 times in a row; the pair cooperated far more often than the theory of the day said rational players would. Later that year the Princeton mathematician Albert W. Tucker, giving a talk to psychologists at Stanford, dressed it up as the story that gave it its name: two suspects held in separate rooms, each offered a lighter sentence for giving evidence against the other.
In 1980 the political scientist Robert Axelrod, at the University of Michigan, invited game theorists to send in computer programs to play it against each other. The first tournament had 14 entries plus a program that moved at random; every program met every other (and its own twin) in games of 200 moves. The winner was the shortest program sent in: Tit for Tat, entered by the psychologist Anatol Rapoport. It cooperates on the first move and then does whatever the other player did last time. Axelrod then ran a second tournament, with 62 entries plus Random, open to anyone and with the first results published, and with games of unknown length. Tit for Tat, sent in again by Rapoport, won again.
Axelrod summed up what the high scorers had in common: they were nice (never the first to betray), retaliatory (they hit back), forgiving (they went back to cooperating), and clear. Tit for Tat never beats anyone in a single match, at best it draws, yet it comes out on top by doing well with everybody. He also worked out that Tit for Two Tats would have won the first tournament, had anyone entered it. His book The Evolution of Cooperation (1984) included an "ecological" version, where successful strategies grew in number from round to round: the EVOLUTION tab does the same.
Joss is named after one of the first tournament's entries, a Tit for Tat that sometimes betrays on the sly. With noise, plain Tit for Tat gets stuck in long feuds after a single misunderstanding; Generous Tit for Tat (which forgives a third of betrayals) and Pavlov, or Win-Stay Lose-Shift, were studied by Martin Nowak and Karl Sigmund in the early 1990s as ways out.
HOW IT WORKS
Each strategy is a small machine: it chooses a move, then is told what both players actually did. Matches use a seeded random number generator, so a COPY LINK result comes out the same for whoever opens it. Points are shown per round, so games of different lengths compare fairly: 3 a round means cooperating all the way, 1 means betraying all the way. A strategy's score is its average over all its opponents. The unknown-length games use Axelrod's second-tournament rule: a 0.346% chance each move is the last, so half the games are 200 moves or shorter.
In the evolution, a strategy's fitness is its average points a round against the population (each opponent weighted by its share); its share is multiplied by fitness ÷ the population's average fitness. Strategies that fall below one in a million die out.
FURTHER WATCHING AND READING