- Watch local neighbour preferences produce collective patterns in a seeded two-group model.
- Compare mixed and divided starts, inspect individual homes and distinguish satisfaction from clustering.
- Share an exact starting board and experiment recipe, or save a labelled before-and-after result card.
- A Small Preference Can Make a Big Pattern
- What Counts as a Neighbour?
- Moving Has Rules Too
- Satisfaction and Clustering Are Different Numbers
- Try Four Different Stories
- A Stopped Board Is Not Always a Happy Board
- Change One Thing and Keep the Experiment Fair
- Share the Recipe and the Result
- What This Neighbourhood Model Can Explain
- More Local Rules Worth Playing With
Give everyone a modest preference for having a few similar neighbours. Let dissatisfied residents move. Nobody has to ask for a divided neighbourhood for clusters to appear.
ContentBASE Neighbourhood Lab lets you explore that gap between a local rule and a collective result. Change the preferences, keep the same starting board and seed, then watch what happens one move at a time.
Neighbourhood Lab
Explore how local preferences can produce clusters in an abstract two-group neighbourhood.
Loading Neighbourhood Lab… Enable JavaScript to explore.
Start with free Canva bundles
Browse the freebies page to claim ready-to-use Canva bundles, then get 25% off your first premium bundle after you sign up.
Free to claim. Canva-ready. Instant access.
1. A Small Preference Can Make a Big Pattern
The default experiment starts with two equally sized groups, randomly mixed across a board of occupied and vacant homes. Residents want at least 33% of their occupied neighbours to be from their own group. They do not demand a majority.
Press Run. A resident who is dissatisfied looks for a vacant home that meets the rule. When they move, they change the neighbourhoods around both their old and new homes. Someone else may now have a reason to move.
That feedback can turn a relatively mixed arrangement into noticeably larger clusters. The interesting part is the difference between what each resident requires and what the entire board becomes.
This experiment belongs to the family of models associated with Thomas Schelling’s work on segregation. It is an independently built browser lab with its own explicit movement rules, rather than an exact reproduction of every historical version.

