Home▸Biology & Life▸2D SIR Epidemic — Agent-Based vs ODE

2D SIR Epidemic — Agent-Based vs ODE

A flat 2D agent-based SIR epidemic model: individual agents wander a plane and infect neighbours by proximity, recover on a randomised timer, and the resulting stochastic S/I/R curves are plotted live against the deterministic SIR differential-equation prediction for the same beta and gamma.

Biology & Life2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-sir ↗ Open standalone

A flat, top-down companion to the 3D SIR Epidemic Model. Individual agents move freely across a 2D plane and spread infection by real proximity contact with a per-contact transmission probability, then recover after a randomised infectious period. The live chart overlays the resulting stochastic S/I/R counts against the classic deterministic SIR differential equations solved with the same β and γ, so you can see exactly where the agent-based outcome tracks — or departs from — the textbook mean-field prediction.

⚙ Under the hood

A flat 2D agent-based SIR epidemic model: individual agents wander a plane and infect neighbours by real proximity contact with a per-contact transmission probability, recover after a randomised infectious period, and the resulting stochastic S/I/R curves are plotted live against the deterministic SIR differential-equation prediction for the same beta and gamma.

SIR modelepidemic simulationagent-based modeldifferential equationsinfectious diseaseR0 basic reproductionstochastic vs deterministic2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)