These shapes are just a little bit biased — they're fine being a minority, but unhappy if none of their neighbors are like them. Click unhappy shapes to move them, or watch the simulation run. Notice what happens to the overall pattern.
This simulation is based on Thomas Schelling's 1971 model of residential segregation. Schelling showed that even a very mild individual preference — "I just don't want to be the only one of my kind on the block" — can produce near-complete segregation at the neighbourhood level, with no one intending that outcome.
When unhappy shapes move to empty spots, they make some of their new neighbours happier (same type) and some of their old neighbours less happy (removed a same-type presence). This creates a cascade: each individual satisfying their small preference nudges others toward unhappiness, triggering further moves. The pattern self-amplifies until shapes cluster into same-type patches.
The final segregated state does not reflect anyone's preference for segregation. No shape "wants" a segregated world — they merely want a few same-type neighbours. Yet the aggregate outcome of individually reasonable choices produces a collectively unreasonable result. This is called an emergent property: a macro-level pattern that no individual intended or even desired.
Schelling also showed the asymmetry in undoing segregation: to reverse it, shapes must actively prefer integration — not just tolerate it. Passive tolerance of diversity is not enough to break up clusters that formed from mild bias. Active structural changes (e.g., open housing policies, zoning reform) are required to produce integrated stable equilibria.