NetLogo banner

 Home
 Download
 Resources
 Extensions
 FAQ
 References
 Contact Us

 Models:
 Library
 Community
 Modeling Commons

 User Manuals:
 Web
 Printable
 Chinese
 Czech
 Japanese

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

Zombie Infection 2

by Alex Fink & Sai Emrys (Submitted: 09/15/2009)

[screen shot]

Download Zombie Infection 2
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)

WHAT IS IT?

This is a simulation of a town in which a zombie infection arises. The first version was a moderately faithful rewrite of Kevan Davis' Zombie Infection Simulation in NetLogo; since then we've added a lot of functionality.

HOW IT WORKS

Zombies are green, shamble around very slowly and change direction randomly and frequently unless they can see something moving in front of them, in which case they start walking towards it. After a while they get bored and wander randomly again.

If a zombie finds a human on the same patch, it infects them; the human immediately joins the ranks of the undead.

Humans are lightish gray and walk five times as fast as zombies, changing direction when they run into a wall, and sporadically otherwise. If they see a zombie in front of them, they turn around and panic.

Panicked humans are pink and run twice as fast as other humans. If a human sees another panicked human, it starts panicking as well. A panicked human who has seen nothing to panic about for a while will calm down again.

The military are red and move as regular humans do, unless they see a zombie or panicked human, which they will run towards. A member of the military will kill any zombies on a patch they walk into. Further options are open to the military if authorised:
* they may detonate a pocket nuke if they see sufficiently many zombies, immolating all life (undead included) in the blast radius and damaging buildings.
* they may recruit ordinary humans, up to the originally specified size of the force.

HOW TO USE IT

Press SETUP to create and populate a new city.
Press SETUP-BEINGS to place the beings while retaining the current city.
GO, as usual, runs the model. STEP runs it for one step.

Parameters:

*Town parameters* (only takes effect on SETUP)
NUM-SQUARES: number of open areas in the city

*Initial populations* (only takes effect on SETUP or SETUP-BEINGS)
NUM-HUMANS: number of humans
NUM-ZOMBIES: number of zombies
NUM-MILITARY: number of military (changing RECRUIT-%AGE looks at this in real time, though)

*Perception*
VISION-DISTANCE: baseline distance which creatures can sense (see/hear/smell/...) other creatures in
ZOMBIE-ACUTENESS: multiplier to this distance for zombies
VISION-ANGLE: angle of the sensory cone

*Human-specific behaviour*
PANIC-DURATION: how long humans panic upon seeing something frightening
BREEDING-%AGE: how likely two humans meeting are to procreate (immediately!)

*Zombie-specific behaviour*
WALL-BREAK-%AGE: how likely a zombie sensing something across a wall is to smash through
NOM-TIME: how long a zombie takes to consume its prey's brains
ZOMBIES-AGE?: if on, zombies become decrepit and eventually cease to exist with the passage of time
ZOMBIE-LIFESPAN: if aging is on, how long a new zombie can expect to live, unfed
NOM-BOOST: if aging is on, the extension catching a victim provides to a zombie's lifespan, as a fraction of ZOMBIE-LIFESPAN

*Military-specific behaviour*
RECRUIT-%AGE: how likely the military are to recruit humans into the military. The military will never expand past NUM-MILITARY members (one imagines they have a finite supply of guns, or badges, or whatnot.)
NUKES-AUTHORIZED?: can the military use their pocket nukes?
NUKE-RADIUS: the blast radius of pocket nukes
NUKE-DAMAGE: how damaging the nukes are to buildings (they always annihilate all creatures in their radius)
NUKE-DISTANCE:
NUKE-MINIMUM-KILL: military will only use pocket nukes if they think there are NUKE-MINIMUM-KILL zombies within NUKE-DISTANCE.

SIGNIFICANT DIFFERENCES FROM KEVAN'S
The model of space is the standard NetLogo model, in which space and direction are both continuous. Thus, for instance, it's more reasonable for humans to keep
running in straight lines when nothing is in their way; they don't miss entrances to small passages or cluster as much as they would in the discrete grid-based model.

Beings' fields of vision are cones with 90 degree width instead of just the lines directly ahead. These fields of vision go through walls (I guess the beings can hear, or smell, or something).

The city wraps around unless you change the model topology; again, this is more natural in NetLogo than it might be in proce55ing.

Arbitrarily many beings may occupy one patch.

The city is carved out differently: although it has the same general feel, more types of passages can occur, for instance zig-zags:

    *****************
*
*
*
*****************

Beings only look ahead of themselves every fifth time step. This was done to speed the model up, and appears to have no significant effects on the simulation.

THINGS TO NOTICE

Infection takes place much more slowly, in terms of simulation timesteps, than in the original model.

In zombie-dominated areas of the city, the zombies tend to form into lines (in the original model, we instead observe blobs).

THINGS TO TRY

In general: when do humans win, when do zombies win? Find combinations of settings that make it a fair fight. (E.g. does zombie wall-breaking actually help the zombie side? Do zombies do better when they sit in wait in their corridors, or destroy them digging out to where the brains are?)

What population density does panic need to be self-sustaining?

Make everyone a zombie, let zombies break walls 100% of the time, and watch the zombie streamers.

Play with NetLogo perspective features like watch and follow.

Resize the city, using the Edit button on the city display. This will probably require adjusting the numbers in the setup-town procedure to get the same overall proportion of open space.

EXTENDING THE MODEL

You've seen at least as many zombie movies as I have...

These extensions are more like bug-fixes:
- Ensure that there are no completely isolated spaces without entrances or exits when the city is created.
- Make the walls actually opaque? (This will probably be a mess, since there is no support for this among the NetLogo agentset reporters like in-cone.)

And, of course, it would be nice to make it run faster.

NETLOGO FEATURES

The tunnels in the city are carved by a dedicated breed of turtle (an initial attempt to generate them with patch agentsets proved horribly slow).

I like the way beings reorient themselves after hitting a wall -- they can even follow tunnels with no special case movement rules.

Building damage after a nuke is implemented by having each patch in the blast radius
change to open space with a constant probability, otherwise change its state to that of a random neighbour in a small radius. This nicely and quickly simulates rubble getting blown about.

Beings never move by more than distance 1 at a time, to prevent them from jumping through walls.

CREDITS AND REFERENCES

Alex Fink and Sai Emrys, this version
AF, the first version, Jan 2006

Kevan Davis' original Zombie Infection Simulation, version 2.3:
http://kevan.org/proce55ing/zombies/

NetLogo zombie simulators seem to've become popular in these last few years;
one might also check out Asymptote's one,
http://ccl.northwestern.edu/netlogo/models/community/Zombie_Infection_2
and Marcel Jira's ones,
http://web.student.tuwien.ac.at/~e0250890/netlogo/ .

(back to the NetLogo User Community Models)