Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions demos/schelling-segregation/BehaviorSpace/sweep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<experiments>
<experiment name="sweep-similar-wanted" repetitions="10" runMetricsEveryStep="false">
<setup>setup</setup>
<go>go</go>
<exitCondition>happy-count = count turtles</exitCondition>
<timeLimit steps="100"/>
<metric>ticks</metric>
<metric>segregation-index</metric>
<metric>happy-count</metric>
<metric>empty-patches</metric>
<metric>mean-similar-share</metric>
<enumeratedValueSet variable="num-agents">
<value value="450"/>
</enumeratedValueSet>
<steppedValueSet variable="similar-wanted" first="10" step="5" last="50"/>
<enumeratedValueSet variable="empty-rate">
<value value="15"/>
</enumeratedValueSet>
</experiment>
</experiments>
32 changes: 32 additions & 0 deletions demos/schelling-segregation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Schelling Segregation Demo

This demo shows a standard Schelling-style result: mild local preferences can produce strong global segregation. Red and blue households only ask for a modest share of similar neighbors, but repeated relocation still creates visibly separate clusters.

## What Emerges

With the default settings, the world starts mixed and quickly sorts itself into same-color regions.

- A low tolerance still creates substantial separation.
- Agents become nearly all happy after only a few ticks.
- The segregation index rises much faster than the individual preference threshold.

## Key Insight

At the default configuration (`num-agents = 450`, `empty-rate = 15`, `similar-wanted = 30`), the model typically settles near 80% segregation even though agents only require about 30% similar neighbors to stay put.

## How To Run

1. Open `schelling-segregation.nlogo` in NetLogo 7.
2. Click `setup`.
3. Click `go` and let it run until movement stops.
4. Watch the `Segregation %`, `Happy Agents`, and `Empty Patches` monitors, plus the plot over time.

## BehaviorSpace Sweep

The `BehaviorSpace/` folder contains `sweep.xml`, which sweeps `similar-wanted` from 10 to 50 while holding the other defaults fixed.

- Metrics collected: `ticks`, `segregation-index`, `happy-count`, `empty-patches`, `mean-similar-share`
- Repetitions: `10`
- Exit condition: `happy-count = count turtles`

The same experiment is also embedded in the `.nlogo` model metadata.
Loading