The polygon paradox
People are pretty tolerant. Neighbourhoods are pretty segregated.
How can both be true?
Let's play a game. Below is a little neighbourhood of blue and orange faces. Each face peeks at its eight closest neighbours and has one tiny preference: "I'd like at least some of my neighbours to be like me. Doesn't have to be most. Just, y'know, some."
A face that's happy 🙂 stays put. One that isn't 🙁 hops to a random empty spot. That's the entire rule. Now watch what happens.
Meet the neighbourhood · click a shape to inspect it
Turn one small dial…
Now let's give each shape a preference. Move the slider to say: "I'm happy if at least this fraction of my neighbours are the same colour as me."
Then hit ▶ Let them move. Every ~⅓ of a second, one unhappy face literally flies to a random empty spot — you can watch the smiles ripple through the grid. Or click ⏭ Move one to advance one shape at a time. Getting impatient? ⏩ Skip to settled fast-forwards to the final layout.
The tolerance dial
What just happened?
The trick is that "unhappy" doesn't require racism — it just requires a lower bound. Some blues will land next to too many oranges by chance. They move. Now the spot they vacated is empty; a nearby orange whose neighbourhood was fine is now surrounded by blanks — its ratio changed too. It might move. Small local moves ripple. Clusters form and, once they form, they self-reinforce because clusters are the very thing that makes agents happy.
Thomas Schelling (1971) gave us the sharp version of this: micro-motives don't equal macro-behaviour. Individually reasonable preferences aggregate into outcomes nobody wants. That's why "just being tolerant" doesn't dissolve segregation — the geometry itself is against you.
"The extreme cases are easier to understand than the mild ones… you can be color-blind and still end up in a segregated neighbourhood, because your neighbours aren't."
— Thomas Schelling, Micromotives and Macrobehavior (1978)
Slide the dial slowly
Here's the surprise. As you crank up the tolerance dial, the equilibrium segregation doesn't rise linearly. It jumps. Below ~10% almost nothing happens. Above ~50% the model can't even settle — too many shapes are permanently frustrated. In the middle band, the same rule that felt harmless produces dramatic separation.
Three tolerances, same rules
τ = 10 %
seg —
τ = 30 %
seg —
τ = 50 %
seg —
Now you play
The sandbox below has everything: grid size, empty-cell density, tolerance, colour bias, and a reset. This is where models turn into intuition — nothing beats twiddling knobs for an hour.
Sandbox
Reader's homework
- Set τ to 90% in the sandbox. The system can never settle — shapes are almost always unhappy. Does the meter still rise?
- Set density to 98% and τ to 40%. Watch how "trapped" shapes behave. This is the housing-market friction argument.
- Try tiny grids (size 15) vs bigger (size 60). Small samples get louder-looking segregation by chance — a CLT story hiding in the corner.
Related models
- 🎮 Life & Local Majority — same "local rule on a grid" family. Life produces computation; Majority freezes into clusters, same way Schelling does.
- 🕸️ Networks — segregation plays out differently when neighbours aren't adjacent cells but friends-of-friends.
- 🏔 NK rugged landscape — another agent-based model where simple local decisions lead to complex, path-dependent outcomes.