Schelling's Segregation City

Thomas Schelling's 1971 model: a 20x20 grid holds two agent types (A and B) plus empty cells. Each round, any agent with fewer than 40% same-type occupied neighbours relocates to a random empty cell. Nobody wants a segregated city - yet a mild individual preference makes the whole city segregate. Computed live at build time by OnlyCSharp.BusinessAndEconomics.BehavioralEcon.SchellingModel.

Parameters

Initial (random) city

HappyFraction = 0.7361 SegregationIndex = 0.5080

Convergence trace

Converged after 14 rounds (a round with zero relocations).

RoundRelocationsHappyFractionSegregationIndex
1950.83610.6327
2590.89720.7125
3370.96110.7952
4140.97780.8106
580.98890.8259
640.98890.8266
740.99170.8276
830.99440.8341
920.99440.8319
1020.99440.8366
1120.99440.8316
1220.99720.8389
1311.00000.8429
1401.00000.8429

Final city

Emergent segregation - mild preference, strong effect

MetricBeforeAfterChange
HappyFraction0.73611.0000+0.2639
SegregationIndex0.50800.8429+0.3349 (65.9% rise)

Every agent only ever demanded 40% same-type neighbours to be happy - nobody wanted a segregated city. It emerged anyway, purely from thousands of local moves.