Simulation Based on an Agent-Based Model to Demonstrate the Transmission of COVID-19 and Effectiveness of Different Public Health Strategies

COVID-19 has changed the world fundamentally since its outbreak in January 2020. Public health experts and administrations around the world suggested and implemented various intervention strategies to slow down the transmission of the virus. To illustrate to the general public how the virus is transmitted and how different intervention strategies can check the transmission, we built an agent-based model to simulate the transmission of the virus in the real world and demonstrate how to prevent its spread with public health strategies.


INTRODUCTION
As a novel coronavirus, named SARS-CoV-2, reached epidemic proportions around the world, policymakers, public health experts and different levels of administrative organizations recommended various kinds of intervention strategies to slow down the outbreak of the virus. This urgent work occurred at a rapid pace and was widely reported, yet the general public did not uniformly enjoy an understanding of the basics of viral transmission in general or the specifics of COVID-19 in particular that would help them make informed decisions about their own actions or to support their community in lowering viral transmission. Since an effective public health response relies in part on personal behavior change (Southwell et al., 2020), and in the case of COVID-19, such changes needed to occur amidst substantial misinformation about the virus (Brennen et al., 2020), we were intrigued by the problem of providing accessible tools for the public to learn about viral transmission. We sought to create a tool that would provide users in the public at large with the opportunity to explore for themselves how population uptake of different public health strategies affects viral transmission. We built an agent-based model using Unity that uses data structures to represent individuals in a community with rules governing the interaction between individuals to simulate the process of viral transmission. The simulation's interactive interface allows users to change parameters that effect transmission, including intervention strategies. By changing parameters at different points in the simulation, users can visualize how different public health strategies affect the transmission of COVID-19 (Hoertel et al., 2020). Leveraging Unity's built-in rendering system, users can visually monitor a simulated community epidemic situation as it unfolds, make decisions about what strategies to implement and observe simulated outcomes. To gain some understanding of how users engaged the simulation, we conducted a small qualitative user study with a sample of high school and college students. The small user group found the simulation to offer an accessible opportunity to explore different viral spread mitigation strategies as well as the effects on the timing in using these strategies in terms of curbing community transmission.

Agent-Based Modeling
We found that most of the models aiming to quantify the effectiveness of different public health intervention strategies for COVID-19 fell into one of the two general categories: equation-based models or agent-based models. Compared with agent-based models, equation-based models apply a "top-down" structure. Research using equation-based models typically choose compartmental models that are commonly used in epidemiology such as SIR or SEIR models to simulate infectious diseases. Within these models different parameters such as transmission rate or contact rate can be manipulated to simulate the effectiveness of different control strategies (Matrajt and Leung, 2020;Rocklöv et al., 2020). Agent-based models, on the other hand, apply a "bottom-up" structure. In the usage applied to epidemics, they start from using data structures to represent each individual in the community and then let the individuals interact with each other (thus spreading the virus) based on a selected set of rules (Hoertel et al., 2020;Chinazzi et al., 2020;Cliff et al., 2018;Eubank et al., 2004). The application of different intervention strategies can change those rules accordingly. By engaging these simulations, users can manipulate the parameters that confer probability of infection as well as aspects of different intervention strategies applied and observe the results.
The equation-based models we examined dealt with one or two intervention strategies by adjusting coefficients. We found it challenging to fit various intervention strategies reasonably into one equation-based model to quantify the effectiveness of many strategies applied concurrently (Rocklöv et al., 2020;Biswas et al., 2014;Cuevas 2020;Lekone and Finkenstädt, 2006). Moreover, adding parameters reflecting the implementation of epidemic intervention strategies increases the complexity of an equationbased model without necessarily making the model more valid and accurate when making decisions (Roda et al., 2020). In a "bottom-up" model, the effect of a strategy on the transmission of the virus is reflected on an individual level (Chinazzi et al., 2020;Cliff et al., 2018;Eubank et al., 2004;Perkins et al., 2019). Implementing one or several strategies will change the personto-person transmissibility differently and the individual change will accumulate to have an overall impact on the entire simulation. Additional reasons for implementing an agentbased model are that it can involve heterogeneity which categorizes individuals with different roles representing their possible different responses and actions in the system and take into account the dynamics of agents across space and time (Cliff et al., 2018;Perkins et al., 2019;Cuevas, 2020). Through the adjustment of simulation parameters, the agent-based model enabled us to visually show users the simulated effects of differential uptake of public health measures on virus transmission within the city arrangement.

