Social Simulations: Schelling Segregation

Orange and blue households live on a grid. An unhappy household (too few like neighbours) moves to a random empty plot. Click a cell to flip it between groups and empty.

Each household has 8 neighbours. 0.375 means it is content with 3 of 8 alike, a mild preference.
Without vacancies nobody can move. Applied on Reset.
A minority group needs lower tolerance to stay satisfied. Applied on Reset.
Speed only; does not change the outcome.

Statistics

Moves made0Happy households-Mean like-neighbour share-Grid-

Bright circles are happy, dark circles with a white ring are unhappy.

like-neighbour share happy fraction

Independent checks

The science

Schelling (1971). A household is happy if the fraction of like occupied neighbours, s = same / (same + other) over its 8 Moore neighbours, is at least the tolerance t. Unhappy households relocate to a random vacancy.

The surprise: even t = 3/8 (content in a 62% mixed street) produces a mean like-neighbour share far above the 0.5 expected for a random mix. Micro motives do not equal macro behaviour.

The check list compares the random-start mean share with its exact expectation (N_g - 1)/(N - 1) summed over groups and verifies bookkeeping with a brute-force recount.

Simplifications: two groups, square grid with wrap-around edges, random relocation with no costs or prices, no income or housing market. It shows a mechanism, it does not describe any real city.