CS540-2 Fall 2005 Project

StarLogo and Emergent Behavior

Eric Lloyd
Becky Bamber
Anders Hansen

Emergent behavior is an observable phenomnon resulting when a collective exhibits a pattern or behovior that is not explicity attempted by the individuals composing the collective. This has been described as a bottom-up phenomenon, a system of simple components which have simple interactions leading to the appearance of intelligence or higher level structure. There are three principles upon which this is based:
  • Each individual must have simple rules
  • all interactions are local, and
  • there is no external reference or leader. (However, sometimes it will appear that these collectives have leaders.)

This behavior is found in many varied fields of computer science. Emergent behavior if often used for character AI in some computer games. The Sims is an obvious demonstration of simple individual agents interacting in complex ways. Other action type games have also used emergent behavior where the player needs to learn the agent behavior in order to continue the game (For example, Grand Theft Auto or Halo.)

Emergent behavior is often seen in computer systems as well. Interestingly, it is important to note that emergent behavior is difficult to "design". Since the large-scale behavior results from unpredictable interactions of simple agents, there is no gurantee that any set of simple agents will exhibit a particular behavior. Thus, emergent behavior appears all the time in large systems in the form of unexpected results, which are most often classified as "bugs" in the code. One example of this is in networks. At the lowest level this was seen in packet routing where simple algorithms lead to serious nonlinear behavior resulting in famous misbehaviors such as "oscillating ARPAnet" and "IMP virus ARPAnet crash". At a higher level it is seen in ettiquette involving electronic mail. In massively parallel computers, simple properties arising from interactions of simple rules lead to poor performance due to congestion in internal routing networks. These resulting "bugs", however, may exhibit an emergent behavior that can be put to interesting and unexpected uses.

Another source of emergent behavior algorithms comes from nature. Many biological features exhibit emergent behavior properties, and are thus recreated via computer systems. These behaviors are also put to interesting and varied uses. It is mainly some of the biological emergent behaviors we chose to implement.


StarLogo is a programmable modeling environment for observing and creating emergent behavior. It is an extension of the Logo programming language in which commands are given to a graphic "turtle". The language is fairly straight forward and user friendly making it easy for anyone to use even if they have never programmed anything before. There are many predefined commands so that the user need only use what has already been given. There are three main parts to the environment: the turtles, the patches and the observer. The turtles are the inhabitants (agents) that can represent any object. Each turtle has a heading, a position, a color, and a "pen" for drawing. In addition to these standard features custom properties and traits can be assigned to them. With this programming language it is possible to control thousands of turtles acting in parallel. The patches are pieces of the world where the turtles live. They are not, however, passive objects as they can be given commands to act upon turtles or other patches. They are arranged in a grid corresponding to a square in the graphical interface. The observer watches the turtle and patches from above and can create new turtles as well as monitor the activity of existing turtles and patches. A more in-depth explanation can be found at the following website: http://education.mit.edu/starlogo/

The individual web pages:

Anders Hansen Creating a circle and Bird flocking
Becky Bamber Herding and animal groups
Eric Lloyd Ant colony food-finding and fluid (wave) motion