Viral Spread
This behavior simulates a simple viral spread among agents. If an agent has infected neighbors, it can become infected from each with probability equal to the infection_chance property. Infected agents have an infected property set to true.
Published by
Shortname
@hash/viral_spread.rs
Description

This behavior simulates a simple viral spread among agents. If an agent has infected neighbors, it can become infected from each with probability equal to the infection_chance property. Infected agents have an infected property set to true.

If an agent is infected, it will recover and set its infected property to false with probability recovery_chance every time step. If immunity_exists is true, then once an agent is no longer infected, it will set its immune property to true.