NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

## WHAT IS IT?

This is a program meant as a simplistic model of two ant colonies at war. The colonies maintain a balance between number of soldiers, and number of guards. The target of both armies is to eliminate the enemy queen while protecting their own.

## HOW IT WORKS

The smallest turtles, the soldiers, meet and fight each other. A 'battle'consists of the program using a random number generation to act as a coin flip. If one soldier wins the coin flip, the other dies. Guards have a protection program that keeps them surrounding the queen unless they 'smell' and enemy soldier, in which case they follow the scent and kill the soldier. Once a guard kills five soldiers, it runs out of strength, and dies. The queen reproduces lost soldiers and guards when they die, and acts as a flag, when their queen dies, they can no longer re-produce, and are much more likely to lose.

## HOW TO USE IT

First, choose how many soldiers each side has. The number of guards is the number of soldiers not chosen, divided by 5. In other words, 200 soldiers out of 400 means
200/25 = 8 guards for the queen. Setup will set the queens and their 'territory'. You can observe the number of soldiers, guards, and if their one queen is still alive using the monitors underneath.

## THINGS TO NOTICE

Notice how luck plays a part in this model. Some games end overwhelmingly quckly, while others end in virtual ties. Sometimes an individual just gets lucky.

## THINGS TO TRY

Try changing the teams, how well uneven teams fair against each other, as well as even teams. Is strong defense or powerful offense a better tactic?

## EXTENDING THE MODEL

I'll leave that up to you. Contact me if you come up with anything interesting.

## NETLOGO FEATURES
The coding of the guards is interesting, though fairly basic. (Took me a while to come up with it though.)

## RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

## CREDITS AND REFERENCES
Ants
http://ccl.northwestern.edu/netlogo/models/Ants
Copyright 1997 Uri Wilensky.
See Info tab for full copyright and license.

(back to the NetLogo User Community Models)