How it Works
In the public goods game, each of N players receives an endowment E and privately chooses a contribution ci ∈ [0, E]. Total contributions are multiplied by r and divided equally: every player receives r·ΣC/N regardless of their own contribution.
Payoff for player i is: πi = (E − ci) + r·Σjcj/N. The dominant strategy is ci = 0 (free-ride), giving Nash equilibrium payoff = E. If everyone cooperates fully (c = E), each gets r·E — more than E whenever r > 1. The social optimum needs r > 1, but individual rationality pulls toward 0.
In Evolutionary mode, each round every player observes one random peer and imitates their contribution level if that peer earned more — a simple replicator-dynamics rule. In Punishment mode, a subset of cooperators pay a personal cost to dock free-riders, which can flip enough of them into cooperating that the population average climbs over time.