Simulation results for the evolution of cooperation in a population of 500 individuals, subdivided into 100 interaction groups. (a) k=2; (b) k=3. Each individual in the population obtains a payoff by playing the public goods game with the other individuals in its interaction group, as described in the text. Individuals reproduce in their group in proportion to their fitness, subject to the condition that the total population size remains constant. During reproduction occasional mutations can occur, which change the investment level of the offspring. Finally, a fraction d of the individuals in each group disperses randomly to the other groups in the population (this is achieved by giving each individual a probability d of dispersing to another randomly chosen group). Initially all groups are of equal size, containing five individuals, so the public goods game in each group is a social dilemma. Starting from low initial values, cooperative investments evolve to high values, which are maintained indefinitely. The dispersal rate was set to d=0.1, and initial investments were chosen uniformly randomly between 0 and 0.5. All other parameters as in figure 1.