Gives roughly what the group gives, and reliably a little less. That small shortfall is the engine of everything that follows.
Put people in a group, hand each of them the same money, and let them choose how much to put into a shared pot that pays everyone back. Nearly half goes in on the first round. By the tenth it is down to a seventh. Every agent below follows one fixed rule, and unless you tell them when the game ends, not one of them can see a round number. The collapse is not scheduled. Run it and watch it happen.
Everyone gets the same endowment. You decide privately how much of it to put in the pot. The pot is multiplied and then split evenly across the whole group. The split ignores what you put in.
Everything turns on one number: m, what a single unit in the pot pays back to you personally. Keep a unit and you have 1. Contribute it and you get m back while everyone else also gets m. So the group gains m × n and you personally lose 1 − m. Both of those are true at once, and that is the entire problem.
Every unit you contribute costs you more than it returns to you. Giving nothing is your best move no matter what anyone else does.
Every unit multiplied across n people returns more than it cost. Everyone giving everything is the best outcome available to the group.
Both hold at once whenever m sits between them, and that window gets wider as the group grows. Below 1/n there is no public good worth funding. Above 1.00 contributing pays for itself and nobody has to be talked into it.
When you ask people how much they would give for every possible group average, they do not give one answer. They sort into stable types, and the types keep their shape across sessions and countries (Fischbacher et al., 2001). Each curve below is a rule for reading the room. The dashed line is exact matching: give back what you see.
Gives roughly what the group gives, and reliably a little less. That small shortfall is the engine of everything that follows.
Gives nothing, whatever anyone else does. In real sessions they still put something in early, then stop.
Matches while contributions are modest, then pulls back once the group is giving a lot. Generous up to a point, unwilling to be the most generous.
Gives everything regardless. Too few to hold an average up on their own, but enough to keep it off the floor.
Nothing in the simulator changes a type. Nobody learns, nobody gets more selfish, nobody defects. The whole population is exactly as generous in round twenty as it was in round one.
One run tells you about one group. This sweeps every combination of matching bias and free rider share, runs several groups at each, and colours the square by how much is still being contributed at the end. Amber is a group that held together. Dark is a group that emptied out.
This game is small enough to fit in a lab and old enough to have been stated in plain English before anyone could formalise it. What it measures is whether a group of people can fund something that benefits all of them when nobody can be made to pay.
Hume (1739/1978) put the whole problem in one image. Two neighbours can agree to drain a meadow they share, because each can see the other and the bargain is easy to keep. A thousand people cannot, because each of them looks for a pretext to spare himself the trouble and lay the whole burden on the others. Nothing about that observation required a payoff matrix. It required only noticing that the reasoning which is sound for one person is ruinous when everyone performs it.
Samuelson (1954) later gave the object its formal definition. A public good is non-rival and non-excludable: your use of it does not diminish anyone else's, and once it exists nobody can be kept away from it. Olson (1965) drew the consequence that made it a political problem rather than an economic curiosity. Rational, self-interested individuals will not act to achieve their common interest merely because that interest is common, and the larger the group, the worse the failure.
Hardin (1968) turned this into a doctrine. Shared resources are destroyed by the individually rational use of them, and the only exits are private ownership or coercion imposed from outside. The essay was enormously influential and, as a general empirical claim, wrong.
Ostrom (1990) spent decades documenting communities that govern shared fisheries, forests, irrigation systems and pastures for centuries without either privatisation or an external sovereign. She extracted the conditions that make it work: clear boundaries, rules matched to local circumstance, the people affected participating in setting those rules, monitoring by the users themselves, graduated sanctions, and cheap conflict resolution. The commons is not doomed. It is difficult, and the difficulty is institutional. She received the Nobel in 2009 for it.
Here is what the simulator above is really for. The obvious explanation for collapsing cooperation is that people are selfish, or that they start out hopeful and learn better. Fischbacher and Gächter (2010) tested both and found neither is the driver. What causes the collapse is that most people are conditional cooperators who want to contribute somewhat less than the people around them.
Universal free riding emerges even though most people are not free riders.
Everyone is behaving decently by their own lights. Each individual shortfall is small enough to be invisible, certainly small enough to be defensible. Iterate it across a group and the group ends at zero. There is no villain in the run, no moment of betrayal, no point at which anyone did anything they would be ashamed to explain. The shortfall alone is not quite enough to do it, either. Raise the matching bias to exact matching and the collapse only softens, from 14% to 17%. Take every free rider out of the room and leave the shortfall in place and the group still surrenders half of what it started with. It takes both, and almost every real group has both. The phase diagram above shows the whole space at once, and the belt where cooperation survives is narrow.
The rebound needs its own explanation, because it looks like it should contradict the finding above. If the decline is caused by a preference rather than by souring expectations, why does simply announcing a fresh sequence bring contributions most of the way back?
Because the two are answers to different questions. The preference governs how much of what you see you hand back, and it never changes. Expectations govern what you think you are about to see, and a restart wipes those. A conditional cooperator that has spent ten rounds matching a shrinking average falls back on its prior when the sequence is declared new, and the prior was never revised downward. The decay is preference-driven, the rebound is expectation-driven, and this model implements exactly that split.
It is a modelling choice rather than a settled fact. The competing account of the restart is strategic: in a game everyone knows is finite, cooperating early can be worth it, and a restart restores the horizon that made it worth it. You can put some weight on that reading by turning on the announced ending in the panel above, watching contributions fall away over the last three rounds, and noticing that agents who can see the clock behave very differently from agents who cannot.
People do not simply accept this. Given the chance to pay their own money to reduce a free rider's earnings, with no prospect of recovering the cost and no future interaction to protect, they take it (Fehr & Gächter, 2000, 2002). Contributions rise and stay up. This is genuinely hard to square with a model of people as self-interested, and it is one of the sturdier results in experimental economics.
But enforcement is expensive, and its benefits spill onto everyone. So a sanctioning system is itself a public good, and refusing to pay for it is a second-order free ride (Yamagishi, 1986). You can watch this appear in the simulator: turn punishment on and the contributors who never punish quietly out-earn the ones who do. The obvious fix, punishing the people who won't punish, is a third-order public good with the same structure. The regress does not terminate on its own. Reputation, indirect reciprocity, and selection between groups are the standard candidates for stopping it.
There is a further problem, and it is worse. Herrmann et al. (2008) ran punishment experiments across sixteen participant pools worldwide and found that in many of them, high contributors were punished too, sometimes as heavily as free riders. In several pools this antisocial punishment was strong enough to erase the cooperative benefit entirely. Punishment reliably helps only where norms of civic cooperation and the rule of law are already strong. As a foundation for cooperation it is closer to a symptom of a healthy society than a cause of one.
The agents here have fixed types and no memory of individuals. They cannot build reputations, form coalitions, talk to each other, leave a group, or choose the rules they play under. Communication alone lifts contributions dramatically in real experiments, and Ostrom's design principles are mostly about the institutional layer this model has no representation of. How willing a cooperator is to match what it sees is derived rather than assumed: a unit you contribute is worth m to each other person and costs you 1 − m, and the matching bias control sets how much weight an agent puts on the first against the second. That is why the return slider moves behaviour while group size barely does, which is the right way round (Isaac & Walker, 1988). Read the whole thing as a demonstration of one mechanism, cleanly isolated: what heterogeneous preferences plus imperfect matching do to a group over time, with everything else stripped out.