r/Python • • Mar 11 '20

I Made This Really simple simulation of virus spreading. Black dots are people, yellow dots are infected (it starts from 1). Each cell visited by an infected can infect other people passing through that for 3 iterations. After 20 iterations a person is infected is deleted from the grid.

1.4k Upvotes

128 comments sorted by

View all comments

38

u/warpchaos Mar 11 '20

Very cool! Next you could add air-travel simulation by allowing a few cells to jump further at random (regardless of their infection status)

18

u/excentricitet Mar 11 '20

And also decomposition of corpses. After 20 ticks you should also add some chance for a dot to get cured. Eventually, everyone will be dead

2

u/yvrelna Mar 12 '20

People build immunities once they got sick, so they should recover and become much less likely to get infected again.

1

u/excentricitet Mar 12 '20

Also add psychosis to infected individuals.