Clever Quest Lab ← Labs

Epidemic Simulator

Watch a made-up infection move through a crowd of dots, then see how distancing, vaccination and quarantine reshape the curve.

A toy model of a generic, fictional infection. It is not a model of any real disease and not medical or public-health advice.

Day 0

Tool Seed 0
Presets
Susceptible Exposed Infected Recovered Vaccinated Removed

Population over time

No earlier run yet Care capacity

New infections per day

How to play

A fictional infection starts in a few of the dots. The simulation starts running as soon as the page loads, so just watch it spread (use Pause to freeze it): blue dots are susceptible, orange rings are infected, green diamonds have recovered and are immune, and purple squares are vaccinated. Start with a preset, then change measures while the run is going and see how the curves respond. Use Same seed again after a change to replay the identical outbreak and compare it with the faint grey line left by the previous run.

Controls

How the simulation works

Each dot is an agent that wanders around a box, turning a little at random and bouncing off the walls. Every agent is in one compartment: Susceptible, Infected or Recovered, plus optional Vaccinated, Exposed and Removed states. While an infected dot is within the infection radius of a susceptible one, the susceptible dot may be infected. The chance is rate-based, so the result does not depend on the internal time step: the longer two dots stay close, the more likely the infection. After the infectious period, the dot recovers and is immune, for good or for a set number of days.

The classic SIR equations describe the same story for a well-mixed population of N individuals, as averages with no randomness:

dS/dt = −β · S · I / N
dI/dt = β · S · I / N − γ · I
dR/dt = γ · I

Here β is how many contacts per day lead to infection (per infected individual in a fully susceptible crowd), and γ is the recovery rate, one divided by the infectious period. Their ratio R₀ = β / γ is the basic reproduction number: the average number of new infections one infected dot causes in a fully susceptible population. If R₀ is above 1 the outbreak grows; below 1 it fades away.

In this simple model, an outbreak cannot take off once the immune share of the population is above the herd-immunity threshold, 1 − 1/R₀. For R₀ = 3 that is about two thirds. It is a property of the simple model, not a promise for any real situation. The reproduction number shown here is the average number of infections caused by the last 50 dots that finished their infectious period; it appears once five have finished.

Every measure acts on one ingredient. Distancing keeps a share of dots still, so they meet far fewer others. Vaccination protects dots at the start (or later with Vaccinate now), but only with the chosen effectiveness: a vaccinated dot can still be infected. Masks lower the chance per contact. Quarantine detects infected dots after a delay, with a given probability, and moves them to the box at the bottom until they recover. Communities split the world into boxes that exchange dots at a travel rate; closing travel keeps an outbreak where it started.

Flattening the curve means lowering R: fewer infections happen at the same time, so the peak falls below the care-capacity line, though the outbreak lasts longer. Every run differs, because movement, meetings and infection are random; compare averages, not single runs.

The model is deliberately simple: all dots are alike, movement is random, there is no age, geography or behaviour change, and the optional incubation stage is off by default. It teaches the shape of the dynamics, not numbers you could use for decisions.

Things to try

  1. Run No measures a few times with New seed. How much do peak size and timing vary?
  2. Set distancing to 70 % and use Same seed again. Compare the peak with the grey ghost line.
  3. Vaccinate 60 % at 90 % effectiveness. Do the unvaccinated dots benefit too?
  4. Drag the distancing slider up halfway through a run and watch the reproduction number fall.
  5. Turn on quarantine with a short delay, then lengthen the delay. When does it stop helping?
  6. Try Communities with travel, then tick Close travel early and see whether the rest of the world stays untouched.
  7. Set immunity to about 40 days and look for repeated waves.
  8. Pin a run, change a measure and compare peak height and time above the capacity line.

Frequently asked questions

Does this simulate a real disease?

No. It is a generic toy model with made-up numbers, built to show how spreading works. It is not medical or public-health advice and cannot predict anything real.

Why does the same setup give different results?

Movement, contacts and infections are random. With the same seed and settings a run replays exactly; with a new seed it differs, especially when only a few dots start infected.

Why does the outbreak end before everyone is infected?

As more dots become immune, an infected dot meets fewer susceptible ones. Eventually each infection causes less than one new one, and the outbreak fades while some dots were never infected.

What does the care capacity line mean?

It is a chosen share of the population. The time the infected count spends above it is reported, so you can see how measures reduce that overload.

Why does vaccination help dots that are not vaccinated?

Vaccinated dots are less likely to be infected and pass it on, so chains of infection break more often. That indirect protection is called herd immunity.

More free games