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

7

u/myislanduniverse Mar 12 '20

Cellular automata are some under utilized models.

3

u/imdeeami Mar 12 '20

Actually, we use them all the time in statistical mechanics, when the continuum version is unfeasible. We call them lattice models. The (kinetic) Ising model is the best-known example. They are used a lot in epidemiology as well! Look up SIR model for instance.

1

u/myislanduniverse Mar 12 '20

That's awesome, I will!

1

u/imdeeami Mar 12 '20

A good place to start is this wiki page

2

u/robin-gvx Mar 12 '20

This is actually not a cellular automaton. In CA, the cells generally don't move around. Still both CA and non-CA simulations like this one are very interesting in their own right!