Quantifying Transmissibility in Simulation
Our simulation is based on the following stochastic epidemic transmission model (Hoertel et al., 2020). In epidemiology, basic reproduction number, denoted as R 0 , is interpreted as the expected number of cases which are directly generated by one case in a certain population. The formula of basic reproduction number is: β is the number of infection-producing contacts per unit time, and τ is the mean infectious period. In our model, for simplicity, β can be regarded as the expected number

E(X) np
where X, a random variable, is the number of persons an infected person can transmit virus to per unit time, assuming X follows a binomial distribution, and n, the number of other individuals a person can meet per unit day. Hence, the person-to-person transmissibility, p, is derived from basic reproduction numbers R 0 , assuming To compare the simulated effectiveness of different intervention strategies we quantify each strategy's effect on the extent of transmissibility between individuals, p. For example, we assume that masks can reduce the percent of disease-inducing particles a person inhales or exhales (π). This makes the personto-person transmissibility equal to (1−π)*p. In a different example, a stay-at-home order strategy can lower the number of individuals met per day (n). Assuming that a stay-at-home order can lower α percent of n, then the new n will be (1−α)*n. Hence the expected number of cases, E(Y), when both masks and a stay-at-home orders are in effect, can be represented as If no strategies are implemented, then α and π are both 0. All variables are adjustable in the simulation.

Simulation Design
The simulation was implemented using the popular game development engine Unity (Unity Technologies, 2020 San Francisco). We represent each individual as a collidable sphere object and paint these spheres with different colors to represent different health status conditions, with green standing for "healthy", orange for "infected", red for "detected", and blue for "recovered". The simulation follows a timeline starting from day 0 at 12:00 a.m. Currently there are three types of building structures: individuals' residences (houses), workplaces, and hospitals. Based on these three building structures, the Frontiers in Computer Science | www.frontiersin.org September 2021 | Volume 3 | Article 642321 simulation follows a simple societal model: individuals leave their houses at some point from 6:00 a.m. to 7:00 a.m, heading to their workplaces that are randomly assigned, and go back to their houses from the workplaces at some point during 6:00 p.m. and 7:00 p.m. For any of their trips between building structures, each individual will follow a random route consisting of several roads on the map. Individuals can only move in one of the four directions in the map defined as "left", "right", "up" and "down". So accordingly, roads will only have directions of "leftright" and "up-down". We make individuals randomly move in one of the four directions when they are inside their houses or workplaces, in order to enable them to have contact with other people currently in the same building. To simply simulate individual social interactions, the sphere objects that represent individuals can collide with each other. Collisions won't change sphere objects' original moving directions. In real life, an individual may or may not interact with many different people in a day, but the interaction numbers tend to be low (Zhaoyang et al., 2018). In our simulation instances of interaction can get quite high, so we have a parameter that sets a cap on at most how many collisions are counted as valid for each individual per hour. When a healthy individual interacts or collides with an infected individual, there is a possibility that the healthy individual can get infected (health status indicator changed from green to orange). This possibility is called the "Transmission possibility per contact" in the simulation and is a parameter the user can set. From the point that an individual becomes infected, we set up a timer for that individual to keep track of how long they have carried the virus. And we compare that length with a preset "incubation time". If an individual has carried the virus longer than the incubation time, we assume a symptom onset for them so that the agent will decide whether to go to a hospital for a test. The probability of going for a test is also parameter that users can manipulate. Once an infected individual decides to go for a test, regardless of their current location, they will move to a random hospital on the map. Once an infected individual arrives at any hospital, their status will change from "infected" to "detected" (health status indicator changed from orange to red) and they will remain in the hospital. After passing a period of time which we set as "average cure time", the detected individual will either die or recover. The possibility of a person dying can also be set as a parameter called "fatality rate". Recovered people will leave the hospital and go to their houses automatically and continue their "house-work place" loop again. For simplicity reasons, recovered people will neither get infected again nor infect other healthy people.
During any stage of the simulation, the player can change the public health strategies that they want to apply. Currently we only have two strategies implemented--the "Put on masks" order and the "Stay-at-home" order. If the player selects the "Put on masks" order, there is a possibility for each individual to obey this order to "put on a mask". We simulate this effect by lowering the transmission possibility between infected and healthy people with their face masks on. If the player selects the "Stay-at-home" order, there is a possibility for each individual to obey this order to stay at their house all day, without commuting between their workplace and house anymore.
The simulation is highly customizable and the user can simulate the spread process of many viruses and infectious diseases other than just COVID-19. The simulation allows the user to change the following parameters (See Figure 1): • In terms of the attributes of virus itself ○ Transmission possibility per contact--the possibility for a healthy person getting infected each time they contact an infected person; ○ Initial Infected Percentage--the percentage of population that get infected at the beginning of the simulation; ○ Fatality rate--the ratio of deaths over the total number of infected cases; ○ Average incubation time--the average time in hours between a person get infected and the onset of the symptom. After the symptom onset, the infected person will realize they are infected; ○ Average cure time--the average time in hours it takes an infected person to recover in a hospital; • In terms of people's general behavior in the simulation ○ Average number of contacts with other people per hour-the maximum number of valid contacts for each person per hour. In other words, only the first this number of contacts per hour a person has with others can generate infections. ○ People's tendency to have a test after they have symptoms-possibility for an infected person to go to the hospital for a test after they spot a symptom onset; • In terms of public health strategy parameters ○ Transmission possibility per contact with people wearing masks--the reduced transmission possibility per contact after putting "Put on masks" strategy into effect. ○ People's tendency to wear a mask--the possibility of each person obeying the "Put on masks" order; ○ People's tendency to obey the "Stay-at-home" order.
• And overall, the user can change the size of the population.
The simulation itself is free to download and run. A video description of the project, as well as the code for the simulation is also available on the project website (see Supplementary  Material). The visualization of simulation data is conducted via ggplot2 (Wickham, 2016) from R 3.6.3 (R Core Team, 2020). The simulation data is collected by outputting data into local csv files. The write-out function is implemented within the source code (also available, see Supplementary Material).

