Pyfectious: An individual-level simulator to discover optimal containment polices for epidemic diseases

In order to control an epidemic disease such as COVID-19, various social distancing measures are necessary. However, currently, the choice of policies depends on experts’ common sense. Computer modeling would help to choose the most effective measures. A recent study offers a novel individual-level simulator software and probabilistic generative model.

Image credit: Acabashi via Wikimedia (CC BY-SA 4.0)

Modeling the population at the level of individuals enables the verification of more abstract models and the investigation of policies influencing every individual uniquely. The simulator adapts to various sizes of the population from cities to the world. It can be used with a wide range of computational resources. In the future, reinforcement learning algorithms could be used to learn policies that are impossible for human experts to find like AlphaZero is used to learn a superhuman chess player in a similar way.

Simulating the spread of infectious diseases in human communities is critical for predicting the trajectory of an epidemic and verifying various policies to control the devastating impacts of the outbreak. Many existing simulators are based on compartment models that divide people into a few subsets and simulate the dynamics among those subsets using hypothesized differential equations. However, these models lack the requisite granularity to study the effect of intelligent policies that influence every individual in a particular way. In this work, we introduce a simulator software capable of modeling a population structure and controlling the disease’s propagation at an individualistic level. In order to estimate the confidence of the conclusions drawn from the simulator, we employ a comprehensive probabilistic approach where the entire population is constructed as a hierarchical random variable. This approach makes the inferred conclusions more robust against sampling artifacts and gives confidence bounds for decisions based on the simulation results. To showcase potential applications, the simulator parameters are set based on the formal statistics of the COVID-19 pandemic, and the outcome of a wide range of control measures is investigated. Furthermore, the simulator is used as the environment of a reinforcement learning problem to find the optimal policies to control the pandemic. The obtained experimental results indicate the simulator’s adaptability and capacity in making sound predictions and a successful policy derivation example based on real-world data. As an exemplary application, our results show that the proposed policy discovery method can lead to control measures that produce significantly fewer infected individuals in the population and protect the health system against saturation.

Research paper: Mehrjou, A., Soleymani, A., Abyaneh, A., Schölkopf, B., and Bauer, S., “Pyfectious: An individual-level simulator to discover optimal containment polices for epidemic diseases”, 2021. Link:


Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x