In 1971, economist Thomas Schelling showed that residential segregation can emerge even when every individual agent has only a mild preference for living near some neighbors of their own type — no strong bigotry required. Each cell on this grid is a house occupied by an agent from Group A, Group B, or left empty. Every step, unhappy agents (those whose same-type share among their neighbors falls below their tolerance threshold) move to a random empty lot.
Schelling's original 1971 paper used only coins and graph paper, yet it became one of the founding results of agent-based computational modeling and is still cited in debates about urban housing policy and social sorting today.
A 3D city grid of two agent types self-sorts as each agent checks its immediate neighbors and relocates when its own-type share drops below a shared tolerance threshold, turning a mild individual preference into stark large-scale segregation.
Even a tolerance as low as 30-40% same-type neighbors — a genuine minority preference, not intolerance — is enough for the local relocation rule to produce large, sharply bounded single-type blocks across the whole grid.
Adjust tolerance, grid size, and vacancy rate, then watch unhappy agents (highlighted lighter) relocate each step. Reshuffle the city to restart from a fresh random distribution and compare how quickly segregation emerges.
Thomas Schelling built this model by hand with coins on graph paper in 1971; it remains one of the most cited demonstrations that group-level outcomes can diverge sharply from any individual's actual intentions.