2. What Counts as a Neighbour?
The board contains 40 columns and 28 rows. Each resident sees the adjacent homes horizontally, vertically and diagonally: at most eight positions. The board has hard edges, so opposite sides do not connect.
Vacant homes do not count in the preference fraction. If three neighbouring homes are occupied and one contains a resident from the same group, the share is one third, approximately 33.3%.
The controls specify a range:
- At least similar neighbours sets the minimum share required.
- At most similar neighbours optionally sets an upper limit, allowing a preference for some variety.
A resident with no occupied neighbours is treated as satisfied. That is a convention of this implementation, stated explicitly because another choice would create a different experiment.
3. Moving Has Rules Too
A sweep visits every resident once, in a seeded random order. Satisfaction is checked when their turn arrives, using the board as it exists at that moment.
A dissatisfied resident considers the currently vacant homes. A destination qualifies only if its neighbourhood would satisfy the resident after leaving their old home. The lab picks uniformly among all qualifying destinations. If none qualifies, the resident stays.
Moves happen immediately. Later residents therefore see changes made earlier in the same sweep. A resident can move at most once per sweep, and satisfied residents choose to stay.
No one changes group, no new resident arrives, and no resident disappears. Population and vacancy counts remain constant. A sweep is an update cycle, not a day, year or estimate of real relocation time.
4. Satisfaction and Clustering Are Different Numbers
Satisfied residents measures how many residents currently meet their own local preference range. It can reach 100% on a board with substantial clustering.
Same-group links measures the share of occupied adjacent pairs whose two residents belong to the same group. Each pair is counted once, including diagonal pairs. This number describes contact patterns, rather than how many residents are satisfied.
The random-label reference helps put that contact share in context. It is the expected same-group share if the actual group labels were randomly reassigned across the occupied homes. With equal groups it is close to 50%; with a large majority it is higher.
That reference is not a confidence interval or a normalized segregation score. A 75/25 population can produce many same-group contacts without the same amount of spatial sorting as an equally split population. The group-share control is an easy way to see why the denominator matters.
5. Try Four Different Stories
5.1 A Small Preference
Choose A small preference · 33–100%. The minimum allows a resident to be content in a neighbourhood where most neighbours belong to the other group. Run the model and compare the final same-group contact share with the starting share.
5.2 A Higher Bar
Choose A higher bar · 60–100%. The seed, population and vacancies stay the same, while the local minimum increases. Compare the size of the clusters and the number of moves. One model run illustrates a mechanism; it does not establish a universal threshold.
5.3 Divided, Then Indifferent
Choose Divided, then indifferent · 0–100%. Everyone accepts any neighbourhood composition. Because satisfied residents stay, an already divided board does not automatically mix itself back together. Removing a reason to leave is not the same rule as introducing a reason to move.
5.4 Divided, Seeking Variety
Choose Divided, seeking variety · 0–80%. Residents now reject neighbourhoods consisting entirely of their own group, except when isolated. Starting from the same divided arrangement, watch whether acceptable vacancies allow the board to mix.
The outcome depends on the range, group sizes, vacancies, starting configuration and movement rule. Combining a minimum and maximum can also leave residents unable to find an acceptable destination. The lab reports that situation rather than silently forcing a move.
6. A Stopped Board Is Not Always a Happy Board
The status distinguishes three endings:
- Settled: every resident is satisfied, so nobody chooses to move.
- Blocked: a complete sweep makes no legal move, while some residents remain dissatisfied.
- Run limit reached: the browser experiment reaches 300 sweeps; an equilibrium has not necessarily been found.
At very restrictive settings, a blocked board can look much less sorted than you might expect. The residents have stronger preferences, but the rule does not let them move into an unsuitable vacancy just to make something happen.
Use One sweep to inspect these changes deliberately. Crosses mark dissatisfied residents; the colours and shapes identify the two groups. Select a home, or enter its column and row, to see the local neighbour counts behind its status.
7. Change One Thing and Keep the Experiment Fair
Compare five seeds builds five fresh boards from the applied density, group proportions, layout and preferences. Each runs until settled, blocked or the 300-sweep limit. The table and median/range show how these chosen starts differ; they are not a confidence interval or a sample of a real community. The current interactive run remains independent.
Start fresh experiment applies every setup control and creates a new seeded starting board. Keeping the seed, density, group share and starting arrangement makes comparisons easier to interpret.
Apply preferences to current board keeps the current residents and vacancies, then applies the new preference range and seed as a fresh sweep-zero experiment. It does not silently rebuild the population using pending density or group-share changes.
Restart same experiment returns to the exact starting board and seed for the applied experiment. Speed changes affect playback time, rather than the order or outcome of the model’s moves.
The simulation keeps accumulating elapsed time when you switch tabs. If the browser suspends execution, bounded catch-up work processes the missing sweeps when it can. A deliberate pause stays paused when you return.
8. Share the Recipe and the Result
Copy experiment link preserves the exact initial board, applied preferences, seed and speed. The link opens paused at sweep zero so another visitor can run the same experiment. It shares the recipe, not the current animation frame.
A result card compares the starting and current arrangements, with the applied rule, completed sweeps, satisfaction and same-group links labelled. The board and image are processed locally in your browser; this tool does not upload them.
Use the card to show the surprise, then send the experiment link so someone else can test it.
9. What This Neighbourhood Model Can Explain
A small model can demonstrate that local choices and aggregate outcomes do not have a simple one-to-one relationship. It can also make you notice assumptions about vacancies, move order and what counts as an acceptable destination.
It cannot explain a particular real neighbourhood by itself. Housing prices, income, institutions, discrimination, historical constraints, travel, social networks and many other factors are absent. The shapes carry no real demographic data.
Nor can a pattern on this board reveal the motives of real individuals. The useful question is which result follows from a stated rule, and how that result changes when the rule changes.
10. More Local Rules Worth Playing With
For another example of small decisions producing a large collective pattern, brake one car in Traffic Jam Lab. Explore cooperation and retaliation in Cooperation Lab, or watch fixed local rules create moving structures in Conway’s Game of Life.
Browse the growing ContentBASE Tools collection for more experiments you can run, question and share.