Territoriality is capable of promoting cooperative behavior (see tutorials on 2×2 games, on cooperation in structured populations as well as on public goods games) but by adding punishment opportunities, the readiness to cooperate is greatly enhanced and asocial strategies can be largely suppressed. If players additionally carry a reputation for being willing or unwilling to punish, highly cooperative and fair outcomes are achieved. This group-beneficial result is obtained, intriguingly, by making individuals more likely to exploit their co-players if they can get away with it. Thus, less cooperative individuals make more cooperative societies.


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 of set as appropriate.



Equilibrium fraction of cooperators (green) and defectors (red) as a function of the multiplication factor r in the absence of punishment. In spatially structured populations cooperators can survive by forming clusters. However, for lower r, i.e. under harsher conditions, the clustering advantage becomes insufficient to maintain cooperation and defectors take over. Conversely, for higher r the favorable effects of clustering allow cooperators to thrive and even displace defectors.



Equilibrium fraction of cooperators (green), defectors (red) and punishers (blue) as a function of the multiplication factor r. The paradoxical strategy (yellow), which defects and punishes, quickly disappears becasue its performance is particularly poor when interacting with its own type. For low r punishment is unable to change the odds in favor of cooperation and defectors rule as in the absence of punishment opportunities. However, for higher r punishment supports cooperation and actually prevents the co-existence of cooperators and defectors. The system is bi-stable and depending on the initial frequency and distribution of the strategies the population either ends up in a state with all defectors or a neutral mixture of cooperators and punishers. In the absence of defectors the latter two strategies are neutral because everybody cooperates and thus nobody gets punished. The fraction of punishers decreases for increasing r because non-punishing cooperators become better at displacing defectors on their own.



Equilibrium fraction of cooperators (green), defectors (red) and punishers (blue) as a function of the multiplication factor r. The paradoxical strategy (yellow) again quickly disappears. Adding reputation resolves the neutrality between cooperators and punishers because both strategic types may switch to defection whenever they know that thay can get away with it. For small r defectors always win but introducing reputation further lowers the threshold above which cooperators (and punishers) can survive. This is because reputation makes it more difficult for defectors to exploit cooperators. For r above the threshold, the social punishers reign. Reputation enables punishers to diminish and disperse non-punishing cooperators such that again everybody always cooperators and punishment is no longer necessary. However, the readiness to punish prevents mutant defectors from entering the population and also prevents cooperators from spreading through neutral drift.


Time evolution of the frequency of the four strategic types G1 to G4 in spatially structured populations where individuals interact only within their local neighborhood.

Color code:BullyAsocialMild
No Punishment+Click to enlarge

No Punishment

In the absence of punishment and reputation defection naturally dominates for low multiplication factors r. However, in contrast to well mixed populations, a threshold value of r is observed above which cooperators and defectors co-exist in a dynamical equilibrium. A separate tutorial on public goods games in structured populations provides a more detailed discussion of the interesting dynamics and phase transitions in this scenario.


No Punishment: Co-existence

The snapshot on the left illustrates a typical equilibrium cluster configuration of cooperators (green) in a sea of defectors (red) in absence of punishment opportunities interacting in public goods games in groups of size N = 3 with investment costs c = 1 and a multiplication factor r = 2.2. Note that in absence of spatial structure, cooperators would quickly disappear.

Click on the snapshot to start a simulation.

Punishment+Click to enlarge

With Punishment

Adding punishment opportunities after each public goods interaction changes the system's dynamics completely. The threshold value is shifted towards smaller values of r but more importantly, above this threshold the system develops a bi-stable dynamics and hence prohibts co-existence of cooperators and defectors. Depending on the initial frequency and distribution of the four strategies, the system either relaxes into a homogenous state of asocial defectors (red) or into a frozen state of cooperators with varying fractions of the social strategy (blue) and free-riders (green). The paradoxical strategy (yellow) always quickly disappears.


With Punishment: Bi-stability

The snapshot on the right shows a typical equilibrium configuration for the same parameter values as above but now including punishment opportunities. Defectors (red) have vanished and a frozen pattern of social (blue) and mild (green) players persists. The multiplication factor r lies only slightly above the threshold - thus, on smaller system sizes, stochastic fluctuations leave it quite open which one of the two final states is reached. Usually it looks at first as if the defectors will win until cooperators (and punishers) finally catch up.

Click on the snapshot to start a simulation.

Punishment & Reputation+Click to enlarge

Punishment & Reputation

As long as actions remain anonymous, free-riders are still fairly abundant and may achieve frequencies as high as 80%. By introducing reputation such that a player might know the strategical characteristics of his fellow players overwhelmingly fair outcomes are achieved. Reputation is implemented by a probability that a player obtained information about the punishment behavior of its co-players. In case she happens to be a cooperator faced with two non-punishers, she might save her cooperative effort and choose to defect because she mustn't fear punishment.


Punishment & Reputation: Fairness

The snapshot on the left depicts a typical equilibrium configuration of the lattice for public goods interactions with the same parameters as above including both punishment opportunities as well as reputation mechanisms. With a small probability of 10% the players may learn the punishment behavior of their interaction partners. The fact that it may become known whether an individual punishes or not resolves the degeneracy between the social punishers and mild cooperators. Occasionally, cooperators and punishers will defect in interactions with non-punishing cooperators, i.e. whenever he knows that he can get away with it. This improves the performance of the social punisher strategy and punishers dominates for most r. In fact, punishers may even enforce a perverted form of 'cooperation' where the costs exceed the benefits. Interestingly, the social norm prescribing the punishment of non-cooperating defectors gets more readily established by lowering the morals...

Click on the snapshot to start a simulation.

Virtual lab

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 new panel that allows to set and change various parameters concerning the game as well as the population structure. The latter displays the simulation data in different ways. Clicking on the examples below opens a new window with a larger applet and all parameters preset accordingly.

Color code:BullyAsocialMild
 New socialNew bullyNew asocialNew mild
Payoff code:Low       High

Note: The pale strategy 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 punishment and reputation. 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.
Mean frequency Time evolution of the strategy frequencies.
Simplex S4 Frequencies plotted on a manifold of the simplex S4. Mouse clicks set the initial frequencies of strategies (the manifold k is determined by the initial frequencies set on the parameter panel).
Structure - Fitness Snapshot of the spatial distribution of payoffs.
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 is restricted to the few parameters particularly related to punishment and reputation in 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 public good).
fine imposed on defecting co-player through punishment.
punishment is costly and the punisher has to bear these costs.
Rep. Mu:
reputation - probability to learn that all co-players are non-punishers and taking advantage of this knowledge by temporarily switching to defection.
Rep. Nu:
reputation - probability to learn that at least one co-players punishes and taking advantage of this information to avoid punishment by temporarily switching to cooperation.
Init coop/punish, init coop/none, init defect/punish, init defect/none:
initial fractions of the social (cooperate and punish, G1), mild (cooperate but do not punish, G4), bully/paradoxical (defect and punish, G2) and rational (defect, don't punish, G3) strategies. If this does not add up to 100%, the values are scaled accordingly.