Rules are simple:
- The world is a grid of X * Y cells;
- An agent (sim person) can appear (blue) in a cell based on "Density Rate";
- That agent has a percentage chance of being infected (yellow), "Initial Infected Rate";
- Each agent can move in 9 possible directions picked at random;
- If two or more agents end up on the same cell, that's a close contact event;
- If any agents in close contact is infected, the other healthy agents in the same group may get infected depending on "Transmission Rate";
- After the "Infection Period" is over, agents either recover (blue) or die (black);
- Dead agents are buried (light grey) after a certain number of days after dying.
- Simulation stops when number of infected and recently died agents reach zero, or when the maximum number of days (currently set to 3 years) is reached.
Contributions are most welcome. Have a look at TODO.txt for ideas.
https://github.com/hamidnazari/game-of-social-distancing