Modeling and analysis of a Zombie Apocalypse: zombie infestation and combat strategies

João V. Tomotani

Universidade de São Paulo; São Paulo, Brazil.

Email: t.jvitor (at) gmail (dot) com

Download PDF

Humanity can be quite creative when it comes to thinking up of interesting and fictional ways of being completely annihilated by (and also of ways of romancing) fantastical monsters. Though most people tend to believe that humanity’s intelligence and sense of self-preservation will make us find creative ways to overcome nature’s challenges, it is also believed that man will inevitably be creative in eventually deploying its own demise. In the present work, I will focus on one of the most popular apocalyptic themes of modern pop culture, the zombies.

Ogg (2011) comments how, in modern times, the zombie genre has evolved from a cult to a highly popular theme, estimating its monetary worth as over 5 billion dollars. Zombies are present in movies, books, comics, video games, television series, various toys and products, and even have their own parades.

The zombie apocalypse, though, should not be treated so lightly. After the initial hype, a zombie infestation is likely to bring some problems to civilization as we know it. As such, I believe that there is not sufficient work focusing on zombies and/or how to survive their potential threat. (Though most people tend to believe that a zombie attack is unlikely, the effects of such attack would be relevant; thus, it should be better understood.) Here is presented a discrete-time model of a zombie apocalypse where some parameters are used to control the combat strategies deployed against the infestation.


According to Brooks (2003), a zombie is a reanimated human corpse that feeds on living human flesh (or just brains, depending on the reference). Through a list of recorded attacks, Brooks suggest that zombies might have been in existence since 60.000 BCE (though such record is doubtful to say the least).

The stories about zombies probably originated in the Afro-Caribbean system of Vodou (or voodoo), where people were described as being controlled by a powerful sorcerer. The movie White Zombie, from 1932, is widely considered the first zombie movie, but it was the 1968 movie Night of the Living Dead that made the walking dead theme truly popular, giving birth to the zombie genre. Contemporary zombies are depicted as mindless monsters that do not feel pain and have nothing but appetite for human flesh, wandering aimlessly intending to kill/eat (and, consequently, infect) people. For more information, interesting references are Brooks (2003), Munz et al. (2009) and Fobiya et al. (2013).

Some works were recently published focusing on zombie outbreaks. These books focus on self-defense and organization of the population against zombies, or against other humans after the zombie outbreak inevitably happens (Brooks, 2003; Fobiya et al., 2013).

