List of Topics

SfC Home > Behavior >

Simulation of Flocking Behavior

by Ron Kurtus (updated 22 August 2012)

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.

Note: This simulation was written on an older version of Java. You may see a dialog box, asking if you want to continue. Press "Run" to see the simulation.

Questions you may have include:

This lesson will answer those questions.

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

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:

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, :

The rules of behavior of the strangers are:


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.


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 and references

Ron Kurtus' Credentials


"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

Behavior Resources


(Notice: The School for Champions may earn commissions from book purchases)

Top-rated books on Behavior

Questions and comments

Do you have any questions, comments, or opinions on this subject? If so, send an email with your feedback. I will try to get back to you as soon as possible.

Students and researchers

The Web address of this page is:

Please include it as a link on your website or as a reference in your report, document, or thesis.

Copyright © Restrictions

Where are you now?

School for Champions


Simulation of Flocking Behavior

Behavior topics

Behavior theory

Human behavior

Animal behavior

Animal cultures

Also see

Let's make the world a better place

Be the best that you can be.

Use your knowledge and skills to help others succeed.

Don't be wasteful; protect our environment.

You CAN influence the world.

Live Your Life as a Champion:

Take care of your health

Seek knowledge and gain skills

Do excellent work

Be valuable to others

Have utmost character

Be a Champion!

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