Cutie Pox Simulator
About
Tan Kang Soon (kstan.gitlab.io) March 20, 2020
Introduction
I am not a virus expert or a math expert. I am just a game developer and I enjoy making small toys like this one. I thought it would be fun to create a virus simulation and see if we can get any kind of consistent results from it. Do not take this simulation or my thought as accurate of the real situation happening now around the world.
Results
TLDR: Even small attempts at social distancing and lowering infection rate by practicing good personal hygiene can go a long way in fighting a disease outbreak - more so than you think!
At the simulation's default setting of Population Size = 200, Social Distance = 2, Infection Rate = 0.8 and Recovery Rate = 0.8, the resulting graph should look something like this.
Infection numbers peaked at 183 really quickly, which is very near to the max size of the population. In the real world, this might mean that medical resource of that population will be extremely stretched. We might see a higher mortality rate.
So let us try and lower the peak numbers. This time, let us try to practice some social distancing. By increasing social distance from 2 to 4, we get an optimistically different result.
We see that the peak has been reduced to 142. Just a little bit of social distancing can result in a rather big difference!
But let us do more. Let us practice some personal hygiene in an attempt to lower the infection rate (e.g. wearing masks, washing hands, and not touching your face). Let's assume that a minimal attention to hygiene would lead to a small reduction of infection rate from 0.8 to 0.6.
But let us do more. Let us practice some personal hygiene in an attempt to lower the infection rate (e.g. wearing masks, washing hands, and not touching your face). Let's assume that a minimal attention to hygiene would lead to a slight reduction in infection rate, from 0.8 to 0.6.
The peak has been greatly reduced! Though the virus would live longer within the population, more medical resources will be available to those who need it.
As it turns out, the curve is VERY SENSITIVE to even small attempts at social distancing and lowering infection rate. It could be difficult to change our personal habits to fight the outbreak, but remember that every small steps you take will have a surprisingly big impact on the outcome of the situation.
What is "Cutie Pox"
"Cutie Pox" is a fictional disease from My Little Pony: Friendship is Magic, Season 2 Episode 6. I have never watched the episode. I am just taking its name since it sounds cute.
Technical notes
The simulation is developed in the Unity game engine. The flocking algorithm is used to simulate autonmous agents. "Social Distance" is simply determined by the "Separation" weight between the agents, while "Infection Rate" determines the amount of time an agent will be infected by another boid by being in close proximity with it.
The simulation is developed in the Unity game engine. The flocking algorithm is used to simulate autonomous agents. "Social Distance" is simply determined by the "Separation" weight between the agents, while "Infection Rate" determines the amount of time an agent will be infected by another agent of a certain proximity from it.
The main challenge in the simulation of autonomous agent is optimizing collision detection in a hug group. This is still a WIP.
Credits
Game Engine: Unity
Music: "Classic Horror 1" by Imcompetech
Name of disease: "Cutie Pox" from My Little Pony: Friendship is Magic, Season 2 Episode 6