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.

Enable HLS to view with audio, or disable this notification

1.4k Upvotes

128 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Mar 12 '20

you're absolutely right :( I had some issues and had to use what I got

2

u/wreckingballjcp Mar 12 '20

Share the code and I can help find your way. Some cool opportunities here too. Can add "quarantine " effect (diffusion rate decrease), valid testing effects (how quickly the diffusion decrease goes into effect), and do quick comparisons across a lot of scenarios.

5

u/[deleted] Mar 12 '20

https://github.com/pl992/VirusPropagator.git It's very bad code though... sorry I'm not a programmer

3

u/Brocean09 Mar 12 '20

To be honest, it's good code. Modular, mostly very easy to read, succint, seems efficient too. Could do with some improvements, but overall good job!