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

69

u/lorenthal Mar 11 '20

Scientifically speaking this is nonsense.

-4

u/BenTheHokie Mar 12 '20

Whats so bad about it? My intuition says this is a pretty good model.

0

u/[deleted] Mar 12 '20

[deleted]

2

u/BenTheHokie Mar 12 '20

What specifically about this model concerns you

2

u/[deleted] Mar 12 '20

This simulation removes each node from the population following infection. While it's true that immunity is built up against many diseases after recovery, that doesn't remove them from the population. This actually slows the outbreak by buffering the rest of the immunological naive population.

This model simulates a 100% mortality rate by removing nodes following infection rather than leaving recovered nodes which cannot be infected.

All that aside, your use of the word "intuition" in this context is problematic.

0

u/[deleted] Mar 12 '20

[deleted]

-4

u/poobahh Mar 12 '20

It also is removing infected dots after 20 iterations. With that logic the entire population would die

12

u/Takarov Mar 12 '20

That's not at all accurate. People people who have a disease and recover from it generally do not contract it again. Epidemiological models remove those cases from the model because they can't meaningfully interact with infected or uninfected cases. They're just counted differently for the results.

4

u/poobahh Mar 12 '20

That makes sense. I thought it was just a model of the entire population. Didn’t think about the people not contracting it a second time

6

u/FriendOfDogZilla Mar 12 '20

Not necessarily. Removal could represent death or recovery/immunity. If the model is to explore the spread, the outcome of an infected dot isn't relevant.

-5

u/poobahh Mar 12 '20

I have been informed already. Thanks tho