Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blakeziegler/segregationmodel
https://github.com/blakeziegler/segregationmodel
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/blakeziegler/segregationmodel
- Owner: blakeziegler
- License: mit
- Created: 2024-07-04T14:25:54.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-06T01:59:11.000Z (5 months ago)
- Last Synced: 2024-12-14T18:12:30.541Z (30 days ago)
- Language: Jupyter Notebook
- Size: 378 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SegregationModel
In 1971 Thomas Schelling published “Dynamic Models of Segregation,” which proposes a simple model of racial segregation. The Schelling model of the world is a grid; each cell represents a house. The houses are occupied by two kinds of “agents,” labeled red and blue, in roughly equal numbers. About 10% of the houses are empty.
At any point in time, an agent might be happy or unhappy, depending on the other agents in the neighborhood. The neighborhood of each house is the set of eight adjacent cells. In one version of the model, agents are happy if they have at least two neighbors like themselves, and unhappy if they have one or zero.
The simulation proceeds by choosing an agent at random and checking to see whether it is happy. If so, then nothing happens; if not, the agent chooses one of the unoccupied cells at random and moves.