# Diffusion-contact model

## Diffusion-contact model

Diffusion-contact is the first actual model used to simulate urban development. In this model, a cellular automata model represents physical space, with each cell being either empty or containing an agent. When an agent has at least φ Moore neighbours, it stops moving; otherwise, they walk randomly throughout the grid. A Moore neighbourhood considers a 3x3 grid, with the cell at the centre being the cell whose neighbours are being counted. Each cell with an agent (including the agent’s cell) is counted as 1.

Formally, given an initial number of agents *M* and *j*, a regular tesslation (in this case, a 2D grid without wrapping), and φ, the number of neighbours in the Moore space an agent has, the system observes the following rules:

Initial conditions:

*A*_{j}^{m}= random(*j*)if Σ

_{k=Ωi}A_{k}^{m}(t) > φ, then D_{i}(t) = 1Otherwise, both D

_{i}(t) = 0 and move(A_{i}^{m}(t-1), random(Φ, random(d))), where Φ is the agent’s heading and d is the maximum distance for a step.

In this simulation, agents walk randomly with a maximum distance of 10 cells in the x plane and 10 cells in the y plane according to a Monte-Carlo squared distribution; that is, given p = random(10) and d = random(10), if d^{2} < p, then d is the distance chosen and the direction is a coin flip over the uniform distribution.

### Experiment 1

An initial experiment on a 150x150 grid with 7500 agents and *φ=5* was run through. After 153 steps, all agents had stopped moving.

t=0

t=153

Animation:

### Experiment 2

With 2500 agents, it took 3071 steps:

t=0

t=3071

Animation: