Modeling the Spread of a Virus


Are you a teacher? Or a parent looking for interactive educational tools to teach kids at home how a virus spreads?

The Spread of a Virus online model, built in StarLogo Nova, a blocks-based programming environment from the MIT Scheller Teacher Education Program, is an interactive tool that can be used to teach your students about the spread of a virus through a biological system. It’s a great way to use ‘social distancing time’ to learn about complex systems and how the simple actions of individuals in a system (in this case individual people) can impact the system as a whole (in this case, the health of a human population).

Open the model in a new window.

Note: Camera adjustments in the model work best with a mouse or trackpad.

Suggested Activity

Compare the results of your runs. Try running the model a few times. Set up each run with different parameters for the percentage of coughs covered, how often surfaces are cleaned and the average size of people's social circles.

Compare the graphs from the end of each run. In any of your runs, were you able to slow the spread of the virus enough to keep the number of infected people below the care capacity of the community? What strategies worked best?

We've prepared a Google Slide Deck you where can upload your own screenshots of the graphs. To make them editable, just select File -> Make a Copy, and place it in your own Google Drive. That version is yours to edit.

Not sure how to take a screenshot on your computer? Click here.

How realistic is this model?

This model is not meant to be true to life in terms of scale or ‘detail of effect’ for any specific virus. For example:

  1. We used the time scale of ‘days’ in the model. In real life, the time scale for a virus like coronavirus to spread could be many times shorter or longer. We chose this time scale ‘unit’ to allow people to run the simulation on their own computer and see a variety of results without having to wait for hours.

  2. In real life, when the care capacity is reached, the disease itself may also worsen because there are also less resources available to help with prevention. 

  3. In our model, all of the infected agents (red spheres representing people) eventually recover (and appear as blue spheres). In real life, death is an outcome of infection for some. 

  4. Finally, in this model, we assume recovered people are immune long enough to avoid reinfection during the same outbreak. With coronavirus, we do not yet know how long immunity lasts after recovering from infection.

Click here if you/your students are interested in learning more about building models using StarLogo Nova.

Click here to learn more about NECSI's research-based guidelines for stopping the coronavirus (COVID-19) pandemic.

Thank you! Happy modeling and stay safe! 



Model Creator: Daniel Wendel (STEP) 

Video and Web Site

Script: Ilana Schoenfeld and Daniel Wendel (STEP) 

Video Production: Garrett Beazley and Ilana Schoenfeld (Hoot Owl Media)

Video Narration: Garrett Beazley (Hoot Owl Media)

Special thanks to Amir Akhavan, Chen Shen, and Dan Rabin: New England Complex Systems Institute


© 2020 by Hoot Owl Media