Games and the Social Contract
Why would self-interested people cooperate, and can the rules be designed so that they do?
The part opens with Hobbes's state of nature in 1651, where life is solitary, poor, nasty, brutish and short, and reads it as a game. Nash equilibrium is defined and found by support enumeration on five small games; the prisoner's dilemma and Hardin's commons show equilibrium leaving everyone worse off, and Ostrom's graduated sanctions hold contributions up. Rousseau's stag hunt separates payoff dominance from risk dominance, and the centipede's backward induction, which takes at once, is with the dilemma the Wall's thirty-fourth brick. Then come the ways out: a traffic light as a correlated equilibrium, the shadow of the future with its thresholds of patience, Axelrod's tournaments rerun with noise, and Press and Dyson's zero-determinant strategies, which fix a line between the two players' scores. Evolution in a finite population and Skyrms's demand game show cooperation and fair division arising without foresight. The part turns from playing games to designing them, with bargaining, the Shapley value, Vickrey's auction and deferred acceptance, and ends with the social contract's Price List.
What you need. School algebra and probabilities. Expected utility is Part 33's; the replicator dynamics of Part 19 and the common knowledge of Part 12 are recalled where used.
- The calculation
- Nash, Shapley, mechanisms
- The wall
- backward induction
- Built toy
- Axelrod tournament; zero-determinant strategies
What you will be able to do
Introductory
- Find the pure Nash equilibria of a two-by-two game, and explain why mutual defection is the only one in the prisoner's dilemma.
- Tell a stag hunt from a prisoner's dilemma, and say why tit for tat did well in Axelrod's tournaments.
Advanced
- Compute a mixed equilibrium from the indifference conditions, and the discount factor at which grim trigger sustains cooperation.
- Derive a zero-determinant strategy with a given extortion ratio, and check the line it enforces from a stationary distribution.
- Compute a Shapley value by orders of arrival, and run deferred acceptance by hand.
Research
- Set out the paradox of backward induction and what Aumann's and Stalnaker's analyses assume about rationality off the path of play.
- Show that an extortioner scores only P against a copy of itself, and explain with Stewart and Plotkin why it wins every match yet loses the tournament.
Applied
- Explain why a second-price auction makes truthful bidding optimal, and what changes in a generalized second-price auction for ad slots.
- Check a matching for blocking pairs, and say for whom deferred acceptance is strategy-proof.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Introductory 22 min · Advanced 44 min · Research 50 min · Applied 32 min.
- 0Why would self-interested people cooperate?Introductory2 min
- 1EquilibriumIntroductory4 min
- 2The dilemma and the commonsIntroductory4 min
- 3The stag huntIntroductory3 min
- 4Backward inductionResearch3 min
- 5Correlated equilibriumAdvanced3 min
- 6TournamentsIntroductory7 min
- 7Zero-determinant strategiesResearch3 min
- 8Evolution of cooperationAdvanced2 min
- 9Dividing the cakeAdvanced2 min
- 10BargainingAdvanced2 min
- 11The Shapley valueApplied4 min
- 12Mechanism designApplied3 min
- 13Markets by designApplied3 min
- 14The social contractAdvanced3 min
- Recap, problems, and where this comes backAll tracks2 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
Why would self-interested people cooperate?Introductory2 min
Part 33 asked how one agent should choose. This part asks what happens when choices meet: when what is best for me depends on what you do. Thomas Hobbes, in 1651, described people without a government to keep them in awe: there is no place for industry, because its fruit is uncertain, and the life of man is solitary, poor, nasty, brutish, and short. His remedy was a sovereign. Three centuries later, game theory made his argument precise, and found both its force and its limits.
Four questions run through it. What does it mean for several choices to be stable together, and must such a point always exist? Why do rational people overgraze a common pasture, and defect on each other when both would gain from trust? How can repetition, evolution or a shared signal make cooperation stable? And can the rules of the game be designed so that self-interest produces good outcomes: in auctions, in markets for school places and kidneys, and in the state itself? The prisoner's dilemma and the paradox of backward induction are this part's brick in the Wall.
The plan. Nash equilibrium, found by a program that enumerates supports, and best responses crossing. The prisoner's dilemma and the commons, with up to a hundred herders, and Elinor Ostrom's sanctions simulated. The stag hunt, and backward induction in the centipede game, this part's brick in the Wall. Correlated equilibrium, found by linear programming. Axelrod's tournaments, rerun with noise, and the zero-determinant strategies discovered in 2012, checked against two thousand opponents. Evolution in a finite population, and Brian Skyrms's fair division on the simplex. Bargaining, and the Shapley value, with its use in explaining machine learning models. And mechanism design: auctions, sponsored search, the matching of students to schools, and the social contract, with its Price List.
What it establishes: Hobbes (1651); four questions; the plan.
1EquilibriumIntroductory4 min
In 1950 John Nash, a graduate student at Princeton, defined the central idea of game theory in a paper of one page. A profile of strategies is an equilibrium if no player can do better by changing her own strategy while the others keep theirs. Each is a best response to the rest. Strategies may be mixed, probability distributions over acts. Nash proved that every game with finitely many players and acts has at least one equilibrium in mixed strategies. The proof maps each profile to the set of best responses to it, and finds a profile that is a best response to itself, by Kakutani's fixed point theorem of 1941.
How do you find equilibria? The Reasoner uses the oldest exact method, support enumeration. Guess which acts each player uses with positive probability: the supports. A mixture can be a best response only if every act in it earns the same. That gives linear equations for the other player's mixture: in a two by two game, the row player is indifferent exactly when q times one payoff plus one minus q times another balances. Keep the solutions that are genuine probabilities, and against which no unused act does better. The number of supports grows exponentially, and Constantinos Daskalakis, Paul Goldberg and Christos Papadimitriou showed in 2006, and Xi Chen and Xiaotie Deng for two players, that computing a Nash equilibrium is complete for the class PPAD: probably no fast algorithm exists. Equilibrium exists, but may be hard to find.
The Reasoner solves five classic games. The prisoner's dilemma has one equilibrium: both defect. Matching pennies has none in pure strategies, and one in which each player mixes half and half. The battle of the sexes, a couple who want to be together but prefer different evenings, has two pure equilibria and a mixed one in which each goes to their favourite two thirds of the time, and both do worse than in either pure one. The stag hunt has two pure equilibria and one mixed. And chicken, two drivers heading for each other, has two equilibria in which one swerves, and a mixed one worth four and two thirds to each. The next chapters take these games one at a time.
Here is the picture behind Nash's proof. Let p be the probability that the row player goes to the opera, and q the column player's. The row player's best response is football when q is below a third, opera when it is above, and anything at all at exactly a third: a step, with a vertical piece. The column player's best response steps at p equal to two thirds. The two correspondences cross three times: at both playing football, both playing opera, and at the mixed point. Kakutani's theorem says that correspondences like these, whose values are convex and whose graphs are closed, must cross somewhere. That is why every finite game has an equilibrium.
What it establishes: Nash (1950); Kakutani (1941); PPAD (2006).; Computed on screen: support enumeration on five games; best responses crossing
2The dilemma and the commonsIntroductory4 min
In 1950 Merrill Flood and Melvin Dresher, at the RAND Corporation, found a game whose equilibrium everyone regrets, and Albert Tucker gave it its story of two prisoners. Each player cooperates or defects. Both cooperating earns three each; both defecting, one each; a defector against a cooperator earns five, and the cooperator nothing. Whatever the other does, defecting pays more: five rather than three, one rather than nothing. So both defect, and the only equilibrium pays one each, though both would prefer three. When Flood and Dresher had two colleagues play it a hundred times, they cooperated far more than the theory said they should, which already hinted at the role of repetition.
Philosophers read Hobbes's argument as a prisoner's dilemma. In the state of nature, each person can invade or keep the peace, and attacking first is safest whatever the others intend. So all invade: the war of all against all is the mutual-defection equilibrium. The sovereign's role is to change the payoffs. A power that punishes invasion makes keeping the peace each person's best response, so that the good outcome becomes an equilibrium. The Leviathan is a mechanism. David Gauthier, Gregory Kavka and Jean Hampton developed this reading; they disagree whether the state of nature is really a dilemma, or the gentler assurance game of the next chapter, where peace is already stable if each trusts the others.
Garrett Hardin's tragedy of the commons, of 1968, is the many-player version. The Reasoner builds it. Herders share a pasture. Each cow is worth a hundred and ten minus the total number grazing, and costs ten to keep. Each herder chooses how many to graze, and the equilibrium has each graze a hundred over n plus one. The trouble is that a cow's cost falls on its owner, while the damage it does to the pasture falls on everyone. The best total for all is fifty cows, worth two thousand five hundred. With ten herders the equilibrium is ninety one cows, and a third of that value. With a hundred it is ninety nine cows, and four percent: as the commons grows, rational grazing destroys almost all its value.
Hardin's answer was privatization or the state. Elinor Ostrom spent decades studying communities that had found a third way, and won the Nobel prize in economics for it in 2009. Swiss alpine meadows, Japanese forests and Spanish irrigation systems had been governed by their users for centuries. In Governing the Commons, of 1990, she drew out what they shared: clear boundaries, rules suited to local conditions and made by those affected, monitoring by the users themselves, graduated sanctions, and cheap ways of settling disputes. The Reasoner runs a public goods game in groups of four. Each unit a player contributes is multiplied by one point six and shared, so it returns only point four to the giver, and keeping is dominant. Players copy better-earning neighbours. Without sanctions, contributions collapse within a few rounds. With monitored, graduated fines, paid for by a small cost to every member, they rise above ninety percent and stay there. The sanction changes the game, as Hobbes's sovereign did, but it is imposed by the players on themselves.
What it establishes: Flood and Dresher (1950); Hobbes; Hardin (1968); Ostrom (1990).; Computed on screen: the commons for 1 to 100 herders; a public goods game with sanctions
3The stag huntIntroductory3 min
In 1755 Jean-Jacques Rousseau told a story of hunters. If it was a matter of hunting a deer, everyone well realized that he must remain faithfully at his post; but if a hare happened to pass within reach of one of them, he would have gone off after it without scruple. In the game, hunting stag together pays four each; a hare pays three whatever the other does; and a lone stag hunter gets nothing. There are two equilibria. Unlike the dilemma, no one is tempted to leave the stag hunt if the others stay: cooperation is stable. The problem is trust. Hunting stag pays only if enough others do.
Put the game in a population. If a share x of the population hunts stag, a stag hunter earns four x on average and a hare hunter three. Stag pays only when x exceeds three quarters. Below that point the population drifts toward hare; above it, toward stag. The basin of hunting hare is three quarters of all starting points; the basin of the better outcome only a quarter. Under any dynamics in which people move toward the better reply, the population ends at one extreme or the other, and which one depends on where it starts.
Which equilibrium is rational? John Harsanyi and Reinhard Selten wrote a book in 1988 to answer such questions, and found two competing criteria. Payoff dominance: the stag equilibrium is better for everyone, so rational players should coordinate on it. Risk dominance: compare the losses from a unilateral mistake at each equilibrium. The product of those losses is nine at hare and one at stag, so hare is less risky. Equivalently, against a partner equally likely to do either, hare earns three and stag only two. Brian Skyrms argued in 2004 that the social contract is better modelled by the stag hunt than by the dilemma: cooperation can be stable, and the problem of politics is how to build the trust that reaches it.
Evolution gives its own answer. Michihiro Kandori, George Mailath and Rafael Rob studied a population that best-responds, but in which each member occasionally errs at random. The Reasoner runs ten hunters for a million periods, starting from everyone hunting stag. To knock the population out of all-stag takes three simultaneous errors; to knock it out of all-hare takes eight. So the population spends more than ninety nine percent of its time hunting hare, at every error rate tried; once it reaches all-hare it almost never leaves. The stochastically stable equilibrium is the risk-dominant one. Trust is fragile in a precise sense: it takes fewer mistakes to lose it than to win it back.
What it establishes: Rousseau (1755); Harsanyi and Selten (1988); Skyrms (2004); Kandori, Mailath and Rob (1993).; Computed on screen: basins; stochastic stability
4Backward inductionResearch3 min
Robert Rosenthal described this game in 1981. Two players take turns. At each node the mover can take the larger share of a pot, ending the game, or pass, and the pot doubles. After six passes, the pot of two hundred and fifty six is split, with the larger share going to the first player. Reason backward. At the last node the second player takes, getting a hundred and two rather than fifty one. Knowing that, the first player takes at the node before, and so on down to the first node. The unique subgame perfect equilibrium is to take at once: three point two and point eight, when two hundred and five and fifty one were on offer to the same two players.
In the laboratory almost no one takes at once. Richard McKelvey and Thomas Palfrey found in 1992 that most games run several nodes. One explanation: players are noisy. The Reasoner lets each mover take with a probability that rises with the relative gain from taking, sharpened by a rationality parameter lambda, and solves the game backward. With lambda zero, choices are coin flips. With lambda two, games end all along the centipede. With lambda five, players pass early and take near the end, the pattern of experiments: since the other might pass, passing is worth a lot. Only with lambda twenty does everyone take at once. A little doubt about the other's rationality makes passing rational.
The theory is not only refuted in the laboratory. It may be incoherent. Backward induction says that at node three player one takes, because player two would take at node four. But node three is reached only if player two passed at node two, which a backward-inductive player never does. Why expect rationality at node four from someone who has just shown she does not follow it? Ken Binmore, Cristina Bicchieri and Philip Reny argued that the reasoning undermines itself. Robert Aumann proved in 1995 that common knowledge of rationality does imply backward induction; the contradiction never arises, because the strange nodes are never reached. Robert Stalnaker replied that everything turns on how players would revise their beliefs if they were reached: Part 14's theory of belief revision, inside a game.
This is the thirty fourth brick in the Wall. The dream was that individual rationality, practised by everyone, would be collectively rational. The prisoner's dilemma shows rational players reaching an outcome every one of them regrets, and backward induction shows the theory recommending, against a cooperative partner, a move that throws almost everything away, by reasoning that may not even be coherent. What it forces is a choice: change the game, with institutions, repetition and enforcement, or change our idea of what rationality requires.
What it establishes: Rosenthal (1981); McKelvey and Palfrey; Aumann (1995); Stalnaker (1998); the Wall's thirty-fourth brick.; Computed on screen: backward induction; noisy best responses
5Correlated equilibriumAdvanced3 min
Robert Aumann found a way past the limits of Nash equilibrium in 1974. In chicken, two drivers head toward each other. If both dare, they crash. The pure equilibria have one dare and the other swerve, seven to two. The symmetric equilibrium has each dare a third of the time: four and two thirds each, with a one in nine chance of a crash. Now add a traffic light: a device that picks one of three recommendations with equal chance, both swerve, or one of them dares, and tells each driver only their own instruction. Told to dare, you know the other was told to swerve. Told to swerve, you know the other dares half the time, so daring would risk a crash. Obeying is a best response either way. Each earns five, more than in the symmetric equilibrium, and there is never a crash. A correlated equilibrium is a distribution over profiles that everyone is willing to obey.
Which signal is best? Obedience is a set of linear inequalities in the probabilities of the recommended profiles: for each player and each recommendation, obeying must be at least as good as any deviation. So the best correlated equilibrium is the solution of a linear program, and the Reasoner solves it. Both swerve half the time, and each dares a quarter of the time. That gives five and a quarter each, more than any Nash equilibrium of the game. And unlike Nash equilibrium, correlated equilibria can be computed in polynomial time; simple regret-minimizing learning rules converge to them, a result of Sergiu Hart and Andreu Mas-Colell in 2000.
Philosophers had seen the idea before the mathematics. David Hume wrote in 1739 that two men who pull the oars of a boat do it by an agreement or convention, though they have never given promises to each other. David Lewis's Convention, of 1969, analysed it as a regularity that each follows because the others do, sustained by the common knowledge of Part 12. Herbert Gintis has argued that social norms are choreographers: correlation devices that tell each person their part. The lesson for the social contract is that an institution need not change anyone's payoffs, as Hobbes's sovereign did. Sometimes a public signal, a red light or a custom, is enough.
What it establishes: Aumann (1974); Hart and Mas-Colell (2000); Hume (1739); Lewis (1969); Gintis.; Computed on screen: the best correlated equilibrium, by linear programming
6TournamentsIntroductory7 min
Before the tournaments, the theory. A single prisoner's dilemma has one equilibrium, mutual defection. But suppose that after each round the game goes on with probability delta, or, equivalently, that the players discount the future by delta. Cooperating for ever with a partner who does the same earns R every round: three. Against grim trigger, the best deviation defects at once: the temptation, five, now, and the punishment, one, for ever after. Averaged with weights one minus delta, that is five minus four delta, which falls below three exactly when delta passes one half; in general, when delta is at least T minus R over T minus P. Tit for tat forgives, and forgiveness changes the best deviation. Defect, accept the sucker's payoff when it retaliates, and defect again as it forgives: alternating earns five over one plus delta, which beats cooperation until delta reaches two thirds, T minus R over R minus S. The Reasoner does not trust the algebra. It plays all thirty-two deterministic memory-one strategies against grim and against tit for tat at every delta, and finds the same two thresholds, a half and two thirds, with alternation the best reply from a quarter up to two thirds. Axelrod called this the shadow of the future. When it is long enough, cooperation needs no sovereign: each player's own future is the hostage.
How much can the shadow of the future hold up? Plot every pair of average payoffs the two players could get by mixing the four outcomes over time: a kite, with corners at mutual cooperation, three and three, mutual defection, one and one, and the two exploitations. Neither player can be held below one, which she can guarantee herself by always defecting: her minmax. The folk theorem, so called because game theorists knew it before anyone published it, says that every feasible pair giving each player more than her minmax is an equilibrium of the repeated game, if the players are patient enough. James Friedman proved in 1971 that payoffs better for everyone than a Nash equilibrium can be held up by the threat of returning to it; Drew Fudenberg and Eric Maskin extended it in 1986 to everything above the minmax. The Reasoner builds the equilibria. A plan is a cycle of outcomes, up to seven rounds long, repeated for ever, with any deviation punished by mutual defection for ever after. For each of the hundred and fifty-six payoff points such plans reach, it finds the least patience that makes the plan self-enforcing. Mutual cooperation needs a half. Points crowding the minmax lines need the most, up to point nine five. And a surprise: taking turns, I am exploited this round and you the next, needs only a quarter. It is worse for both than cooperating, two and a half against three, yet easier to keep, because the only temptation is to refuse your turn to lose, which gains one point now and forfeits every turn to win. So the folk theorem is a triumph and an embarrassment. Repetition can sustain cooperation; it can also sustain almost anything, including grossly unequal conventions. Which equilibrium a society lands in is the selection problem, and the rest of this part is about the forces that select: tournaments, evolution and bargaining.
In 1980 Robert Axelrod invited game theorists to submit programs to play the repeated prisoner's dilemma against each other. The winner, submitted by Anatol Rapoport, was the shortest. Tit for tat: cooperate first, then copy the other's last move. The Reasoner assembles a zoo of nine strategies. Generous tit for tat forgives a defection a third of the time. Win-stay lose-shift, also called Pavlov, repeats its move after a good outcome and switches after a bad one. Grim never forgives; tit for two tats retaliates only after two defections. Joss, from the first tournament, plays tit for tat but sneaks in a defection a tenth of the time. And the unconditional strategies. Every pair plays two hundred rounds, twenty times over.
Without noise, the results echo Axelrod's. The top six places go to nice strategies, those never first to defect: tit for two tats, generous tit for tat, grim, win-stay lose-shift, tit for tat and always cooperate. Always defect and Joss come last: Joss's occasional betrayal sets off long feuds with every retaliator. Axelrod drew four lessons: be nice, retaliate, forgive, and be clear enough that others can learn what you are doing.
Real players make mistakes. The Reasoner flips each intended move with probability five percent. Win-stay lose-shift rises to first place. Tit for tat falls to fifth: between two tit for tat players, one accidental defection starts an echo, each retaliating for the other's retaliation. Always cooperate falls to last, exploited by everyone. Martin Nowak and Karl Sigmund showed in 1993 why win-stay lose-shift does well: after a mutual defection it returns to cooperation, so it corrects mistakes that tit for tat cannot. Which strategy is best depends on the environment.
Axelrod also ran an ecological tournament: strategies reproduce in proportion to their scores. Here is the noisy zoo over sixty generations, each band a strategy's share of the population. Always defect shrinks from the start: among retaliators it finds few victims. Always cooperate, exploited by everyone, shrinks with it; grim, which never forgives an accident, falls from a ninth of the population to almost nothing; Joss and random fade. The river ends dominated by two forgiving strategies: generous tit for tat with forty four percent, and win-stay lose-shift with thirty six. In a noisy world, the strategies that survive are nice, retaliatory, and quick to forgive.
What it establishes: Friedman (1971); Fudenberg and Maskin (1986); Axelrod (1980, 1984); Nowak and Sigmund (1993).; Computed on screen: 32 memory-one strategies against grim and tit for tat; the folk theorem's patience map; nine strategies with and without noise; the ecological river
7Zero-determinant strategiesResearch3 min
In 2012 the physicist William Press and the mathematician Freeman Dyson found something every game theorist had missed. A memory-one strategy gives the probability of cooperating after each of the four outcomes of the last round. Tit for tat is one, zero, one, zero; win-stay lose-shift is one, zero, zero, one. Two such strategies turn the repeated game into a Markov chain on the four outcomes. Each player's long-run payoff is the chain's stationary distribution, dotted with that player's payoffs.
Their insight is a determinant. The dot product of the stationary distribution with any payoff vector f can be written as a ratio of two determinants. One column of those determinants depends only on player X's strategy. If X sets that column to a combination of the two players' payoff vectors and the vector of ones, the numerator vanishes, and X has forced a linear relation between the two long-run scores, whatever Y does. One choice makes X an extortioner: X's surplus over the punishment payoff is three times Y's. With the usual payoffs, that strategy cooperates with probability eleven thirteenths after mutual cooperation, a half after being exploited, seven twenty sixths after exploiting, and never after mutual defection.
The Reasoner checks the claim. Against two thousand random memory-one opponents, the extortioner's surplus over one is always three times the opponent's: the ratio ranges from two point nine nine nine nine eight to exactly three, the difference being the tiny error added to keep the chain well behaved. A different zero-determinant strategy, an equalizer, sets the opponent's score to exactly two, whatever the opponent does. No strategy of Y's escapes the relation. One player, with memory of a single round, controls a linear constraint on both scores.
Is extortion a winning strategy, then? Head to head, the extortioner never scores less than its opponent. Against always cooperate it earns three point seven three to one point nine one. But against tit for tat both earn one, and two extortioners earn one each: the extortioner wins every match and loses the tournament. Alexander Stewart and Joshua Plotkin showed in 2013 that in evolving populations it is the generous zero-determinant strategies, which concede the larger share to the other, that prosper. And Christian Hilbe and colleagues found that human players facing extortioners refuse to be exploited, at a cost to both. The next chapter lets strategies evolve.
What it establishes: Press and Dyson (2012); Stewart and Plotkin (2013); Hilbe et al. (2014).; Computed on screen: extortion and equalizers against 2000 opponents
8Evolution of cooperationAdvanced2 min
Part 19 showed cooperation spreading by kin and reciprocity. Here the Reasoner asks whether it lasts. A population of fifty players, each with a memory-one strategy, plays everyone else, with one percent errors. In each step a player reproduces with probability rising with its payoff, and its offspring replaces someone at random: the Moran process. Mutations are rare, so a newcomer either takes over or dies out before the next one arrives. Then all that matters is the probability that one strategy, arriving alone, takes over another, and there is a formula for it. The population becomes a Markov chain on six strategies: always defect, always cooperate, tit for tat, win-stay lose-shift, generous tit for tat, and the extortioner.
Here is one history of three thousand mutations. The band shows which strategy rules the population, and the line below shows how much it cooperates. Always defect rules at first, until tit for tat drifts in and takes over. Tit for tat cannot hold its ground with errors, so generous tit for tat replaces it, and cooperation is high. But cooperative regimes do not last. Generous tit for tat gives way to win-stay lose-shift, which falls to defectors; now and then unconditional cooperators drift in and are exploited; and the cycle begins again. Cooperation is not an end state but a phase, which repeatedly rises and collapses.
In the long run, the chain's stationary distribution says where the population spends its time. Generous tit for tat, forty two percent, and win-stay lose-shift, twenty two. Always defect, thirty one percent. The extortioner barely appears. On average the population cooperates sixty five percent of the time. And the route out of defection runs through tit for tat: arriving alone in a population of defectors, it takes over with probability point one, five times the neutral chance; the forgiving strategies cannot invade defectors directly, but can replace tit for tat. Retaliation opens the door; forgiveness walks through it.
What it establishes: Imhof, Fudenberg and Nowak (2005); the Moran process.; Computed on screen: fixation probabilities; a sampled history; the stationary distribution
9Dividing the cakeAdvanced2 min
Brian Skyrms began his Evolution of the Social Contract, of 1996, with the simplest problem of justice. Two people divide a cake. Each demands a share: a third, a half, or two thirds. If the demands are compatible, each gets what she asked for; if they add up to more than the whole cake, both get nothing. Each pair of compatible demands that uses the whole cake is an equilibrium: half and half, but also a third against two thirds. Rationality alone does not choose the fair division. Could evolution?
The Reasoner puts the game in a population, with the replicator dynamics of Part 19. Each point of the triangle is a population: its distance from each corner says what share demands a third, a half, or two thirds. The Reasoner runs every one of one thousand seven hundred and eleven starting points to its end. Green points end with everyone demanding half. Pink points end in a mixed population of modest and greedy demanders, who waste cake whenever two greedy ones meet. Fair division wins from seventy two percent of starting points: the largest basin, but not the whole triangle. Justice, in Skyrms's account, is not guaranteed by evolution, but it is favoured.
Real people do not meet at random. Suppose that with probability e you meet someone of your own type. Fair demanders do well against each other, and greedy demanders worst of all. With no correlation, fair division wins from seventy three percent of the triangle, on a coarser grid. With e of a tenth, eighty eight percent. With a fifth, all of it. Skyrms's lesson is that the structure of interaction, who meets whom, shapes which conventions of justice evolve, a theme Part 38 returns to with Rawls.
What it establishes: Skyrms (1996).; Computed on screen: 1711 populations run to their ends; correlated encounters
10BargainingAdvanced2 min
Nash's second great paper, of 1950, asked how two people should split a surplus, if each can refuse and fall back on a disagreement point. He answered with axioms. The agreement should be efficient: nothing else better for both. Symmetric problems get symmetric solutions. Rescaling a player's utility should not change the real outcome. And removing options that were not chosen should not change the choice. Exactly one rule satisfies all four: choose the agreement that maximizes the product of the two players' gains over disagreement.
The Reasoner applies the rule. Two players split a dollar. Player one values money linearly; player two is risk averse, with the square root of what she gets. Nash's solution maximizes the product, x times the square root of one minus x: player one gets two thirds of the dollar. The risk-averse player gets less money: fearing disagreement more, she is the weaker bargainer, which some find a reason to call the solution unfair. Ehud Kalai and Meir Smorodinsky proposed in 1975 to give each player the same share of her best possible gain. Here that is the point on the diagonal, sixty two cents to player one. They keep the other axioms but replace independence of irrelevant alternatives with monotonicity. Different axioms, different fairness.
Axioms say what a fair agreement looks like. Ariel Rubinstein, in 1982, modelled the haggling itself. Two players take turns proposing splits of a dollar; each round of delay shrinks its value by a factor delta. The first mover offers the other exactly what she could get by refusing and making the next offer, so her share solves x equals one minus delta x. There is a unique subgame perfect equilibrium, and agreement is immediate. With delta a half, the first mover takes two thirds; with point nine, fifty three percent. Patience is power. As delta tends to one the split tends to a half: Ken Binmore, Rubinstein and Asher Wolinsky showed in 1986 that the Nash solution is the limit of such games. The axioms and the haggling meet.
What it establishes: Nash (1950); Kalai and Smorodinsky (1975); Rubinstein (1982); Binmore, Rubinstein and Wolinsky (1986).; Computed on screen: the two solutions; alternating offers
11The Shapley valueApplied4 min
Cooperative game theory asks what a group can achieve together, and how to share it. A game assigns a value v to every coalition. In 1953 Lloyd Shapley, who shared the Nobel prize in 2012, gave an answer. Line the players up in every possible order. Each one's marginal contribution is what the coalition gains when she arrives. Her value is the average of those contributions over all orders. It is the only rule with four properties: the values add up to what the whole group can make; interchangeable players get the same; a player who adds nothing to any coalition gets nothing; and the value of two games played together is the sum of their values. Four plausible axioms, one formula.
A small example shows what the value measures. One player holds a left glove, two hold right gloves, and a pair is worth one. Over the six orders of arrival, the left glove completes a pair in four of them, and each right glove in one. So the left glove is worth two thirds, and each right glove a sixth. A different solution, the core, asks for allocations that no coalition could improve on by going off alone. The Reasoner searches every allocation: the core here is a single point, giving the scarce left glove everything, since the two right-glove holders compete each other down to nothing. The core tracks bargaining power; the Shapley value tracks how much each player is needed.
The proof that the four axioms fix the value is short. Take a unanimity game, in which a coalition is worth one if it contains every member of some set T, and nothing otherwise. Players outside T are null, and those inside are interchangeable, so each member of T must get one over the size of T. Every game can be written as a sum of unanimity games, with weights John Harsanyi called dividends: what each coalition adds beyond its subcoalitions. Additivity then forces the formula: every coalition's dividend is shared equally among its members.
Sixty years later the Shapley value became the most used tool for explaining machine learning models. Scott Lundberg and Su-In Lee, in 2017, treated a model's input features as players, and a coalition's value as the model's prediction when only those features are known. Take the model x one plus two x two x three, at the input one one one, against a baseline of zeros. The Reasoner computes each feature's Shapley value: one, one and one, adding up to the prediction's rise of three. The dividends explain it: x one alone contributes one, and x two and x three together contribute two, which the value splits equally between them. The answer depends on the baseline, and on how the missing features are filled in. With correlated features, it can credit a variable the model never reads, as I. Elizabeth Kumar and colleagues showed in 2020. Part 41 asks what an explanation should be.
What it establishes: Shapley (1953); Gillies (1959); Harsanyi; Lundberg and Lee (2017); Kumar et al. (2020).; Computed on screen: the glove game and its core; SHAP on a tiny model
12Mechanism designApplied3 min
Mechanism design runs game theory backward. Instead of asking what players will do in a given game, it asks which game to build, so that what self-interested players do is good. Its first theorem is the revelation principle, due to Allan Gibbard and Roger Myerson among others: whatever outcome any mechanism achieves in equilibrium, some direct mechanism, which simply asks each player for her private information, achieves too, with truth-telling optimal. So designers may restrict attention to mechanisms in which honesty is a best response. Leonid Hurwicz, Eric Maskin and Myerson shared the Nobel prize in 2007 for the theory.
William Vickrey's auction of 1961 is the model. Sealed bids; the highest bid wins, but pays only the second highest. Your bid then decides only whether you win, never what you pay. Bidding above your value only adds cases where you win and pay more than the object is worth to you. Bidding below only adds cases where you lose an object you would gladly have bought at the price. So bidding your true value is a dominant strategy. The Reasoner simulates four hundred thousand auctions against a rival with a uniform value: for a bidder who values the object at point six, expected gain peaks exactly at the bid point six.
In a first-price auction the winner pays her own bid, and nobody should bid her value. Against a rival who bids half his value, the Reasoner's bidder does best by bidding half of hers: point three. Now compare the seller's revenue. With two bidders whose values are uniform, the second-price auction raises a third on average; the first-price auction, with everyone shading, raises a third as well. This is revenue equivalence, proved in general by Myerson in 1981: any two auctions that give the object to the highest value, and nothing to a bidder of the lowest value, raise the same expected revenue.
Which auction should a seller use? Myerson answered that too. Replace each bidder's value by a virtual value, which for uniform values is two v minus one. The revenue of any auction is the expected virtual value of the winner. So the seller should sell only to a bidder whose virtual value is positive: in the second-price auction, set a reserve price of a half. The Reasoner checks: without a reserve, revenue point three three three; with it, point four one six, against five twelfths in theory. A quarter more revenue, at the cost of sometimes not selling at all, even when a bidder values the object. Revenue and efficiency pull apart, and the designer has to choose.
What it establishes: Gibbard (1973); Myerson (1979, 1981); Vickrey (1961).; Computed on screen: second and first price; revenue equivalence; the optimal reserve
13Markets by designApplied3 min
Mechanism design runs the advertising behind web search. Three ad slots receive thirty, twenty and ten percent of clicks, and four advertisers value a click at ten, eight, five and two dollars. The industry's generalized second price auction charges each winner the next bid, per click. The Vickrey–Clarke–Groves mechanism instead charges each winner the harm her presence does to the others. Under the generalized auction, telling the truth is not optimal: the top bidder earns point six in the top slot but one dollar by bidding low enough to take the second. Benjamin Edelman, Michael Ostrovsky and Michael Schwarz showed in 2007 that its natural equilibrium raises exactly the revenue of the truthful mechanism, two dollars forty. Industry chose the simpler rule, and theory explained why it works.
David Gale and Lloyd Shapley's algorithm of 1962 matches students to schools. Each student lists schools in order of preference, and each school ranks students. Here are five of each, with preferences the Reasoner drew at random. In each round, every unmatched student proposes to the best school that has not yet rejected her. Each school holds on to the best proposal it has received so far, and rejects the rest. A held student can still be displaced by a better one later: acceptance is deferred. Eleven proposals later, every student has a place.
The Reasoner checks the theorems. The result is stable: no student and school both prefer each other to the partners they got. Gale and Shapley proved that deferred acceptance always finds such a matching. There are four stable matchings here, and this one is the best of them for every student: student one gets her second choice, against her fifth if the schools had proposed. No student can gain by lying about her preferences: the Reasoner tries all hundred and twenty orderings for each of the five, and none helps. But school A can gain by misreporting its ranking. Alvin Roth proved in 1982 that no stable mechanism is strategy-proof for both sides at once.
These ideas run real institutions. American medical graduates are matched to hospitals by deferred acceptance, redesigned by Alvin Roth and Elliott Peranson in 1999. Boston and New York replaced school assignment rules that rewarded strategic families with deferred acceptance in the early 2000s. And a patient with a willing but incompatible kidney donor can swap with another such pair, or join a chain of exchanges, found by integer programming over thousands of pairs. Roth also studied repugnance: some markets, like paying for kidneys, are blocked not by inefficiency but because people find them wrong. Roth and Shapley shared the Nobel prize in 2012. Designing institutions so that self-interest serves everyone is Hobbes's project, made into engineering.
What it establishes: Edelman, Ostrovsky and Schwarz (2007); Gale and Shapley (1962); Roth (1982, 2007).; Computed on screen: GSP against VCG; deferred acceptance, its stability and incentives
14The social contractAdvanced3 min
Four claims about the dilemma cannot all be true. Each player chooses what is best for herself. In a one-shot dilemma, defecting is best whatever the other does. Mutual cooperation is better for both than mutual defection. And if all choose rationally, they cannot all end up worse off than they could have been. The first two make both defect; the third says that leaves both worse off; the fourth says rationality cannot do that. Deny the first: people care about others and about fairness, as Amartya Sen argued against the rational fool in 1977, and as Ernst Fehr and Klaus Schmidt modelled in 1999. Deny the second: David Gauthier's constrained maximizers, Douglas Hofstadter's superrational players and functional decision theory's twins cooperate, as rationality itself. Or accept that individual rationality can be collectively self-defeating, with Hobbes, and with Derek Parfit, who made that idea central to Reasons and Persons. Then the remedy is not a better theory of choice, but a better game. Nobody denies the third.
Game theory reshaped the social contract tradition. David Gauthier's Morals by Agreement, of 1986, argued that morality is what rational bargainers would agree to, and that it is rational to be the kind of person who keeps such agreements. Ken Binmore's Game Theory and the Social Contract treats a society's morality as a way of selecting among the many equilibria of the repeated game of life. Skyrms's conventions of justice evolve, shaped by who meets whom. And John Rawls, whom Part 38 builds, asked instead what contract people would choose behind a veil of ignorance, so that fairness, not bargaining power, decides.
The part has built four ways out of Hobbes's dilemma. Change the payoffs, with a sovereign or with Ostrom's sanctions imposed by the players themselves. Repeat the game, so that reciprocity becomes an equilibrium, and forgiving strategies inherit the population. Correlate, with a convention or a signal that reaches outcomes no Nash equilibrium can. And design the rules, so that honesty is optimal and outcomes stable. What game theory cannot say is which of the many equilibria a society should choose, and whose idea of fairness should decide. Those are the questions of ethics and justice, and the next five parts take them up.
What it establishes: Sen (1977); Gauthier (1986); Parfit (1984); Binmore; Rawls; the Price List.; Computed on screen: the dilemma's minimal conflicts
Recap, problems, and where this comes backAll tracks2 min
Let's gather what we built. Nash equilibrium, found by support enumeration, and best responses crossing. The prisoner's dilemma, the commons with up to a hundred herders, and Ostrom's sanctions. The stag hunt, its basins, and the stochastic stability of hare. The centipede, backward induction and noisy players: this part's brick in the Wall. Correlated equilibrium by linear programming, five and a quarter each. The shadow of the future, the folk theorem with the patience a hundred and fifty-six plans need, Axelrod's tournaments with noise, the population river, and extortion checked two thousand times. Evolution with rare mutations, and fair division from seventy two percent of the simplex. Bargaining, the Shapley value and SHAP, auctions, sponsored search and matching.
The Reasoner has a new module, games. It finds Nash equilibria, solves the commons and the stag hunt, runs the centipede backward with noisy players, finds correlated equilibria by linear programming, measures the patience a repeated game needs, plays tournaments with noise, turns memory-one strategies into Markov chains, evolves populations with rare mutations, computes basins of fair division, bargaining solutions and Shapley values, and checks auctions and matchings for truthfulness and stability. And the Wall has its thirty fourth brick.
Six problems, with full solutions in this part's notes. The equilibria of rock paper scissors; the commons in the limit; the discount factor that sustains cooperation; an extortioner with a different ratio; the Shapley value of a unanimity game; and honesty in deferred acceptance. Pause here, and try them.
Where this comes back. Aggregating welfare, with Harsanyi and the utilitarians and their contractualist critics, in Part 35. Fairness across generations, in Part 36. Norms that evolve, and whether they bind, in Part 37. The original position and justice as fairness, in Part 38. Voting as a mechanism, with Arrow and the Gibbard–Satterthwaite theorem, in Part 39. And Shapley values in explanation, and incentives in machines, in Parts 41 and 42. Next, Part 35: the right and the good.
The books and papers this part follows are on screen, and in the notes. Thanks for watching.
Where it goes next. Harsanyi's aggregation of welfare and its contractualist critics follow in Part 35, and fairness across generations in Part 36. Evolved norms return in Part 37, the original position in Part 38, voting as a mechanism in Part 39, and Shapley values and incentives in machines in Parts 41 and 42.
Key results
The part's results in one place, for revision.
Try it
Lab 34 · Extortion on a line, equilibria by enumeration, and patience
Build the zero-determinant extortioner for ratios 2, 3 and 5 from Press and Dyson's formula, play each against 400 random memory-one opponents and check that (s_X - P) = chi (s_Y - P) every time; verify the support-enumeration equilibria by checking every pure deviation; and find the patience grim trigger and tit for tat need.
python -m videos.philosophy.labs 34
needs numpy, scipy, matplotlib · download lab34.py ·
source on GitHubchi = 2: p = (0.889, 0.500, 0.333, 0.000) (s_X - P)/(s_Y - P) from 1.99998 to 2.00000 over 400 opponents
chi = 3: p = (0.846, 0.500, 0.269, 0.000) (s_X - P)/(s_Y - P) from 3.00000 to 3.00000 over 399 opponents
chi = 5: p = (0.810, 0.500, 0.214, 0.000) (s_X - P)/(s_Y - P) from 4.99999 to 5.00000 over 399 opponents
an ordinary strategy (0.9, 0.5, 0.5, 0.1): the same ratio varies by 1.58 across opponents
the chi = 3 extortioner against itself 1.000 each (P = 1)
Nash equilibria found prisoner's dilemma: 1, matching pennies: 1, battle of the sexes: 3, stag hunt: 3, chicken: 3
a random 3 x 3 game 1 equilibria, each checked against every pure deviation
least patience for cooperation against grim, tit for tat 0.50, 0.68 on a grid of 0.02 (theory 0.500, 0.667)
A memory-one player can fix a linear relation between the two long-run scores whatever the other does: the points of 400 opponents fall on a line through (P, P) with slope chi. An opponent raises its own score only by cooperating more, which pays the extortioner chi times as much.
The code (103 lines; it asserts its own result)
"""Lab 34: build Press and Dyson's extortioner for any ratio, and check equilibria and the shadow of the future."""
import numpy as np
from videos.coursekit import labs
from explainer.philosophy.reasoner import games
TITLE = "Extortion on a line, equilibria by enumeration, and patience"
GOAL = ("Build the zero-determinant extortioner for ratios 2, 3 and 5 from Press and Dyson's formula, play each "
"against 400 random memory-one opponents and check that (s_X - P) = chi (s_Y - P) every time; verify the "
"support-enumeration equilibria by checking every pure deviation; and find the patience grim trigger and "
"tit for tat need.")
TASKS = [
"Add 0.05 to the extortioner's p_DD (it now sometimes cooperates after mutual defection). How far do the "
"opponents' points leave the line?",
"Play the chi = 3 extortioner against itself and against tit for tat. Who gets what, and why does an "
"extortioner lose a tournament it never loses a match in?",
"Change the payoffs to (T, R, P, S) = (4, 3, 1, 0) in games.PD and rerun. Which thresholds for grim and tit "
"for tat move, and to what?",
]
T, R, P, S = (games.PD[k] for k in "TRPS")
def extortioner(chi, share=0.5):
"""p = (p_CC, p_CD, p_DC, p_DD) with p~ = phi [(S_X - P) - chi (S_Y - P)]; phi is `share` of its largest value."""
phi = share / ((T - P) * chi + (P - S))
return [1 - phi * (chi - 1) * (R - P), 1 - phi * ((P - S) + chi * (T - P)), phi * ((T - P) + chi * (P - S)), 0.0]
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
opponents = rng.random((400, 4))
clouds = {}
for chi in (2, 3, 5):
p = extortioner(chi)
pts = np.array([games.payoffs_memory_one(p, q) for q in opponents])
ok = np.abs(pts[:, 1] - P) > 1e-3
ratio = (pts[ok, 0] - P) / (pts[ok, 1] - P)
clouds[chi] = pts
lab.row(f"chi = {chi}: p = ({', '.join(f'{v:.3f}' for v in p)})",
f"(s_X - P)/(s_Y - P) from {ratio.min():.5f} to {ratio.max():.5f} over {ok.sum()} opponents")
assert np.all(np.abs(ratio - chi) < 1e-4), "the extortioner enforces its ratio against every opponent"
assert np.all(pts[:, 0] >= pts[:, 1] - 1e-6), "and never scores less than its opponent"
zd = games.zero_determinant(n_opponents=200, seed=2012 + seed)
assert np.allclose(extortioner(3), [11 / 13, 1 / 2, 7 / 26, 0]) and np.allclose(extortioner(3), zd["extortioner"],
atol=1e-4)
assert abs(zd["equalized_min"] - 2) < 1e-4 and abs(zd["equalized_max"] - 2) < 1e-4, "the equalizer pins s_Y at 2"
plain = np.array([games.payoffs_memory_one([0.9, 0.5, 0.5, 0.1], q) for q in opponents])
spread = np.ptp((plain[:, 0] - P) / (plain[:, 1] - P))
lab.row("an ordinary strategy (0.9, 0.5, 0.5, 0.1): the same ratio", f"varies by {spread:.2f} across opponents")
lab.row("the chi = 3 extortioner against itself", f"{zd['against_itself']:.3f} each (P = {P})")
assert spread > 0.5 and abs(zd["against_itself"] - P) < 0.01
counts = {}
for name, (A, B, _) in games.GAMES.items():
A, B = np.array(A, float), np.array(B, float)
eqs = games.nash_equilibria(A, B)
counts[name] = len(eqs)
for e in eqs: # no pure deviation gains: enough, since a mixed deviation is an average of pure ones
x, y = np.array(e["row"]), np.array(e["col"])
assert np.max(A @ y) <= x @ A @ y + 1e-3 and np.max(x @ B) <= x @ B @ y + 1e-3, name
lab.row("Nash equilibria found", ", ".join(f"{k}: {v}" for k, v in counts.items()))
assert counts == {"prisoner's dilemma": 1, "matching pennies": 1, "battle of the sexes": 3, "stag hunt": 3,
"chicken": 3}
A, B = rng.normal(size=(3, 3)), rng.normal(size=(3, 3))
eqs = games.nash_equilibria(A, B)
for e in eqs:
x, y = np.array(e["row"]), np.array(e["col"])
assert np.max(A @ y) <= x @ A @ y + 1e-3 and np.max(x @ B) <= x @ B @ y + 1e-3
lab.row("a random 3 x 3 game", f"{len(eqs)} equilibria, each checked against every pure deviation")
assert len(eqs) % 2 == 1, "a nondegenerate game has an odd number of equilibria, so at least one"
deltas = np.round(np.arange(0.40, 0.801, 0.02), 2)
sh = games.shadow(deltas)
lab.row("least patience for cooperation against grim, tit for tat",
f"{sh['grim']['threshold_grid']:.2f}, {sh['tft']['threshold_grid']:.2f} on a grid of 0.02 "
f"(theory {sh['grim']['threshold']:.3f}, {sh['tft']['threshold']:.3f})")
assert sh["grim"]["threshold_grid"] == 0.5 and 0.66 <= sh["tft"]["threshold_grid"] <= 0.68
lab.note = ("A memory-one player can fix a linear relation between the two long-run scores whatever the other "
"does: the points of 400 opponents fall on a line through (P, P) with slope chi. An opponent "
"raises its own score only by cooperating more, which pays the extortioner chi times as much.")
fig, ax = labs.figure(2, size=(11.5, 4.4))
for chi, color in ((2, labs.BLUE), (3, labs.GOLD), (5, labs.RED)):
ax[0].scatter(clouds[chi][:, 1], clouds[chi][:, 0], s=6, color=color, label=f"extortioner, chi = {chi}")
ax[0].scatter(plain[:, 1], plain[:, 0], s=6, color=labs.MUTED, alpha=0.6, label="(0.9, 0.5, 0.5, 0.1)")
ax[0].plot([0, 5], [0, 5], color=labs.GRID, lw=1)
ax[0].set(title="400 random opponents against four strategies", xlabel="opponent's score s_Y",
ylabel="the strategy's score s_X")
ax[0].legend(loc="upper left")
for key, label, color in (("cooperate", "cooperate for ever", labs.GREEN),
("always_defect", "defect for ever", labs.RED),
("alternate", "alternate D, C", labs.GOLD)):
ax[1].plot(deltas, sh["curves"][key], color=color, label=label)
ax[1].plot(deltas, sh["tft"]["best"], "o", ms=3, color=labs.INK, label="best of the 32 strategies")
ax[1].axvline(2 / 3, color=labs.MUTED, ls=":")
ax[1].set(title="Replies to tit for tat, by patience", xlabel="discount factor delta",
ylabel="normalized discounted payoff")
ax[1].legend(loc="upper right")
lab.fig = fig
return lab
Now change it
- Add 0.05 to the extortioner's p_DD (it now sometimes cooperates after mutual defection). How far do the opponents' points leave the line?
- Play the chi = 3 extortioner against itself and against tit for tat. Who gets what, and why does an extortioner lose a tournament it never loses a match in?
- Change the payoffs to (T, R, P, S) = (4, 3, 1, 0) in games.PD and rerun. Which thresholds for grim and tit for tat move, and to what?
Problems, with solutions
Try each problem before opening its solution.
-
Find every Nash equilibrium of rock–paper–scissors, and prove there are no others.
Solution
There is exactly one: both players mix rock, paper and scissors with probability \(1/3\) each. It is an equilibrium, since against a uniform mix every action earns 0, so nothing does better. For uniqueness: the game is zero-sum and symmetric, so its value is 0, and in any equilibrium each player's strategy \(p\) guarantees at least 0 against every pure reply. Against rock, paper and scissors that means \(p_P - p_S \ge 0\), \(p_S - p_R \ge 0\) and \(p_R - p_P \ge 0\). The three left sides add to 0, so each is 0, and \(p_R = p_P = p_S = 1/3\). The same holds for the other player.
-
In the commons, show that total grazing tends to a − c as n → ∞.
Solution
In the film's model each of \(n\) herders grazes \(x_i\) cows, each worth \(a - X\) (with \(X\) the total) and costing \(c\). Herder \(i\) maximizes \(x_i(a - X - c)\); setting the derivative to zero gives \(a - X - c - x_i = 0\). In the symmetric equilibrium \(x_i = (a - c)/(n + 1)\), so the total is \(X = n(a - c)/(n + 1)\), which tends to \(a - c\) as \(n \to \infty\): the herd at which the last cow is worth exactly its cost, and the pasture's surplus is gone. The welfare-maximizing total is \((a - c)/2\).
-
For what discount factor does grim trigger sustain cooperation in the repeated dilemma? (δ ≥ 1/2.)
Solution
Grim trigger: cooperate until the other defects, then defect forever. Against it, cooperating forever is worth \(R/(1 - \delta) = 3/(1 - \delta)\); the best deviation, defecting now and then facing punishment, is worth \(T + \delta P/(1 - \delta) = 5 + \delta/(1 - \delta)\). Cooperation is sustained when \(3 \ge 5(1 - \delta) + \delta\), that is \(\delta \ge 1/2\).
-
Derive the extortionate strategy for χ = 2 with (T, R, P, S) = (5, 3, 1, 0).
Solution
Write \(X\)'s payoffs over (CC, CD, DC, DD) as \(S_X = (3, 0, 5, 1)\) and \(Y\)'s as \(S_Y = (3, 5, 0, 1)\). Press and Dyson: a memory-one strategy \(p\) enforces \(S_X - P = \chi(S_Y - P)\) when \(p - (1, 1, 0, 0) = \varphi\,[(S_X - P) - \chi(S_Y - P)]\). With \(\chi = 2\): \((2, -1, 4, 0) - 2(2, 4, -1, 0) = (-2, -9, 6, 0)\). So \(p = (1 - 2\varphi,\ 1 - 9\varphi,\ 6\varphi,\ 0)\), a valid strategy for \(0 < \varphi \le 1/9\); at \(\varphi = 1/9\), \(p = (7/9, 0, 2/3, 0)\). Whatever \(Y\) does, \(X\)'s surplus over mutual defection is twice \(Y\)'s.
-
Show that the Shapley value of a unanimity game on T gives 1/|T| to each member.
Solution
In the unanimity game \(v(S) = 1\) if \(T \subseteq S\) and 0 otherwise. A player outside \(T\) never changes any coalition's value, so the null-player axiom gives them 0. Any two members of \(T\) are interchangeable in every coalition, so symmetry gives them equal shares. Efficiency makes the shares sum to \(v(N) = 1\). So each member of \(T\) gets \(1/|T|\). (Directly: a member's marginal contribution is 1 exactly when they are the last of \(T\) to arrive, which happens in a fraction \(1/|T|\) of orderings.)
-
Prove that no student can gain by misreporting in deferred acceptance with two schools.
Solution
Let student \(i\) truly prefer school A to school B. If truthful deferred acceptance gives her A, there is nothing to gain. Otherwise A rejected her: at some step A held \(q_A\) students it ranks above her. Any misreport either keeps A first, or ranks B first, or drops a school. Keeping A first changes nothing that A sees. Ranking B first or dropping A only removes her from A's pool and can add her to B's; adding her to B can make B reject someone else, who then applies to A. Proposals to A from others never decrease, so A still holds at least \(q_A\) students it prefers, and she cannot get A. And she cannot do better at B: truthful DA already gives her the best school she can get in any stable matching. (Dubins and Freedman's theorem: student-proposing DA is strategy-proof for students, with any number of schools.)
Notes and sources
About this partfrom its README
Part 34 of Philosophy, Built (series plan, syllabus), in Act VII, Value: what happens when choices meet, from Hobbes's state of nature to the design of markets. Hobbes (1651). Nash equilibrium (1950), defined, found by support enumeration on five games (the prisoner's dilemma, matching pennies, the battle of the sexes, the stag hunt, chicken), and drawn as best-response correspondences crossing three times (Kakutani 1941); PPAD-completeness (Daskalakis, Goldberg and Papadimitriou; Chen and Deng 2006). The prisoner's dilemma (Flood and Dresher 1950; Tucker) and Hobbes's state of nature read as one (Gauthier, Kavka, Hampton); Hardin's commons (1968) as a Cournot game, where welfare falls to a third of the best with 10 herders and 4% with 100; Ostrom (1990), with a public goods game in which contributions collapse to 5% without sanctions and hold at 96% with monitored, graduated fines. Rousseau's stag hunt (1755): basins of 3/4 and 1/4, payoff against risk dominance (Harsanyi and Selten 1988), and stochastic stability (Kandori, Mailath and Rob 1993): 99% of the time at all-hare. The centipede (Rosenthal 1981): backward induction takes at once, (3.2, 0.8) when (204.8, 51.2) was on offer; noisy best responses pass early and take late (McKelvey and Palfrey); the paradox of backward induction (Binmore, Bicchieri, Reny; Aumann 1995; Stalnaker 1998), and the Wall's thirty-fourth brick. Correlated equilibrium (Aumann 1974) on chicken: a traffic light gives 5 each, and the best correlated equilibrium, by linear programming, 5.25 against the Nash 4.67; Hart and Mas-Colell (2000); Hume, Lewis and Gintis on conventions. The shadow of the future: all 32 deterministic memory-one strategies, played against grim and tit for tat at every discount factor, give the thresholds δ ≥ 1/2 and δ ≥ 2/3, with alternation the best reply in between; the folk theorem (Friedman 1971; Fudenberg and Maskin 1986), with the least patience each of 156 cyclic plans needs under grim trigger: mutual cooperation 1/2, taking turns only 1/4, points near the minmax up to 0.95; and the selection problem. Axelrod's tournaments (1980) rerun with nine strategies: without noise the nice strategies take the top six places; with 5% noise win-stay lose-shift wins (Nowak and Sigmund 1993); the ecological tournament as a population river, ending with generous tit for tat 44% and win-stay lose-shift 36%. Press and Dyson's zero-determinant strategies (2012), derived and checked: the extortioner (11/13, 1/2, 7/26, 0) holds (s_X − 1)/(s_Y − 1) = 3 against 2000 random opponents and the equalizer fixes the opponent at 2; the extortioner wins every match and loses the tournament (Stewart and Plotkin 2013; Hilbe et al. 2014). Evolution with rare mutations (Imhof, Fudenberg and Nowak 2005): 3000 mutation events in a population of 50; generous tit for tat 41.8%, always defect 30.8%, win-stay lose-shift 21.8%; cooperation 65%; tit for tat as the stepping stone out of defection. Skyrms's Nash demand game (1996): fair division wins from 1239 of 1711 starting points on the simplex (72%), and from all of them once encounters are correlated with e = 0.2. Bargaining: Nash's axioms and solution (2/3 against a risk-averse partner), Kalai–Smorodinsky (0.618), Rubinstein's alternating offers (1/(1 + δ)) and their Nash limit (Binmore, Rubinstein and Wolinsky 1986). The Shapley value (1953): the axioms, the glove game (2/3, 1/6, 1/6, against the core's (1, 0, 0)), uniqueness by Harsanyi dividends, and SHAP (Lundberg and Lee 2017) with its limits (Kumar et al. 2020). Mechanism design: the revelation principle; Vickrey's auction (1961), with truthful bidding optimal; first-price shading and revenue equivalence; Myerson's optimal reserve (5/12); GSP against VCG (Edelman, Ostrovsky and Schwarz 2007); Gale–Shapley deferred acceptance (1962), run on five students and schools, stable, student-optimal among four stable matchings, and strategy-proof for students but not schools (Roth 1982); residency, school choice and kidney exchange. The social contract: a Price List for the dilemma (other-regarding preferences; cooperative rationality; collectively self-defeating rationality), Gauthier (1986), Binmore, Skyrms and Rawls, and four ways out.
The worked model results are computed by the Reasoner's new module explainer/philosophy/reasoner/games.py (with prop
for the Price List), tested in tests/philosophy/test_games.py and cached by compute.py.
Chapter notes
| # | Scene | What it establishes | Computed on screen |
|---|---|---|---|
| 0 | Hook |
Hobbes (1651); four questions; the plan. | — |
| 1 | Nash |
Nash (1950); Kakutani (1941); PPAD (2006). | support enumeration on five games; best responses crossing |
| 2 | Commons |
Flood and Dresher (1950); Hobbes; Hardin (1968); Ostrom (1990). | the commons for 1 to 100 herders; a public goods game with sanctions |
| 3 | StagHunt |
Rousseau (1755); Harsanyi and Selten (1988); Skyrms (2004); Kandori, Mailath and Rob (1993). | basins; stochastic stability |
| 4 | Centipede |
Rosenthal (1981); McKelvey and Palfrey; Aumann (1995); Stalnaker (1998); the Wall's thirty-fourth brick. | backward induction; noisy best responses |
| 5 | Correlated |
Aumann (1974); Hart and Mas-Colell (2000); Hume (1739); Lewis (1969); Gintis. | the best correlated equilibrium, by linear programming |
| 6 | Axelrod |
Friedman (1971); Fudenberg and Maskin (1986); Axelrod (1980, 1984); Nowak and Sigmund (1993). | 32 memory-one strategies against grim and tit for tat; the folk theorem's patience map; nine strategies with and without noise; the ecological river |
| 7 | ZD |
Press and Dyson (2012); Stewart and Plotkin (2013); Hilbe et al. (2014). | extortion and equalizers against 2000 opponents |
| 8 | Evolution |
Imhof, Fudenberg and Nowak (2005); the Moran process. | fixation probabilities; a sampled history; the stationary distribution |
| 9 | Skyrms |
Skyrms (1996). | 1711 populations run to their ends; correlated encounters |
| 10 | Bargaining |
Nash (1950); Kalai and Smorodinsky (1975); Rubinstein (1982); Binmore, Rubinstein and Wolinsky (1986). | the two solutions; alternating offers |
| 11 | Shapley |
Shapley (1953); Gillies (1959); Harsanyi; Lundberg and Lee (2017); Kumar et al. (2020). | the glove game and its core; SHAP on a tiny model |
| 12 | Auctions |
Gibbard (1973); Myerson (1979, 1981); Vickrey (1961). | second and first price; revenue equivalence; the optimal reserve |
| 13 | Markets |
Edelman, Ostrovsky and Schwarz (2007); Gale and Shapley (1962); Roth (1982, 2007). | GSP against VCG; deferred acceptance, its stability and incentives |
| 14 | Contract |
Sen (1977); Gauthier (1986); Parfit (1984); Binmore; Rawls; the Price List. | the dilemma's minimal conflicts |
| 15 | Outro |
recap; the Reasoner's module; the Wall; problems; payoffs; references. | — |
Notes
The folk-theorem plans are cycles of up to seven outcomes, each deviation punished by mutual defection for ever (Nash reversion); the patience shown for a payoff point is the least over all plans reaching it, on a grid of 0.001. The centipede's noisy best response is a logit rule on relative gains, in the spirit of McKelvey and Palfrey's quantal response equilibrium rather than their exact model. The public goods dynamics are imitation with mutation inside groups of four. The Skyrms basin is computed on an interior grid of the simplex (step 1/60; 1/40 for the correlated runs).
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hobbes's state of nature as a prisoner's dilemma; the Leviathan as a mechanism.
- Nash equilibrium: definition; existence via Kakutani, sketched with best-response correspondences crossing.
- The prisoner's dilemma and the tragedy of the commons; Ostrom's commons governance (and her design principles).
- Rousseau's stag hunt: payoff vs risk dominance; equilibrium selection.
- Backward induction and the centipede game; the paradox (Binmore, Bicchieri, Aumann 1995 on common knowledge of rationality).
- Correlated equilibrium (Aumann 1974); conventions and traffic lights.
- The iterated prisoner's dilemma and Axelrod's tournaments (1980). Built: a strategy zoo (TFT, Grim, Pavlov, Joss, Random, generous TFT …) rerun with noise; results with seeds.
- Press and Dyson (2012): zero-determinant strategies, derived and played; the evolutionary response (Stewart and Plotkin).
- Evolutionary game theory (callback to Part 19): replicator dynamics for the iterated PD; cooperation's rise and collapse.
- Skyrms's Evolution of the Social Contract: the Nash demand game; basins of attraction of fair division, computed.
- Bargaining: Nash's axioms and solution, derived; Kalai–Smorodinsky; Rubinstein's alternating offers.
- Cooperative games: the core; the Shapley value from its axioms, with uniqueness proved. Industry: SHAP in ML explanation (and its limits; callback in Part 41).
- Mechanism design: the revelation principle; Vickrey and VCG truthfulness, proved; Myerson's optimal auction.
- Industry: ad auctions (GSP vs VCG), spectrum auctions, kidney exchange (Roth), school choice (Gale–Shapley deferred acceptance, built, with its stability and strategy-proofness for proposers).
- Recap and Problems.
Built: reasoner.games (equilibria of bimatrix games via support enumeration; tournaments; ZD strategies;
replicators; Shapley; VCG; Gale–Shapley).
Wall: the PD (individual rationality leads to a collectively worse outcome); the paradox of backward induction.
Visuals: the tournament as a population river; Kakutani's correspondences crossing; Skyrms's basins on a simplex;
the deferred-acceptance proposals rippling.
References: Osborne and Rubinstein; Binmore, Game Theory and the Social Contract; Skyrms, Evolution of the
Social Contract and The Stag Hunt; Axelrod, The Evolution of Cooperation; Nisan et al., Algorithmic Game
Theory; Roth, Who Gets What — and Why.
Build the film
python -m videos.philosophy.philosophy34.compute # the part's numbers, into .cache/philosophy34
python tools/build.py philosophy34 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py philosophy34 Hook # one chapter, silent, with a contact sheet
Scenes: videos/philosophy/philosophy34. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.philosophy.philosophy34.compute # every computed item (seconds; .cache/philosophy34)
python tools/build.py philosophy34 -q l # 480p preview
python tools/build.py philosophy34 # 1080p30 -> renders/philosophy34.mp4
python tools/qa_scene.py philosophy34 ZD # one chapter, silent, with a contact sheet