Playground Home

Schelling Segregation Model

Agent-based simulation of emergent spatial segregation from individual preferences

Parameters
Number of groups ?
Population Groups
The number of distinct populations. Each group has its own colour and agents prefer neighbours of their own group. More groups create more complex dynamics.
2
Tolerance threshold ?
Tolerance Threshold
Minimum fraction of similar neighbours required for satisfaction. At 0.3, agents tolerate up to 70% different neighbours. Schelling's key insight: even mild preferences (0.3) produce strong segregation.
0.30
Neighbourhood radius ?
Neighbourhood Radius
How far agents look when assessing neighbours. Radius 1 = immediate 8 neighbours (Moore neighbourhood). Larger radii mean agents consider a wider area when deciding satisfaction.
1
Empty cells ?
Vacancy Rate
Percentage of cells left empty. Empty cells provide space for relocation. Local movement mode requires higher vacancy (~25–35%) to avoid gridlock.
15%
Grid size
Movement
Local movement only ?
Local Movement
When enabled, unhappy agents can only relocate to an adjacent empty cell (one step away), rather than anywhere on the grid. More realistic but requires higher vacancy to avoid gridlock.
Simulation
Speed 10 fps
Ready
Step 0
Metrics
Segregation Index ?
Segregation Index
Average fraction of same-type neighbours across all agents (0–1). Higher = more segregated. Calculated using the neighbourhood radius. Random placement yields ~1/N for N equal groups.
0.00
Unhappy Agents ?
Unhappy Agents
Agents whose same-type neighbour fraction falls below tolerance. These will attempt to relocate. Zero = equilibrium reached.
0
Stuck Agents ?
Stuck Agents
Unhappy agents that couldn't find an empty cell to move to (local movement mode only). High numbers = gridlock. Try increasing vacancy.
0
Population by Group