Ask people whether they'd mind having a few neighbours who are different from them, and almost nobody says they want a divided city. Yet divided neighbourhoods are everywhere. In 1971 the economist Thomas Schelling showed, with nothing but a chequerboard and some coins, how a tiny preference can build a very large wall.
Picture a grid of houses. Each is blue or orange, and about one in ten is empty. A household is happy if at least some fraction of its neighbours (the up to eight houses around it) match its colour. If not, it moves to an empty house where it would be happy. That's the entire model. Nobody wants a segregated town, and nobody is told to make one.
blueorangeemptyunhappy (ringed)
Press Run. Then try 33%, 50% and 75%.
Start at 0% and press Run: nothing moves, and the neighbourhood stays a random mix. Now drag to about one third and run it again. Every household is content as long as it isn't outnumbered two to one, yet small clusters of one colour form and grow, because each move changes the neighbourhood of the people left behind. A mover leaves a hole in one colour and adds a house to another, and that nudges a few neighbours past their own limit.
Schelling's point was about the gap between intentions and outcomes. In a random mix, the average household has roughly half its neighbours alike. Mild preferences push that number far above what anyone asked for. In the runs I tried, a one-third rule ended with roughly 70% of neighbours alike, and a one-half rule with close to 90%. Push the slider past about two thirds and the town freezes instead: most households are unhappy, but no empty house would suit them, so nobody can move.
It helps to follow a single move. Say an orange household sits among five blue neighbours and one orange one. It is outnumbered, so it leaves. Its old street now has one fewer orange house, so any other orange household nearby sees its share fall. Meanwhile the street it joins gains an orange house, which makes the blue households there slightly more likely to feel outnumbered. Each departure raises the pressure on someone else, and the pattern ratchets in one direction. Nothing ever pushes it back, because a household that is happy simply stays.
That one-way ratchet is why the result is so robust. Change the grid size, the share of empty houses or the starting layout and you still get clusters, only with different borders.
Schelling published this as "Dynamic Models of Segregation" in the Journal of Mathematical Sociology in 1971, and he later shared the 2005 Nobel Memorial Prize in Economic Sciences, for work on conflict and cooperation. The chequerboard is a toy, and he never claimed it explained any real city. Real housing involves prices, laws, discrimination and history, and those matter enormously.
What it does show is narrower and still useful: seeing a segregated pattern doesn't prove that people in it demanded segregation. A system of many individually mild choices can produce an outcome nobody chose. Economists call this a macro pattern from micro motives, and the same logic turns up in traffic jams, fashions and stock-market swings.
Set the slider to 33% and run it to a stop. Then tap any household on the grid: the ring around it shows its neighbours, and the counter below tells you how many match. Then raise the slider by ten points and run again, and watch what happens to the clusters.