56 minutes ago · Tech · hide · 0 comments

In 1971, economist Thomas Schelling asked whether mild individual preferences for similar neighbours could produce large-scale residential segregation. The answer is yes: even when each agent requires only 30% of occupied neighbours to share its type, the population self-organises into sharply segregated clusters. The Schelling model is an example of an agent-based model: Place two types of agents on a grid, leaving some cells empty. At each step, identify dissatisfied agents and move each to a random empty cell. Repeat until no agent moves, or for a fixed number of steps. It’s a landmark result in computational social science because it shows that macro-level patterns can emerge from micro-level rules without central coordination. It’s fairly easy to implement in Python, but testing it is a challenge. Implementation The grid is an $N \times N$ array. Each cell holds one of three values: 0 (empty), 1 (red agent), or 2 (blue agent). The Moore neighborhood of a cell is the set of…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.