Schelling Segregation

Agents who only want a few similar neighbours still end up segregating the whole grid.

Animation of the Schelling Segregation model running in Stigmery

Introduction

Each agent is content as long as some fraction of its neighbours share its colour; if too few do, it moves to a random empty cell. Even when everyone is happy to be a local minority, the grid sorts itself into large single-colour blocks. Mild individual preference produces stark collective segregation.

Background

Economist Thomas Schelling introduced this model in 1971 to show that segregation can emerge without anyone actually preferring it, an early and influential case of macro-behaviour arising from micro-motives. He shared the 2005 Nobel Memorial Prize in Economics.

Schelling, T. C. (1971). Dynamic models of segregation. Journal of Mathematical Sociology, 1(2), 143-186.

How it works

  1. Each agent counts how many of its neighbours share its colour.
  2. If that share is below its tolerance, the agent is unhappy.
  3. Unhappy agents relocate to a random empty cell.
  4. Repeat until almost everyone is content, by which point the grid has sorted into blocks.

Parameters

tolerance
The minimum fraction of like neighbours an agent needs to stay put. Even low values still produce sharp segregation.
density
How full the grid is. Less empty space makes it harder for movers to find a comfortable spot.
move_chance
How likely an unhappy agent is to relocate on a given tick, which sets the pace of sorting.

Open this model in the editor →

Related models