Social Sorting Village (3D)

A Blender-built village: how mild neighbour preferences sort a town (Schelling) and how a confidence bound splits opinions (Deffuant). Live indices, histograms and sweep curves.

Switch to 2D

Presets

Playback

Model settings

Opinion settings

Speed and tools

Camera

Layers

Quality

Model check

The science

What is modelled

Two classic, deliberately simple models from the social sciences, run on a town of lots. Neither claims to predict a real city; each shows how a collective pattern can emerge from simple individual rules, which is why they are used in teaching.

1. Schelling's segregation model (1971)

  • Households of two groups (blue and orange roofs) and some empty lots sit on a grid with wrap-around edges. A household is unhappy when the share of same-group households among its occupied neighbours (Moore neighbourhood of radius R) is below its tolerance tau.
  • Each tick, a few randomly chosen unhappy households move to a random empty lot where they would be content.
  • Segregation index S = mean over households of (same-group neighbours / occupied neighbours). For random mixing of equal groups S is about 0.5.
  • Famous result: even a mild preference (tau around 1/3) drives S far above tau, because every move changes the neighbourhood of others (a feedback loop). Very low tolerance leaves the town mixed.

2. Bounded-confidence opinions (Deffuant et al., 2000)

  • Every household has an opinion x between 0 and 1 (blue to orange flag). Two households in contact interact only if |x_i - x_j| < d; then x_i += mu (x_j - x_i) and x_j += mu (x_i - x_j).
  • The update is symmetric, so the mean opinion is conserved exactly. With d of 0.5 or more everybody converges to one opinion; for smaller d several clusters survive, roughly 1 / (2 d) of them.

Checks run in the page

  • Random start: the measured same-group share equals the random-mixing expectation and the household count equals round((1 - empty share) x lots).
  • Schelling run to convergence with tolerance 37.5 %: the index rises well above its random value while the number of households stays constant; with tolerance 0 nobody ever moves.
  • Bounded confidence: the mean opinion is conserved to 1e-9; d = 0.5 gives exactly 1 cluster and d = 0.12 gives at least 3.

Honest simplifications

  • These are toy models. Real neighbourhood patterns also depend on prices, jobs, schools, history and policy, not only on personal preferences; Schelling's model shows that preferences can be sufficient for sorting, not that they are the only or main cause of it in any real place.
  • The two groups are abstract roof colours, not real populations. Households have identical rules; there is no wealth, age or network structure beyond the grid.
  • Opinions are one number in [0, 1]; real opinions are many-dimensional and are shaped by media, institutions and trust. The 1/(2d) cluster count is a rule of thumb from simulations, not an exact law.
  • Randomness: each run uses a random seed; the sweep curves use one fixed seed, so they show typical, not average, behaviour.
  • The Blender houses, trees and flags are illustrations only.

What to try

  • Start with "Mild preference (33 %)", then lower tolerance step by step and watch where the town stops sorting (graph 3).
  • Make blue a 20 % minority: it clusters more strongly than the majority.
  • Switch to opinions, set d = 0.25 and compare "neighbours only" with "anyone in town".
  • Tap a lot to plant an extreme opinion and see how far it spreads for different d.
Loading model...
Loading Blender model...
Segregation index and unhappy households vs time
Same-group share among neighbours (histogram)
Final segregation index vs tolerance (sweep)
Made with 🟠 Blender · Three.js