skip navigation

Clupeoids: A Fish Schooling Simulator Based on Boids

The concept for Clupeoids was developed by Geir Huse, University of Bergen, Norway. The Swarm software was modified by Steve Jackson from a version of Boids coded by Eric Werk. This model was developed during Dr. Huse's October 2000 visit to Humboldt State.

Clupeoids was developed as a tool for exploring how behavior of herring (Clupea harengus) schools can be explained as the emergent property of simple rules for individual movement. The well-known Boids model by Craig Reynolds uses three simple rules (match the speed of other boids, fly toward neighboring boids, avoid obstacles) to produce flocking behavoir in bird-like objects.

In Clupeoids, on each time step a fish object identifies all the other fish objects within its field of view and adjusts its swimming speed and direction to match the other fish it observes. These adjustments are limited by maximum rates of change in speed and direction. The model user can control the size of the space; the number of fish; and the fishs' field of view (expressed as an angle from straight ahead), maximum speed, and maximum rates of change in speed and direction.

We designed Clupeoids to explore what happens when a minority of the fish in a school swim toward some destination instead of continuing to follow the rest of the school. At any point in a simulation, the user can a specified number of fish and make them swim directly toward a specified location. The effect of this directed movement on the rest of the school can then be observed.

Simulations using Clupeoids were used as the basis of the paper "Modelling changes in migration patterns of herring: collective behaviour and numerical domination" by G. Huse, S. Railsback and A. Fernø, Journal of Fish Biology 60:571-582 (2002). The pre-publication abstract of this paper is below.

Clupeoids simulation

Clupeoids simulation

At the start of a Clupeoids simulation, 150 fish have random locations and directions. Attempting to match the speed and direction of fish within the field of view produces organized schooling behavior. (The animations repeat themselves.)

As the simulation continues, the fish have aggregated into two schools. After both schools have bounced off the upper left corner, 15 fish were made to swim directly to the lower left corner (they turn into circles when they arrive). This directed movement by 15 fish is sufficient to deflect the smaller school toward the lower left corner, but not the larger school.

Clupeoids simulation

This simulation is exactly the same as the first except that the fishs' field of view has been reduced from 70% to 30% (percent of a full circle, from straight ahead). Very different schooling patterns emerge.

The code for Clupeoids is available from Steve Jackson or Steve Railsback.

Modelling Changes in Migration Patterns of Herring by Numerical Domination

Geir Huse1, Steve Railsback2 & Anders Fernø1

1Department of Fisheries and Marine Biology, University of Bergen, PO Box 7800, N-5020 Bergen, Norway. Email:
2Lang, Railsback & Associates, 250 California Avenue, Arcata, California 95521, USA. Email:


According to the adopted-migrant hypothesis, first time spawning herring learn their migration pattern from schooling with older individuals, but when the population is unstable, this learning exchange can be disrupted. The most abundant year classes of Norwegian spring spawning herring during the last 50 years are the 1959, 1983, 1991 and 1992 year classes. When these year classes recruited to the spawning stock, new migration patterns were seen. We argue that this is due to the abundant year classes being unable to learn from the older ones since most of the recruiting year class only experience their own naive class-mates. An individual based school simulation study is presented to elucidate the hypothesis. After establishing a schooling pattern, a small proportion of the individuals is directed to move towards a given position while the remaining individuals keep using their individual movement rules. When relatively few individuals are so directed there is no response seen in the remaining school. But when 7% or more of the total school is directed to a specific location, the remaining individuals always respond and follow the directed individuals . The simulations thus show that directed individuals can have a substantial influence on the collective behaviour of schools. Furthermore, the knife-edge response of the schools suggests that the relative abundance of directed individuals in a school plays an important part in the collective behaviour. This mechanism can explain the observed changes in migration pattern of Norwegian spring spawning herring associated with the recruitment of abundant year classes to the stock.