User Experience Focus Group
The simulation was shared with a convenience sample of seven students (ages 16-21), all living in the United States in April 2021. The study was run via Zoom, with students using their PC and preferred web browser while sharing screen. Each student participant was given 10 min to interact with the simulation and the https://pongcenter.itch.io/anti-plague page while the researcher muted and disabled her camera, unmuting only to ask or answer questions. This was set in hopes of simulating a natural, at-home environment, close to how the users would be using this simulation. The users were then asked a list of questions to answer related to any observations about the simulation and their understanding of it (see survey report in Supplementary Material). The interview was covered by a protocol approved by UC San Diego's Human Subjects Protection Program. All participants provided consent and/or assent to participate (in the case on minors) in this remote interview.

RESULTS
To examine the outcomes of our simulation, as well as the effects of the public health strategies we implement, we ran simulations in different scenarios to observe the outcomes. A statistical comparison between our simulation and real world data are not feasible at this point for multiple reasons, but particularly due to the size of the simulated population. The data shown here offer an example of what a user might observe under different parameter scenarios when using the simulation. To speed up the simulation, we used Unity time units instead of the real-world time units. In the simulations shown below, one Unity time unit represents one second, and 50 Unity time units will pass for each frame.

Transmission Under Different Population Density and Different R 0
We simulated two different R 0 in low density community. In Figure 2A the R 0 is set to 2.7 and in Figure 2B the R 0 is set to 1.6 while the population size is set to 215 in both cases. The two different R 0 scenarios generate substantially different results: in Figure 2A over half of the community have been infected while in Figure 2B approximately over one seventh of the population have been infected. This simulation comparison illustrates the idea that given the same community population density, a disease with higher basic reproduction number is more contagious and results in a larger number of infections. To better illustrate the change rate of infected population, recovered population, and death toll, we plot them as curves in Figure 2C. Figure 2C shows simulation results under different population density and different reproduction number R 0 (Al-Raeei, 2021). Given the number of residential buildings is stationary per simulation, the population density is modified by changing the population number each household can generate. High density is set to have 15 agents generated per household. Medium density is set to have 10 agents generated per household. Low density is set to have five agents generated per household. The average number of agents each agent can encounter per hour is set to 1. τ is set to a single Unity time for the sake of simplicity. The probability of an infected agent transmitting virus to other agents per contact is set to be 0.0667 under R 0 1.6. The probability of an infected agent transmitting virus to other agents per contact is set to 0.1125 under R 0 2.7. The curves in the plots stop when there is no change in the rate anymore. The simulation results show that the transmission is fastest when both the population density and basic reproduction number are high. In the latter simulations, the total population of agents in the simulation is set up to 430, using a medium density setting. Each time we restarted the simulation the number of initial infected persons was set to 8. infected persons detected in the simulation, 2) stay-at-home order after 20 infected persons detected, and 3) initiating both mask and stay-at-home measures after 20 infected persons have been detected. Figure 3A shows that by 2e+05 Unity time units elapsed there are already over 340 persons infected, more than 79 percent of the population. The infection number breaks over 400 at approximately 2.7e+05 Unity time units elapsed. Figure 3B shows that adding a mask order, the curve is slowed down and by Frontiers in Computer Science | www.frontiersin.org September 2021 | Volume 3 | Article 642321 5 the end of 6e+05 Unity time, the infected population is less than 400. Figure 3C shows that under the stay-at-home mandate by the end of 6e+05 Unity time, the infected population is less than 350, showing that stay-at-home order is more effective than puton-mask alone. Figure 3D shows implementing two strategies together is more effective than either single strategy alone.

