## The Segregation Model | Variations on the Basic Segregation Model | Movement to the Nearest Neighbour with No Prior Random Searching

- Source Code for Segregation Model No Random Searching (682 KB)
- Source Code for Basic Segregation model (730 KB)
- Shapefile (5 KB)

One assumption made in the basic segregation model is that if an agent is dissatisfied with its current location, it will first search randomly in its local area, before moving to its nearest neighbour of the same type and then searching that area. To test whether this movement affects the outcome of the model, a variation of the model was created (see segModelNoRandomSearching model). This model explores how the pattern of segregation may alter if the agent first moves to its nearest neighbour and is satisfied without any random searching of its immediate neighbourhood. (Compare the ** moveAgentUntilHappy** method in the basic segregation model and the segModelNoRandomSearching model.)

To test this effect, multiple model runs were carried out using the basic and altered segregation models. In both cases, 4000 agents were used within a 1.5km2 area. Each agent wanted to live in an area where 50% or more of its neighbours were of the same type as itself. Neighbourhoods were set at 200m. In both models, no agents were removed from the system because they could not become satisfied. Figure 1 highlights the final pattern of segregation that emerges when all agents are satisfied with their neighbourhood configurations from multiple model runs with and with random searching. The overall pattern of segregation appears to be very similar for models with and without the random searching function which is also supported by summary statistics from the model runs (Table 1). Animations of these simulation runs relating to how the systems evolve over time can be seen below. However, the mean number of moves, the mean number of agents that did not move, and the mean number of iterations that the models took until all agents were satisfied with their current neighbourhood configuration for models without random searching is lower than that of models with random searching. Therefore, it can be assumed that random searching does have a small influence on the final pattern of segregation that arises. Additionally it is worth noting that not all agents move during the course of a simulation.

Figure 1: Comparison of end states from multiple model runs with and without random searching.

Table 1: Summary statistics from multiple model runs with and without random searching.

## Animations from multiple model runs with and without random searching

With Random Searching |
||

Without Random Searching |
||