FreeSimulationNo signup

Schelling Segregation Simulator

Watch neighborhoods self-segregate from individual preferences. Schelling's 1971 model runs in your browser — no signup, no download.

Ready
Step 0 / 0
Agents: 0
Group AGroup BEmpty
10/s

Parameters

0.350

Fraction of same-type neighbors an agent needs to be happy.

01
0.900

Fraction of cells filled with an agent.

0.30.95

Tweak parameters, then press Reset to apply.

What you just saw

Agents with mild preferences about their neighbors produce extreme segregation. Even at a similarity threshold of 0.3 — wanting only 30% of your neighbors to be like you — the grid self-sorts into clean neighborhoods within a few dozen steps. The individual rule is tolerant; the aggregate outcome is not.

The science behind it

Thomas Schelling introduced this model in 1971 to show that segregation can emerge even when no individual prefers it. The model is agent-based: each cell is a person with a type and a rule. At every step, unhappy agents (those with too few same-type neighbors) relocate to random empty cells. The rule is local; the segregation index — average same-type-neighbor fraction — is the emergent measurable. The model is the conceptual foundation of computational social science.

Try these experiments

  1. 1. Tolerance floor

    Settings: similarity_threshold = 0.25

    What to look for: The grid stays mostly mixed. A modest same-type preference does not force segregation if it is below the tipping threshold.

  2. 2. Tipping point

    Settings: similarity_threshold = 0.35

    What to look for: Clear neighborhoods form within ~50 steps. The segregation index climbs from ~0.5 to ~0.8.

  3. 3. Sharp segregation

    Settings: similarity_threshold = 0.6

    What to look for: Complete neighborhood separation. Agents cluster quickly and segregation index approaches 1.0.

  4. 4. Paralysis

    Settings: similarity_threshold = 0.9

    What to look for: Almost no one is ever satisfied. The system thrashes — many moves per step and high unhappiness.

Sprint 1 scaffold. Full long-form article, references, and FAQ will land in the content sprints (3–6). The simulation above is already wired to the production worker.
SimLab

Run this at 100x scale

Schelling segregation runs in your browser up to 6,400 agents. With SimLab, the same model runs on GPU at 10M+, with ensemble parameter sweeps and publication-ready output.

from scirouter import SciRouter

client = SciRouter(api_key="sk-sci-...")

result = client.simulation.run(
    model="schelling",
    params={
        "grid_size": 500,
        "density": 0.9,
        "similarity_threshold": 0.35,
    },
    steps=500,
    seed=42,
)

print(result.metrics["segregation_index"])

Related simulations

Frequently asked questions

What does the similarity threshold actually represent?

It is the minimum fraction of an agent's neighbors (Moore 8-neighborhood) that must be the same type for the agent to be happy. Below this fraction, the agent moves to a random empty cell on the next step.

Is this a legitimate model of housing segregation?

It is a conceptual model, not a housing market simulation. Real segregation is driven by many more factors — income, policy, discrimination, school districts. What Schelling established is that segregation does not require any of those. Individual mild preference is sufficient.

Why does the simulation converge?

Once every agent is happy, no more moves occur and the state is stable. At high thresholds (>0.7) convergence can fail — the system lacks enough empty cells to satisfy everyone and the simulation runs for its full step budget.