August 3, 2018

The Schelling Model of Ethnic Residential Dynamics

§ tech     # model ascii golang segregation schelling

In 1971, the American economist Thomas Schelling created an agent-based model that might help explain why segregation is so difficult to combat. His model of segregation showed that even when individuals (or “agents”) didn’t mind being surrounded or living by agents of a different race, they would still choose to segregate themselves from other agents over time! Although the model is quite simple, it gives a fascinating look at how individuals might self-segregate, even when they have no explicit desire to do so.

Source

Models are my favourite coding excercises. Often not too difficult to implement, but almost always very captivating. This time it’s the segregation model in two alogrithm variations:

  1. when the agent becomes dissatisfied, it moves to a vacant spot where it will be satisfied
  2. when the agent becomes dissatisfied, it moves to a random vacant spot
Dissatisfied agent moves to a vacant spot where it will be satisfied

Dissatisfied agent moves to a vacant spot where it will be satisfied


Dissatisfied agent moves to a random vacant spot

Dissatisfied agent moves to a random vacant spot


I find it fascinating to observe how these clusters are formed even without a clear agent preference for uniformity!


— `If you knew Time as well as I do,' said the Hatter, `you wouldn't talk about wasting IT. It's HIM.'
$ Last updated: Feb 7, 2021 at 13:38 (EET) $