Schelling’s segregation model shows how mild preferences for similar neighbors can generate severe segregation without anyone intending it. Explore the model by varying its parameters and observing how individual preferences shape population-level patterns.
State. Each cell of an L × L torus holds at most one agent. Every agent has a type and two thresholds, a floor and a ceiling, both percentages. Write s for the number of agents in an agent’s neighborhood sharing its type and n for the number of agents in that neighborhood of any type. The agent is content when floor/100 ≤ s/n ≤ ceiling/100, and discontent otherwise. An agent with no neighbors at all is content, since the condition holds vacuously. The neighborhood is either the eight adjacent cells (Moore) or every cell within distance r (Radius), which includes the agent’s own cell.
Setup. Each cell is occupied independently with probability density, and each occupant is assigned a type at random in the stated proportions.
Each tick. (1) Every discontent agent, visited in random order, moves to a cell drawn uniformly from the currently vacant cells; the vacancy list updates as the pass proceeds, so an agent moving later cannot take a cell already claimed in the same tick. (2) Every agent then recomputes s, n, and its contentment. (3) The run halts when no agent is discontent.
1. Whether an equilibrium exists at all depends on the ceiling. With maximum-wanted at 100 an agent is discontent only for having too few of its own type nearby, and the system can always satisfy everyone by segregating further. With a ceiling below 100 an agent is also discontent for having too many, and no arrangement need satisfy every agent at once. This is the substantive difference between Zollman’s version and Wilensky’s, and it is what separates the presets that converge from those that run indefinitely.
2. Relocation is global, not local. A discontent agent moves to a uniformly random vacancy anywhere on the torus, not to a nearby one. Schelling’s formulation moves agents to nearby vacancies, which produces a gradient of escape and slow frontier migration. Here there is no gradient: clustering arises entirely from which agents stay put, and the resting state is reached in far fewer ticks than local search would take.
3. Under Radius, each agent counts itself. The disc includes the agent’s own cell, so s is never below 1 and the reported % similar is raised by roughly 50/n points: about 10 at radius 1, where the disc holds 5 cells, and about 4 at radius 2, where it holds 13. The floor is correspondingly easier to clear than its stated value suggests. Moore neighborhoods exclude the agent, so a threshold of 31 does not mean the same thing under the two settings. The chance figure shown beside % similar accounts for this, which is why it is the figure to compare against rather than 50.
4. Neighborhood size is a fraction of the world, and that fraction matters. The radius-2 disc holds 13 cells at every lattice size, so it is 0.5% of a 51 × 51 torus and 5% of a 16 × 16 one. A smaller world therefore gives each agent a neighborhood covering more of the population and a smaller pool of destinations, which makes small worlds noisier and quicker to settle.
5. Type switching is order dependent. When probability-switch exceeds zero, an agent may change type inside the same pass that counts neighbors, so agents visited later in the pass see the switches made by those visited earlier and not the reverse. This is a property of the original NetLogo source, reproduced here rather than corrected.
Provenance. The default settings are the values ComplexSegregation.nlogo ships with. The Schelling’s original model preset uses the 16 × 16 board Schelling describes building by hand; the figures in his 1971 article use 13 × 16, which a square lattice cannot represent, and Micromotives and Macrobehavior (1978) uses 8 × 8.