Schelling Generations

What if the classic Schelling segregation model included children born of the “reds” and the “blues”?

In the original Schelling model, two different types of agents live within a world consisting of discrete grid cells. The agents have a limited tolerance for living next to agents of the other type. An agent with too many opposite-type neighbours will hence move into a random open space. Schelling’s model demonstrated that even when individual agents had only a moderate bias against living near agents of the opposite type, the aggregate outcome would still be an efficient distribution of agents into homogenous patches. This was intended as an exploration of how racialized city ghettos might emerge from individual choices, given even slight racial biases.

This model retains the original Schelling behaviours and adds to them. In this version, agents have a chance of dying and giving birth. Depending on how many agents of opposite type live nearby, agents may give birth to a new, more tolerant type of agent, who do not share their parent’s biases.

When run, the model tends to go one of two very different ways: either strong segregation with only a few highly tolerants “greens” present, or dominance by the tolerants with few remaining “reds” and “blues”. Which way it will go depends on the tolerance threshold assigned to the red and blue agents, but is also very sensitive to minute subtleties of the starting positions of the agents.

Making the Model

The model was made with RePast 3. Repast is an open-source “toolkit” of libraries for doing agent based modeling in Java. Rick Riolo coded a demonstration of the Shelling’s model in Repast, and I extended his code to add the third race of agents.

The model was a project for my Agent Based Modeling course.

Running the Model

Java code (30kb .zip)

You probably can’t run the model. I can’t easily run the model. If you happen to have access to the Center for the Study of Complex Systems computer lab at the University of Michigan, then there are fairly simple instructions for building and running the model on those machines in the .pdf below. Otherwise the code needs to be compiled in association with the proper Repast libraries on your machine before it can be run. I have used eclipse to do so on my Windows box. Derek Robinson’s guide to using Repast with Eclipse is here. Both Repast and eclipse are open-source and freely available. There are probably simpler ways to compile Repast models, but I don’t know them.

Making this model was the experience that convinced me to switch to the (closed source, free) NetLogo agent-based modeling environment, both for ease of programming, and for ease of sharing the results.

Documentation

Generations Model (200kb .pdf)

The above paper was submitted as part of my class project.

The paper includes a discussion of the modifications from the original Schelling model, a discussion of the model’s typical behaviour, and a description of some quantitative experiments carried out using it.

Edited extracts from the paper follow:

Model behaviour

If there is an interesting dynamic to this model, it is this: for blue, “mixed” agents to be born, there must be contact between red and green agents. Hence, if the agents manage to segregate themselves sufficiently, there is a possibility that an insignificant number of blue agents will be introduced, and the world will come to equilibrium with homogeneous patches of agents similar to classic Shelling outcomes. Alternatively, if sufficient mixing does occur, presence of the resulting blue agents (which do not actively seek to avoid other types) can disrupt the normal homogenization of the world. When the disrupted model doesn’t quickly arrive at equilibrium, its extended run yields more chances for blue agents to be born. Since blue agents don’t have red or green children of their own but only more blue agents, such disrupted dynamics typically lead to the world being overrun by the blue type.

Some typical scenarios:

Given low thresholds, the model generally displays typical Shelling behavior, quickly settling into roughly homogenous regions. Mixed agents don’t have time to become established.

scenario1

Given higher thresholds, themodel displays a wider range of behaviours. In some cases it will adhere to typical Shelling outcomes, with a smaller number of tightly segregated patches emerging, and only a few blue agents, typically in border between red and green areas:

scenario2

In other cases, blue will dominate.

scenario3

Less commonly, an equilibrium which includes a significant proportion of all 3 types can also occur.

scenario4

Note that outcomes are generally highly sensitive to the chanceBirth/chanceDeath parameters. Increasing these effectively reduces the “generation time”, increasing the number of opportunities for blue agents to be born into the world and hence the possibility for them to affect the distribution dynamics. For experimentation, chanceBirth and chanceDeath were held at 0.01 each. This moderate level allows some resolution in measuring the effects of the chanceMix parameter, such that small changes in chanceMix do not result in absolute changes in outcome. Note that it is possible that a similar analysis results might be attainable by holding chanceMix steady and varying chanceBirth/chanceDeath.