The spatial structure of a population is often critical for the evolution of cooperation. Here, Allen and colleagues show that when spatial structure is represented by an isothermal graph, the effective number of neighbors per individual determines whether or not cooperation can evolve.