The School for Champions is an educational website that shows you how to achieve your dreams.

School for Champions

SfC Home > Behavior >

Simulation of the behavior of a flock of birds or school of fish. Also refer to Floys, artificial life, behavioral rules, properties, group behavior, strangers, intruders, psychology, Ron Kurtus, School for Champions. Copyright © Restrictions

Simulation of Flocking Behavior

by Ron Kurtus (24 November 2000)

The following computer simulation shows how a flock of birds or a school of fish would behave following a few simple rules. The simulation allows the you to adjust some of the parameters to see how the behavior pattern will change. It also includes the capability to add an intruder to the scene and have the members of the flock attack the intruder.

Questions you may have are:

  • What is the background of this simulation?
  • What rules are involved?
  • How do I vary the parameters?

This lesson will try to answer those questions and demonstrate the simulation. There is a mini-quiz near the end of the lesson.

Background of simulation

This simulation was developed by Israeli software developer, Ariel Dolan, as part of a study on artificial life. Dolan coined the term "Floys" to describe the artificial birds or fish in his simulation. You can find out more about his work and simulations at arieldolan.com.

The Floys follow a simple set of behavioral rules that result in a realistic group behavior. The user can adjust a number of parameters to enhance his or her study of the Floy behavior.

The user also has the option of adding an intruder or stranger to the scene. When the Floys get close enough to the stranger, they attack it.

Dolan also has more complex Floy simulations, which will be added to this site at a later date.

Rules of behavior

The rules of behavior for a flock of flying birds or a school of fish are:

  • Motion is generally random
  • Birds (or fish) identify their own kind
  • They try to get close, but not too close
  • They follow the center of gravity of the flock

To add some spice to the simulation, the possibility of aggression toward strangers has been added. Rules concerning the attitude toward strangers to the flock have been added, :

  • They identify those not from the flock
  • If they get close, they will attack

The rules of behavior of the strangers are:

  • If attacked, run away

Instructions

Use the Slower and Faster buttons to establish a comfortable speed for your computer. Try to define a smooth and peaceful behavior.

You can modify the behavior of the Floys by clicking the Properties button and changing the parameters. The Default button returns values to the default behavior.

Choose the Stranger button to insert a stranger to the scene. When the Floys get close enough to the stranger, they will chase and attack until they kill it. Then a new stranger will appear.

Use the Start button to restart the action after returning from the properties screen.

Summary

Try the simulation and perform some experiments with different parameters.



If you can read this then your browser does not support Java, and you cannot see the Floys applet.


Learn through experimentation.


Resources

The following are resources on this subject.

Websites

Behavior Resources

Books

Miscellaneous


Mini-quiz to check your understanding

1. What is another area where such a group behavior simulation would be of interest?

The flow of traffic

Landing an airplane

Training a group of birds

2. What do you think the "Free Will Factor" means in the simulation Properties?

Whether or not the Floys will kill the stranger

The degree to which Floys conform to the group behavior

See if you can "Free Willy"

3. Is this a good simulation of the behavior of a school of fish?

It is closer to the behavior of a flock of sheep

It is exactly how a school of fish behave

It is an approximation of behavior of some fish

If you got all three correct, you are on your way to becoming a Champion in understanding Behavior. If you had problems, you had better look over the material again.


Resources

"Boids of a Feather Flock Together" by Shawn Carlson, Scientific American, November 2000

Ariel Dolan's Web Site: Artificial Life and Other Experiments - Developer of the simulation


What do you think?

Do you have any questions, comments, or opinions on this subject? If so, send an email with your feedback. We will try to get back to you as soon as possible. Also, check the Reader Feedback to see if your question has already been answered.

Feel free to establish a link from your website to pages in this site.


Students and researchers

The Web address of this page is
www.school-for-champions.com/behavior/floys/simulation.htm. Please include it as a reference in your report, document, or thesis.

Also, tell a friend about this material.


Where can you go from here?

School for Champions

Behavior topics

Group Behavior of Flocks and Schools
Simulation of Flocking Behavior

The School for Champions helps you become the type of person that can be called a Champion.