Each of the N dots is an agent that wanders the arena with a small random-walk velocity scaled by the mobility slider. This is a spatial, agent-based version of the classic compartmental SIR model:
dS/dt = -β·S·I/N
dI/dt = β·S·I/N - γ·I
dR/dt = γ·I
Instead of integrating those equations directly, infection spreads bottom-up: every step, each infected agent checks nearby susceptible agents within a fixed contact radius and infects each one with probability β per contact per day. Infected agents recover (become immune) with probability 1/(infectious period) per day, matching the recovery term γ·I. Vaccination coverage removes that share of the population to the recovered/immune pool before the outbreak starts. The effective R readout is the average number of new infections each currently-infected agent has caused so far, converging toward the theoretical R₀ = β·(infectious period)·S/N at the start of an outbreak.
- Higher β or mobility → faster, larger outbreak.
- Shorter infectious period (higher γ) → faster resolution, smaller peak.
- Vaccination lowers the susceptible pool directly, which is what pushes effective R below 1 (herd immunity).