NetLogo banner

 Contact Us

 Modeling Commons

 User Manuals:


NetLogo User Community Models

(back to the NetLogo User Community Models)


by Van Parunak (Submitted: 10/17/2013)

[screen shot]

Download WolfMoose
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.)


Wolves are able to catch moose, deer, and other animals much larger and more powerful than an individual wolf. They overcome their prey by surrounding them. The wolves in front of the prey keep its attention by menacing it, enabling one of the wolves behind the prey to jump on its back and bring it down.

How do the wolves coordinate their actions so as to surround the prey? This problem was introduced to the Distributed AI research community in the late 1980's by Miro Benda, and stimulated a series of studies that assumed wolves could communicate with one another and exchange beliefs and intentions. These unrealistic assumptions were shown to be unnecessary by Korf in 1991 [1] (summarized in [3]). He showed that if the prey always moves away from the nearest wolf, and if each wolf moves toward the prey and away from the wolf nearest to it, the wolves will always catch the prey on a hexagonal lattice, as long as the prey moves slower than the wolves do.

This model recreates Korf's solution. Unfortunately, NetLogo does not give an easy way to work with hexagonal places, but the basic dynamics still work in spite of the anisotropies of the square place lattice. The prey is considered surrounded when a specified number (guards-needed) of the cells in its 8-neighborhood are occupied by wolves.


setup.--Creates wolves and the moose.
Run.--Runs the model in a continuous loop.
Step.--Runs one step of the model.
color-patches.--Toggles coloring of the individual patches so that you can see which patches are occupied by wolves and the moose.

delay.--Slows down the simulation so that you can observe the movement of the wolves and moose more clearly.
population.--The number of wolves.
guards-needed.--The number of cells in the moose's 8-neighborhood that the wolves must occupy to capture the moose. When this condition is satisfied, the model stops execution.
wolf-speed.--The maximum speed, in places per time step, of a wolf. The actual distance the wolf moves is selected randomly with this as the upper limit. Thus a wolf's average speed will be half of this value.
moose-speed.--The maximum speed, in places per time step, of the moose. The actual distance the moose moves is selected randomly with this as the upper limit. Thus the moose's average speed will be half of this value.
repulsion.--How much a wolf is repelled by its nearest neighboring wolf, compared with its attraction to the moose.
wolf-noise.--The upper limit of a random angle to add to each wolf's final direction when it moves, useful to keep the wolves from aligning themselves.

steps.--The current number of steps through which the model has run.
surrounded.--The current number of places in the moose's 8-neighborhood that are occupied by wolves. When surrounded = guards-needed, the model will stop.
guards.--A plot of surrounded over time.

First, determine the wolf population and the number of guards needed to capture the moose. (It helps if the wolf population is at least as large as the required number of guards.) Press setup.

Set the relative speed of wolves and moose, and press Run or Step to watch them move.

When the wolves manage to surround the moose, toggle patch coloring on with the "color-patches" button to verify that they have indeed occupied the required number of neighboring patches.


If the moose is faster than the wolves, it tends to stay on the edge of the wolf population and can evade it.

If the moose is slower than the wolves, they quickly surround it. The model then goes through three phases:
* The Chase, in which the wolves are getting themselves distributed around the moose;
* Herding, in which the mass of wolves with the moose at their center jostles around until the wolves manage to occupy the required number of places;
* The Kill, when surrounded = guards-needed.


Experiment with different settings of the parameters, and try to correlate them with the number of steps it takes the wolves to surround the moose.

Pay particular attention to the effect of the wolf-noise parameter. What is it about the basic rules that makes a little noise helpful? What happens if this parameter is too high? What is the "right amount" of wolf noise?

Similarly, what is the "right amount" of repulsion between wolves? Can the wolves dislike one another so much that they would rather disperse than catch dinner?


Add the ability to have more than one moose. How do the wolves' decision rules have to change to enable the pack to harvest the most moose?

This simple model does not observe the physical constraint that two things cannot occupy the same space at the same time. In particular, wolves and the moose can pass through each other. Add code to prevent a wolf or moose from moving to or through a place if it is already occupied. How does this exclusion principle affect the behavior of the model? Does the wolves' ability to block the moose's movements shorten the herding time? Or does the restriction on the wolves' ability to move around extend it?

Adjust the wolf-noise and repulsion parameters dynamically as the system runs. For example, when wolves are far from the moose, these parameters might be lower to enable the wolves to get near the moose as quickly as possible. As they draw nearer to the moose, it becomes more important for them to spread out in order to surround the moose. Compare the behavior of the adaptive model with the model with static parameters.


This model uses breeds to distinguish the wolves and the moose.

I had to implement my own vector addition function to combine wolf-wolf repulsion with
wolf-moose attraction. Did I miss a NetLogo primitive here? Is this a candidate for a new primitive?


This model is based on the Flocking model in the NetLogo distribution. The algorithm is that proposed in ref. [1]. Ref [2] offers discussion on the limitations of this model.

[1] R. E. Korf. A Simple Solution to Pursuit Games. In Proceedings of Eleventh International Workshop on Distributed Artificial Intelligence, pages 183-194, 1992.

[2] M. Manela and J. A. Campbell. Designing Good Pursuit Problems as Testbeds for Distributed AI: A Novel Application of Genetic Algorithms. In Proceedings of 5th European Workshop on Modeling Autonomous Agents in a Multi-Agent World, MAAMAW ’93, pages 231-252, Springer, 1995.

[3] H. V. D. Parunak. ’Go to the Ant’: Engineering Principles from Natural Agent Systems. Annals of Operations Research, 75:69-101, 1997. Available at

To refer to this model in academic publications, please use:
H.V.D. Parunak. Wolf-Moose Capture Model. . Altarum Institute, Ann Arbor, MI, 2003.

(back to the NetLogo User Community Models)