ANALYSIS TOOL BOX

Schelling Segregation Model

Watch agents with a mild preference for similar neighbors relocate until they're content — to test whether an observed pattern of clustering could arise from weak local preferences rather than strong intent or coordination.

How this technique works
What sorting are you modeling?

Any population that chooses where to sit among others — residents, firms, students, online communities, teams in an office.

Teaching Note

Each agent looks at its neighbors. If the share that belong to other factions exceeds its tolerance, it is unhappy and moves to a random empty cell. Every tolerance starts from the identical grid, so differences between panels come from tolerance alone. Watch how agents who would happily live as a minority still end up in sharply sorted clusters. Hover any cell to see its neighbors.

Start from a scenario
Preferences
Preferences
Tolerances to compare

Largest share of unlike neighbors an agent accepts. 0 = one unlike neighbor is too many; 1 = any mix is fine. Each gets its own panel.

Who counts as a neighbor

Neighbors are the eight surrounding cells, diagonals included (Moore).

Population
Population
Factions
50%
50%

Name each group and set its relative size. Up to 5 on this grid (no more than half the shorter side).

Empty cells

Share of the grid left vacant. Agents can only move into empty cells, so fewer vacancies means slower, more constrained sorting.

The grid and run settings
Grid & run
Rows
Columns
Edges

Wrapping turns the grid into a torus, so no agent sits on an edge with fewer neighbors.

Max steps
Seed

The neighborhoods

Step 300 · 300/300
Faction 1Faction 2EmptyUnhappy (will move)

Tolerance 0.0wants ≥ 100% like

Never settled

52% similar neighbors · started 52% · 546 unhappy

Tolerance 0.3wants ≥ 70% like

Settled

100% similar neighbors · started 52% · 0 unhappy

Tolerance 0.5wants ≥ 50% like

Settled

89% similar neighbors · started 52% · 0 unhappy

Tolerance 0.7wants ≥ 30% like

Settled

76% similar neighbors · started 52% · 0 unhappy

Hover a cell to see its neighbors and why that agent stays or moves.

Preference vs. outcome

ToleranceWants likeInitial similarityFinal similarityUnhappy at endSteps
0.0≥ 100%52%52%546 of 562300 (not settled)
0.3≥ 70%52%100%0 of 562154
0.5≥ 50%52%89%0 of 56225
0.7≥ 30%52%76%0 of 56213
  • At tolerance 0.0 (agents accept up to 0% unlike neighbors), the grid never settled: 546 of 562 agents were still unhappy after 300 steps, ending at 52% similar neighbors — constant churn kept clusters from forming.
  • At tolerance 0.3 (agents accept up to 30% unlike neighbors), everyone settled in 154 steps and similarity rose from 52% to 100%.
  • At tolerance 0.5 (agents accept up to 50% unlike neighbors), everyone settled in 25 steps and similarity rose from 52% to 89% — far more sorted than anyone required, since each agent would have been content with 50% like neighbors.
  • At tolerance 0.7 (agents accept up to 70% unlike neighbors), everyone settled in 13 steps and similarity rose from 52% to 76% — far more sorted than anyone required, since each agent would have been content with 30% like neighbors.

Similarity is the average share of an agent's neighbors that belong to its own faction. “Wants like” is 1 − tolerance, Schelling's similarity threshold. The random starting grid scores 52%.

Tolerance sweep

Turn on the sweep to see how final similarity responds across the full range of tolerances, averaged over several random starting grids.

Analyst notes

Runs entirely in your browser. A Python version with the same parameters is SimulateSchellingSegregation (its random draws differ, so seeds won't match exactly).

About this technique

What is the Schelling segregation model?

The Schelling model shows how mild individual preferences can produce extreme collective outcomes. Agents of different types sit on a grid. Each looks at its neighbors, and if too many are unlike itself, it moves to an empty cell. Even agents who would be content as a minority end up sorting into sharply divided neighborhoods. Economist Thomas Schelling published the model in 1969 and 1971. James Sakoda published a closely related checkerboard model the same year. It comes from complexity science, not intelligence tradecraft.

When to use it

Use the Schelling model when you see sharp clustering and someone assumes it must be deliberate. Examples include homogeneous online communities, concentrated payment flows, polarized networks, and customers leaving a product line all at once. The model tests a "no coordination required" explanation: could simple, uncoordinated local choices produce the same pattern? That's a strong alternative hypothesis to bring to ACH.

How to use this tool

  1. Describe the sorting you're modeling, or start from a preset scenario such as "Majority and minority" or "Crowded city."
  2. Set tolerances to compare. This is the largest share of unlike neighbors an agent accepts, from 0 to 1. Each tolerance gets its own grid panel.
  3. Set up the population: the number of factions, their mix and the share of empty cells.
  4. Adjust the grid, including who counts as a neighbor and whether edges wrap around, then step through the run. Hover a cell to see why that agent stays or moves.
  5. Compare preference with outcome, and run the tolerance sweep to find the tipping point where sorting cascades.
  6. Record your interpretation in the analyst notes and export the results.

Common pitfalls

  • Treating it as proof. A matching pattern shows the mechanism is possible, not that it happened.
  • Ignoring institutional causes. Schelling deliberately set aside policy, money and organized action.
  • Undocumented mapping. What a "neighbor" and a "move" mean in your domain is a judgment call, so write it down.

Related