In an evolutionary setting of public goods interactions the dynamics of cooperators and defectors in large populations is considered. Evolutionary game theory relates payoffs and reproductive fitness such that the spreading of either strategy is determined by its average performance in game theoretical inteactions as compared to the competing strategy. In well-mixed populations the groups that engage in public goods interactions form randomly. The public goods game is characterized by the fact that, irrespective of the group composition, it is always better to defect and withhold the investment (just as in the pairwise prisoner's dilemma). The evolutionary fate of the population, i.e. the perdition of cooperators, is determined by the replicator equation (for further details see the tutorial on cooperation in structured populations for pure strategies as well as on 2×2 games).

Sample scenarios

All of the following examples and suggestions are meant as inspirations for further experimenting with the virtual lab. If your browser has JavaScript enabled, the following links open a new window containing a running lab that has all necessary parameters set as appropriate.


Time evolution of the frequency of cooperators in well-mixed populations where individuals engage in different kinds of interactions.

Color code:CooperatorsDefectors

Pairwise interactions

For pairwise encounters the public goods game reduces to the prisoner's dilemma and cooperation doomed in absence of supporting mechanisms. This holds regardless of the initial configuration. In particular, it also holds for populations with very high initial frequencies of cooperators as depicted on the left and illustrated by the corresponding simulation.


Group interactions

In public goods interactions in larger groups, the fate of cooperators is the same as in pairwise interactions (previous example) - with the only difference that the end comes quicker.


By-product mutualism

The definition of the public goods game requires that the multiplication factor r is less than the group size N (r < N) because otherwise cooperative investments have a net positive return. Nevertheless, the case r > N bears also some interest because in any mixed group defectors are still better off than cooperators - however, defectors could further increase their payoff by switching to cooperation. This represents a completely relaxed form of a social dilemma. The character of the interaction has changed - now selfish individuals choose to invest and benefits to the fellow members of the group merely occur as by-products. In that case cooperation becomes dominant and defectors vanish.

Public goods versus prisoner's dilemma games

In well-mixed populations it can be easily shown that one public goods interaction among N individuals is equivalent to N - 1 pairwise prisoner's dilemma interactions. Recall that in the prisoner's dilemma mutual cooperation pays the reward R, mutual defection yields the punishment P and a cooperator facing a defector gets the sucker's payoff S whereas the defector gets away with the temptation to defect T (for further details see the tutorials on 2×2 games and on cooperation in structured populations). Because T > R > P > S holds, defection is always the better choice, irrespective of the other player's decision. Thus, rational players will end up with the punishment P instead of the preferred reward R for mutual cooperation - hence the dilemma.

In a biological context it is convenient to express the different payoffs in terms of costs d and benefits b of cooperation. This yields R = b - d, P = 0, T = b, S = -d. If, in a group of size N with nc cooperators, every player engages with every other player in a prisoner's dilemma (N - 1 interactions) then the total payoffs for cooperators and defectors are

PC = (nc - 1) R + (N - nc) S = (nc - 1) b - (N - 1) d
PD = nc T + (N - nc - 1) P = nc b.

Comparing these formulas with the original ones for the public goods interaction, the following transformation is obtained:

b = r c / N
d =
(N - r) c / (N (N - 1)).

The fact that cooperation becomes increasingly challenging in larger groups follows from the above equivalence stating that interactions in larger groups correspond to a larger number of single prisoner's dilemma interactions, which then implies that defectors can exploit cooperators more efficiently.


The applet below illustrates the different components. Along the bottom there are several buttons to control the execution and the speed of the simulations. Of particular importance are the Param button and the data views pop-up list on top. The former opens a panel that allows to set and change various parameters concerning the game as well as the population structure, while the latter displays the simulation data in different ways.

Color code:CooperatorsDefectors
 New cooperatorNew defector
Payoff code:Low       High

Note: The yellow and green colors are very useful to get an intuition of the activitiy in the system. The shades of grey of the payoff scale are augmented by blueish and reddish shades, which indicate the payoffs for mutual cooperation and defection, respectively.

Java applet on public goods interactions. Sorry, but you are missing the fun part!
ParamsPop up panel to set various parameters.
ViewsPop up list of different data presentations.
ResetReset simulation
RunStart/resume simulation
NextNext generation
PauseInterrupt simulation
SliderIdle time between updates. On the right your CPU clock determines the update speed while on the left updates are made roughly once per second.
MouseMouse clicks on the graphics panels generally start, resume or stop the simulations.
Data views
Structure - Strategy Snapshot of the spatial arrangement of strategies. Mouse clicks cyclically change the strategy of the respective site for the preparation of custom initial configurations.
Structure - Fitness Snapshot of the spatial distribution of payoffs.
Mean frequency Time evolution of the strategy frequencies.
Mean Fitness Time evolution of the mean payoff of each strategy together with the average population payoff.
Histogram - Fitness Histogram of payoffs for each strategy.

Game parameters

The list below describes only the few parameters related to the public goods game. Follow the link for a complete list and descriptions of all other parameters e.g. referring to update mechanisms of players and the population.

multiplication factor r of public good.
cost of cooperation c (investment into common pool).
Init Coop, init defect:
initial fractions of cooperators and defectors. If they do not add up to 100%, the values will be scaled accordingly. Setting the fraction of cooperators to 100% (and the fraction of defectors to 0%), then the lattice is initialized with a symmetrical configuration suitable for observing evolutionary kaleidoscopes.