A seminal work by Munz et al. (2009) proposed a mathematical model of a zombie outbreak. The authors used a structure known as an “Epidemic Model” for their work. Epidemic models are simplified means of describing the transmission of communicable disease through individuals, the earliest mathematical modeling of the spreading of diseases being carried out in 1766 by Daniel Bernoulli (for more info, see

After the work of Munz et al. (2009), many others developed their own models: Calderhead et al. (2010), Idu & Oladele (2010), Flanagan (2012), Blais & Witkowski (2013). These models differ from each other on some of their premises. Munz et al. (2009), for instance, considered four different scenarios: (1) the SZR scenario, where the population consisted of susceptible (or “normal”) humans (S), zombies (Z), and removed individuals (R; humans that died naturally or zombies that were destroyed); (2) the SIZR scenario, where a “latent infection” stage was added (I), where the individual took time before becoming a zombie; (3) the SIZRQ scenario, where a quarantined area (Q) was created to contain both infected individuals and zombies (the flowchart of this last model can be seen on Figure 1); (4) the model with treatment, where a cure for the infection could be developed quickly, in a way that a treatment would be able to revert a zombie to its normal human self. The models of Munz et al. (2009) are similar to the well-known SI / SIS / SIR epidemic models (for more information, see Allen, 1994), where the population may consist of susceptible, infected and removed individuals (the removed are those that cannot be infected again).

Zombie - Figure01
Figure 1. Flowchart of the SIZRQ model. Reproduced from Munz et al. (2009).

Both Calderhead (2010) and Idu & Oladele (2010) reproduced the SZR model. The former shows the difficulties in estimating parameters for predicting the outcome of a zombie outbreak, while the latter presents a hypothetical scenario where the dead could resurrect as normal humans in order to offer analogies with different kinds of studies (such as allegiance to political parties).

One of the biggest limitations of the model presented by Munz et al. (2009) was the fact that the destroyed zombie could always be “resurrected”. Both Flanagan (2012) and Blais & Witkowski (2013) thus proposed a model where the zombie could be permanently removed. The model with permanent removal presented by Blais & Witkowski can be seen in Figure 2.

Zombie - Figure02
Figure 2. Model where individuals can be susceptible (S), temporarily removed (R), zombie (Z) or permanently removed (X). Reproduced from Blais & Witkowski (2013).

All the previous works showed that the zombie outbreak would have quite bad consequences for the human species, resulting on the extinction of the susceptible population. Most works also showed that the infection would act so fast that the natural birth and death rates would be pretty much irrelevant for the purposes of the simulation. Finally, the previous authors worked with the simulation paradigm of System Dynamics (SD), one of the earliest paradigms that works with “rates”, “levels” and “feedback loops” (for more information, see Pruyt, 2006).

I believe that a scenario where the human population becomes extinct is quite bad, and that simulation models should be less fatalist when treating such themes, proposing combat strategies instead of only showing the results of an outbreak. As such, I will present a simulation model based on the Discrete-Event Simulation (DES) paradigm where some combat strategies will be explored, with the intention of developing the best course of action.


First, a “map” where the infection takes place is defined (Figure 3). The map is a square with side length m. Inside the map, a square area with side length c is defined as the human colony. Inside the human colony, another square with side length \mu*c  is defined as the “safety” area, where \mu is a “safety factor” between 0 and 1. Finally, the size of an “event cell” is defined as e. The event cell is where the events (encounters) of the simulation take place.

Inside the map, a number  of humans and  of zombies are randomly placed. The humans are distributed inside the colony while the zombies are distributed outside of it.

The simulation model is based on the Discrete-Event Simulation (DES) Paradigm. In the System Dynamics (SD) Paradigm mentioned above (used by all the previously cited authors), the infestation is modeled as a system of nonlinear equations, which causes a complex behavior of feedbacks that are continuous in time. The DES, in turn, focuses on the discrete events that cause changes on the states of the system, considering that no changes occur between events. One of the advantages of the DES is that, since no change occurs in the system outside of the events, the simulation can directly jump in time from one event to the next, usually running faster than the corresponding continuous simulation.

A great advantage of adopting the DES instead of the SD Paradigm for this simulation is that it is easier to insert and analyze nondeterministic factors on the equations, such as the chances of a susceptible human being infected by a zombie on an encounter. It also becomes possible to simulate phenomena that follow probabilistic distributions, making them more realistic (and susceptible to chance).

Zombie - Figure03
Figure 3. Map of the simulation model.

On this model, I considered that the events happen in “turns”. On each turn, the following sequence of events happens:

  1. Humans move on the map;
  2. Zombies move on the map;
  3. The event cells that have individuals inside them are defined;
  4. The encounter inside each event cell is simulated;
  5. The status of each individual is updated;
  6. Turn restarts.

On this model, zombie infection was treated as a disease that only affects living beings, not as an act of necromancy. The disease is transmitted through contact with an infected individual. Six different categories of individuals were defined for my simulation: susceptible humans (S), active zombies (Z), inactive zombies (I), destroyed corpses (X), trained humans with weapons ( W ), and trained humans with vaccines (V). All humans start as susceptible humans. The difference between inactive zombies (I) and destroyed corpses (X) is that the latter are permanently removed from the simulation (killed), while the former can be cured back to human form, or reanimated as active zombies.

The movements of humans and zombies have the following rules:

  1. If the human is inside the safety area of the map, he/she moves randomly in any direction;
  2. If the human is outside of the safety area, he/she moves randomly with a slightly higher probability of returning to the safety area;
  3. Zombies always move randomly in any direction;
  4. Inactive zombies and destroyed corpses do not move.

After all the individuals have moved, the event cells that will be simulated are defined. Each cell that has at least one individual inside will simulate the following events.

(1) All humans have a chance of becoming a zombie, where the chance of this happening is:

P_{Z} =i *((1-( \frac{1}{1+5*n_{Z} } ))-(1- \frac{2}{1+ n_{S}+2*n_{V}+3*n_{W} } ))

Where:  i = infection rate; n_{Z} = number of zombies inside the same event cell as the human;  n_{S} = number of susceptible humans inside the same event cell as the human;  n_{V} = number of trained humans with vaccine inside the same event cell as the human;  n_{W} = number of trained humans with weapons inside the same event cell as the human.

With this equation, it is possible to see that the higher the number of zombies in the same event cell as the human, the higher the probability of him/her being contaminated. Likewise, the higher the number of humans in the same event cell, the lower the probability of him/her being contaminated. It is also possible to see that trained humans with vaccines and weapons have a greater influence in the probability than simple susceptible humans.

As an example, the chance of a human being contaminated if he is alone with one zombie on the same cell is 83.3%. If there are two zombies, the probability goes to 90.9%. If there is only one zombie and one trained human with a weapon, the probability is only 33.3%.

(2) All zombies have a chance of being “cured”, “defeated” (become inactive) or completely destroyed:

The probability of a zombie being cured is calculated as:

P_{C1} =h*(1- \frac{1.5}{1+ n_{V} } )

Where:  h = cure rate.

The probability of a zombie being completely destroyed is calculated as:

P_{X1} = \frac{(1- \frac{1.9}{1+ n_{S} + n_{V} + 2.8*n_{W} } )}{2*n_{Z}^{2}}

And the probability of a zombie being “defeated” (becoming inactive) is calculated as:

P_{I} = \frac{(1- \frac{1.9}{1+ n_{S} + n_{V} + 2.8*n_{W} } )}{n_{Z}^{2}}

(3) All inactive zombies have a chance of being reanimated as zombies, cured, or being completely destroyed:

All inactive zombies have a probability r of being reanimated if they are on the same event cell as another active zombie, where r is defined as a reanimation rate.

The probability of an inactive zombie being cured is calculated as:

P_{C2} = \frac{(1- \frac{1}{1+ 3*n_{V} } )}{1+2*n_{Z}^{2}}

The probability of an inactive zombie being completely destroyed is calculated as:

P_{X2} = \frac{(1- \frac{1}{1+ 0.3*n_{S} + 6*n_{W} } )}{1+2*n_{Z}^{2}}

Four other important parameters for the simulation are: the time necessary for training and equipping humans to fight zombies and the percentage of the population that will be trained and equipped (respectively, T_{W} and \alpha_{W} ); and the time necessary for developing a cure and the percentage of the population that will be trained to administrate it (respectively  T_{V} and \alpha_{V}). After the first case of contamination (first susceptible human becomes a zombie), it takes a time T_{W} for the authorities to train and equip the population with weapons, and a time T_{V} to do the same with the vaccines.

One important point is that every zombie that is cured comes back as a susceptible human. It is considered that all equipment he had before being infected is lost, and he is no longer capable of fighting with the same efficiency after the contamination.

The objective of the simulation is to define the best strategy to contain a zombie infestation, considering:

  1. Which is the ideal size of a human colony;
  2. Once the first case of contamination is discovered, how quickly must the population be trained and equipped with weapons;
  3. Which is the best setup of weapons / vaccines to ensure the survival of as many humans as possible.


Once the model was finished, some scenarios were defined to test it.

I conducted many simulations, trying to understand how each parameter affects the results. One limitation found in the model is its high instability due to the stochastic events (more about this limitation is discussed on the next section). Because of this problem, the conclusions that can be drawn from the model are limited. I present here only the most relevant simulations conducted, and will further discuss their implications on the next section.

Firstly, some parameters were stipulated at the beginning of the tests and were not changed in any scenario. The infection, cure and reanimation rate were fixed respectively as 1.0, 1.0 and 0.8. The map and cell size were fixed respectively as 100 and 4, the number of individuals was stipulated as 8,000 and the initial number of zombies was defined as 12. Finally, the “safety factor” was defined as 0.9.

It is interesting to note that in no scenario zombies stayed inactive for long, being either reanimated, destroyed or cured very quickly.

On the first scenario (Figure 4), the time necessary to train and arm 20% of the population was defined as 500 turns after the first infection. The time necessary to develop the vaccine and train 30% of the population on how to use it was stipulated as 2,000 turns after the first infection. The colony side length was defined as 40 (40% of the map size).

As a result, humans were extinct after around 20,000 turns, with close to 6,500 individuals being destroyed and 1,500 zombies remaining at the end. After the zombies “invaded” the human colony, the infection began to spread quickly. Once the population was trained and armed, the rate of infection got slower and the rate of zombie destruction got higher. Once the population was equipped with vaccines, the number of susceptible humans slowly rose for a while. Humanity’s demise was that the zombie infestation had already gotten out of control, with way too many zombies. Since a cured zombie comes back as a simple susceptible human, the number of humans that were equipped with weapons or vaccines slowly went down and humanity was overrun by zombies.

Zombie - Figure04
Figure 4. First scenario. – Infection rate: 1.0. Cure rate: 1.0. Reanimation rate: 0.8. T_{W}: 500. \alpha_{W} : 0.2. T_{V}: 2,000. \alpha_{V} : 0.3. n: 8,000. z: 12. m: 100. c: 40. e: 4. \mu: 0.9.

On the second scenario (Figure 5), the colony side length was reduced to 24. As a result, humans became extinct sooner, after around 10,000 turns, with close to 3,500 individuals being destroyed and 4,500 zombies remaining. Since humans were restricted to a smaller area, it is reasonable to assume that the infection spread more quickly after the zombies invaded the colony.

Zombie - Figure05
Figure 5. Second scenario. – Infection rate: 1.0. Cure rate: 1.0. Reanimation rate: 0.8. T_{W}: 500. \alpha_{W} : 0.2. T_{V}: 2,000. \alpha_{V} : 0.3. n: 8,000. z: 12. m: 100. c: 24. e: 4. \mu: 0.9.

On the third scenario (Figure 6), the colony side length remained 24, and the time necessary to arm the population increased to 1,000 turns. As a result, humans became extinct very quickly. Once the population was trained and armed, the number of zombies was already overwhelming and there was nothing to be done. Humans became extinct after close to 1,000 turns and more than 7,500 zombies were left at the end.

Zombie - Figure06
Figure 6. Third scenario. – Infection rate: 1.0. Cure rate: 1.0. Reanimation rate: 0.8. T_{W}: 1000. \alpha_{W} : 0.2. T_{V}: 2,000. \alpha_{V} : 0.3. n: 8,000. z: 12. m: 100. c: 24. e: 4. \mu: 0.9.

On the fourth scenario (Figure 7), the percentage of the population trained and equipped with weapons went up from 20% to 25%, and the time necessary to do so returned to 500 turns after the first infection. As a result, the initial surge of contamination was partially contained, with a peak of close to 2,000 zombies at the time the vaccine was distributed (lower than in the previous scenarios). Similarly to the first scenario, though, the zombies slowly managed to contaminate humans equipped with weapons and vaccines, resulting, once again, on the extermination of humanity after close to 20,000 turns.

Zombie - Figure07
Figure 7. Fourth scenario. – Infection rate: 1.0. Cure rate: 1.0. Reanimation rate: 0.8. T_{W}: 500. \alpha_{W} : 0.25. T_{V}: 2,000. \alpha_{V} : 0.3. n: 8,000. z: 12. m: 100. c: 24. e: 4. \mu: 0.9.

At this point, I was starting to get worried that humanity might not manage to survive a zombie apocalypse. As such, I started developing scenarios with more aggressive anti-zombie policies, where vaccines would be distributed more than once among the population. Also, I returned the colony size to 40.

On the fifth scenario (Figure 8), the percentage of the population trained and equipped with weapons went back to 20%, and the time necessary for this was kept at 500 turns after the first infection. After an initial time necessary to develop the vaccine and train 30% of the population on how to use it stipulated as Tv1 = 2,000 turns after the first infection, a second time of distributing vaccines was stipulated as Tv2 = 6,000 turns. For my despair, though, humanity was once again exterminated after a long battle. The zombies were close to be eradicated after 18,000 turns, but slowly regained the upper hand.

Zombie - Figure08
Figure 8. Fifth scenario. – Infection rate: 1.0. Cure rate: 1.0. Reanimation rate: 0.8. T_{W}: 500. \alpha_{W} : 0.2. T_{V1}: 2,000. \alpha_{V1} : 0.3. T_{V2}: 6,000. \alpha_{V2} : 0.3. n: 8,000. z: 12. m: 100. c: 40. e: 4. \mu: 0.9.

Finally, a sixth and last scenario (Figure 9) was created. Deciding to defeat the zombies at all costs, four moments of vaccine distribution were stipulated at turns 2,000; 6,000; 10,000; and 15,000. Finally, humanity managed to eradicate the zombies, but with the loss of 3,000 lives.

Zombie - Figure09
Figure 9. Sixth scenario. – Infection rate: 1.0. Cure rate: 1.0. Reanimation rate: 0.8. T_{W}: 500. \alpha_{W} : 0.2. T_{V1}: 2,000. \alpha_{V1} : 0.3. T_{V2}: 6,000. \alpha_{V2} : 0.3. T_{V3}: 10,000. \alpha_{V3} : 0.3. T_{V4}: 15,000. \alpha_{V4} : 0.3. n: 8,000. z: 12. m: 100. c: 40. e: 4. \mu: 0.9.


Herein, a mathematical model of a zombie outbreak was successfully developed and tested. With the results of the simulation, it is possible to draw the following conclusions (Table 1 summarizes the main results).

Zombie - Table01
Table 1. Summary of each scenario.

The size of the human colony impacts significantly the results of the outbreak, which varies according to the colony’s organization. Unless the human settlement is capable of organizing itself quickly and efficiently to combat a zombie attack, the model recommends that you run away from highly populated areas if you want to survive. This conclusion is compatible with the study made by Alemi et al. (2015). Similarly, Brooks (2003) identify urban centers as one of the most dangerous places to be when zombie outbreaks start. Since the objective of the present study is to preserve humanity, not individual survival, I believe it is important that urban centers be better prepared for outbreaks, to respond accordingly when they happen.

The model also suggests that it is important to react to a zombie infestation as quickly as possible to contain the initial outbreak, avoiding a “point of no return”, when the zombies slowly gain ground over the remaining humans. Initially, I believed that the model would be interesting to show the tradeoff between weapons (killing the zombies) and vaccines (avoid killing zombies while trying to cure them). It became evident, however, that zombies are quite dangerous when not quickly taken care of, since their numbers can grow exponentially. If humans want to survive, containing the initial wave of zombies with weapons is unavoidable (interestingly, this topic was never touched upon in previous works).

In addition, I believe that the model has room for many improvements and is far from ideal if we want to actually develop anti-zombies combat strategies. One idea is to use yet another simulation paradigm, namely the “Agent Based Modeling” (ABM), which is much more recent than the SD and DES. The ABM is useful to simulate interactions of autonomous individuals acting according to simple rules. With such model, it would be possible to further develop human actions and strategies, for example: making humans walk in groups (preferably with one armed individual) and having a better logic in the direction of their movements.

Another problem with the model is that it is highly unstable and sensitive to modifications on its parameters, since most events are stochastic (from movement of the individuals on a big map, to the outcome of the encounters) and a different result of each event has a great and chaotic impact on the rest of the simulation (for instance, having two armed humans become zombies instead of none on an encounter). As such, most of the conclusions presented here should be approached carefully and, for that reason, I did not dare to present a curve of the impact of each parameter.

Most importantly, further work must be conducted to better define the parameters of the simulation. I do not have sufficient data to estimate the chances of a human being infected by a zombie upon an encounter, nor do I know how long it would take to develop a cure for the zombification. It is also quite possible that the impact of being trained and having a weapon in a zombie apocalypse is being overestimated on my model, since I probably would be quite unsettled if an undead was trying to eat my flesh.


Alemi, A.A.; Bierbaum, M.; Myers, C.R.; Sethna, J.P. (2015) You Can Run, You Can Hide: The Epidemiology and Statistical Mechanics of Zombies. Quantitative Biology. Cornell University Library. Available from: (Date of access: 15/May/2015).

Allen, L.J.S. (1994) Some Discrete-Time SI, SIR, and SIS Epidemic Models. Mathematical Biosciences 124: 83–105.

Blais, B. & Witkowski, C. (2013) Zombie Apocalipse: An Epidemic Model. Available from: (Date of access: 06/May/2015).

Brooks, M. (2003) The Zombie Survival Guide: Complete Protection from the Living Dead. Three Rivers Press, New York.

Calderhead, B.; Girolami, M.; Higham, D.J. (2010) Is it safe to go out yet? Statistical Inference in a Zombie Outbreak Model. Available from: (Date of access: 06/May/2015).

Flanagan, K.M. (2012) Zombie Attack! An Introduction to Quantitative Modeling. National Center for Case Study Teaching in Science. University of Calgary, Alberta, Canada. Available from: (Date of access: 06/May/2015).

Fobiya, A.; Ottoni, A.; Pazos, D. (2012) Protocolo Bluehand: Zumbis: Seu guia definitivo contra os mortos e os vivos. Nerdbooks, Curitiba.

Idu, E.I. & Oladele, R.O (2010) An Epidemic of Zombie Infection: A mathematical Model. Available from: (Date of access 27/Mar/2015).

Levin, S.A.; Greenfell, B.; Hastings, A.; Perelson, A.S. (1997) Mathematical and Computational Challenges in Population Biology and Ecosystems Science. Science, Vol. 275(5298): 334–343.

Munz, P.; Hudea, I.; Imad, J.; Smith, R.J. (2009) When zombies attack! Mathematical modelling of an outbreak of zombie infection. In: Tchuenche, J.M. & Chiyaka, C. (Eds.) Infectious Disease Modelling Research Progress. Nova Science Publishers, Hauppauge. Pp. 133–150.

Ogg, J.C. (2011) Zombies worth over $5 billion to economy. Available from: (Date of access: 06/May/2015).

Pruyt, E. (2006) What is System Dynamics? A Paradigmatic Inquiry. In: Größler, A.; Rouwette, E.A.J.A.; Langer, R.S.; Rowe, J.I.; Yanni, J.M. (Eds.) Proceedings of the 24th International Conference of the System Dynamics Society. System Dynamics Society, Nijmegen. Pp. 102.

Check other articles from this volume

One thought on “Modeling and analysis of a Zombie Apocalypse: zombie infestation and combat strategies

Comments are closed.

%d bloggers like this: