🤝 Public Goods Game & Cooperation (2D)
Run N players through repeated public-goods rounds on a live 2D chart: set the multiplier and endowment, switch strategy modes, and watch contributions, payoffs and cooperation evolve round by round.
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.
Run N players through repeated public-goods rounds on a live 2D chart: set the multiplier and endowment, switch between rational free-riding, mixed, full cooperation, costly punishment and evolutionary imitation, and watch contributions, payoffs and the cooperator share evolve round by round.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install