Beginners Interactive NetLogo Dictionary
Farsi / Persian
NetLogo User Community Models
## WHAT IS IT?
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 IT WORKS
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  (summarized in ). 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.
## HOW TO USE IT
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.
## THINGS TO NOTICE
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:
## THINGS TO TRY
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?
## EXTENDING THE MODEL
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.
## NETLOGO FEATURES
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
## RELATED MODELS
This model is based on the Flocking model in the NetLogo distribution. The algorithm is that proposed in ref. . Ref  offers discussion on the limitations of this model.
## CREDITS AND REFERENCES
 R. E. Korf. A Simple Solution to Pursuit Games. In Proceedings of Eleventh International Workshop on Distributed Artificial Intelligence, pages 183-194, 1992.
 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.
 H. V. D. Parunak. Go to the Ant: Engineering Principles from Natural Agent Systems. Annals of Operations Research, 75:69-101, 1997. Available at https://www.abcresearch.org/abc/papers/gotoant.pdf.
To refer to this model in academic publications, please use:
(back to the NetLogo User Community Models)