Transmission Under Different Intervention Approaches
We also simulated the impact of implementing public health strategies at different phases of the pandemic, using a medium density setting. To simulate the effects of implementing public health strategies during the beginning phase of the pandemic, we initiated strategies right after the simulation started. To simulate the effects of delayed implementation of public health strategies, we initiated strategies only after 50 individual agents have been infected. Figure 4 shows the simulated reduction in infections by implementing public health strategies at the beginning ( Figure 4A) versus later in the pandemic ( Figure 4B).

User Experience Focus Group
Our user experience qualitative study provided insights into how a small sample of high school and college students engaged with the simulation through both direct observation and questions about the experience (see Supplementary Material). It was clear that users understood that the simulation's primary purpose was to reflect a pandemic setting and observe effects of public health interventions on the rate of infection. These users reported finding the simulation easy to use, although it was observed that some users skipped the instructions and found themselves going back to the instructions for more information once they got further along. Some users made suggestions for further features or functionality and several wanted to spend more than the allotted 10 min with the simulation. The visualization aspect was appreciated as several students noted that it was "cool" to see the immediate effect of a simulation parameter change on viral transmission.

DISCUSSION
From the time that SARS-CoV-2 was initially detected and developed into a global pandemic, different public health strategies were implemented around the world, with different levels of population uptake and efficacy. Within the United States alone, there have been many different approaches to mitigate the spread of the virus, and quite varied adherence to these recommended approaches, with concomitant results in changing rates of infection. The type of public health mitigation strategy, timing of implementation, and the uptake of the strategy in the population all impacted the rate of transmission in the real world (Gibney, 2020;Bremmer, 2020). The presumed large number of asymptomatic cases demanded ubiquitous and regular testing as well as contact tracing to detect infected cases and has been simulated using an SEIIR model that sought to "visualize the invisible" (Peirlinck et al., 2020). Multiple efforts have invested in visualizing the spatial distribution of viral transmission and its frequency through infographics (see Leung et al., 2020 for review), however, there are key concepts underlying viral transmission that are important to understand for making science-based decisions that impact public health remain challenging to grasp for the public at large. We sought to create a an accessible tool for users in the public sphere to explore different aspects of viral transmission in a simulated environment along with the effects of applying simulations of common public health interventions. Although our efforts were small in scale and the evaluation of these were qualitative in nature, our user group found the tool to be easy to use, and we observed that the trends in our simulation in many ways mirrored trends observed in viral transmission during COVID-19.
Visualizations from the simulation shown in Figure 2 illustrate an expected result: that without any interventions, the transmission of a virus is quicker when its basic reproduction number R 0 , which measures the level of contagiousness, is high. The rate of transmission is determined by the population density as well. In our simulation, as the population density increased, the infection rate increases rapidly and reaches its highest number quickly. By making multiple aspects of viral transmission adjustable through parameters in our simulation, we provide users with a way to engage with these concepts and observe the effects.
Data from the simulation shown in Figure 3A illustrates that the virus is transmitted at very quickly at the beginning of the pandemic and once approximately 90 percent of the population are either infected or immune the rate of transmission slows down. Under the same environment and setting we observe that intervention efforts applied alone (Figures 3B,D) and especially together ( Figure 3C) slow down simulated transmission rate dramatically.
The pandemic has demanded a shift in educational strategies in all levels, from prior in-person instruction to predominant remote learning model. This situation has emphasized the need for hands-on learning opportunities that can be conducted at home. In addition, in spite of the global spread of the COVID-19 pandemic, we have not necessarily enjoyed a similar spread in understanding the nature of viral transmission (Brennen et al., 2020). Simulation also has a substantial role to play not only in learning practical skills such as laboratory learning and practicing simulated medical and dental procedures (Tabatabai, 2020). There is also considerable value in using simulations to reconsider work proximity, pedestrian traffic flow and building density with respect to education (Sutton and Jorge, 2020).
Simulations that can be conducted at home, on a personal computer, have potential for helping people understand the nature of viral transmission and their individual role in minimizing it. We believe our simulation also has value in terms of inviting users to consider the science behind this sort of simulation-based planning as well as learning more about the simulation environment itself as it can be adapted and used for other purposes. Our small qualitative user experience study observations suggest that users do find the simulation to be engaging, visually interesting and informative. A much larger quantitative study would be needed with assessments conducted both pre-and post-simulation engagement to understand what students take away from the simulation in terms of knowledge gained or assumptions challenged. We would also like to note that although this simulation was designed for informational purposes, it is possible that one might compare the simulation results with real world data if the population size were dramatically increased. A rigorous statistical comparison with epidemiological data is outside the goals of our simulation, and the computational power available to us. We designed the simulation such that each agent was fullyinstantiated and existed at home, work, hospital or in transit between those sites. Collisions could probabilistically cause infection in any of those places, but this design choice created a computational cost. It is not feasible to simulate a large population size with a standard computer. We did not design our simulations to model to real-world data statistically, although with a supercomputer this may be feasible. However, our simulation can be a practical aid for learning about viral transmission and how different public health measures might effect the transmission of the virus. Although this simulation is developed with a goal to simulate COVID-19, the parameters such as person-to-person transmissibility, incubation time, fatality rate, etc., can be manipulated to simulate other contagious diseases as well.
The simulation we developed serves only as a template or a prototype for future development. By leveraging the power of Unity's user interface (UI) engine, it is relatively easy and convenient for developers, including novice developers, to extend the simulation's features and functionality, thus increasing the complexity of simulations to make them more realistic. In the future iterations, we plan to build a UI that allows players to edit the map by adding or deleting different building structures and moving their positions. For example, we can develop additional types of building structures such as public entertainment venues and public commuting centers to simulate their effects on viral transmission. We can also simulate the effects of viral transmission on a particular population's unique age distribution by applying differential susceptibilities to individual of different ages. Finally, we plan to implement more intervention strategies, specifically large-scale vaccination and contact tracing. Although these two strategies are challenging to implement in the real world, they are relatively easy to integrate into the current model by their nature since the model monitors every individual agent and every contact taking place in the simulations. We believe that with the future improvement on algorithms and data management, more computational resources, more customizable maps and more intervention strategies added, our simulation program can provide users with a learning tool that helps them better understand the nature of viral transmission under many different conditions. Future developments should also include a larger study to understand how engagement of the simulation impacts user understanding of viral transmission and its impact on public health.

DATA AVAILABILITY STATEMENT
The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found in the article/ Supplementary Material.

FUNDING
This research was part of the Experiential Learning Academy academic internship program at the Qualcomm Institute, UC San Diego. A portion of the support for this program was provided by the Legler Benbough Foundation.

ACKNOWLEDGMENTS
This work was an extension of an initial academic internship project at Qualcomm Institute conducted by undergraduate students from University of California, San Diego. This work was supported by the Power of Neurogaming Center (PoNG) and Qualcomm Institute at the University of California, San Diego. A portion of the support for this program was provided by the Legler Benbough Foundation.