Type A resident Type B resident Empty cell

Schelling Segregation Model (2D)

This 2D simulator lays Thomas Schelling's classic 1971 agent-based model flat on a grid: two agent types are scattered randomly among empty cells, and each step every agent checks whether at least the chosen tolerance percentage of its occupied neighbors share its own type — unhappy agents jump to a random empty cell, and happy ones stay put. Raise the tolerance slider and watch a nearly-neutral preference snowball into sharply divided neighborhoods within a few dozen steps, track the live happy-agent percentage and segregation index as the grid settles, or step through frame by frame to see exactly which agents move and why.