Complex systems follow simple rules to reach more optimal or stable states. This is referred to as self-organisation.

Shoaling and schooling behaviour is an example of self-organisation arising from local interactions between parts of an initially disordered system. The seemingly complex behaviour of fish schooling can occur when each individual fish follows three simple rules:

1. Swim close to your neighbours, but

2. avoid crowding them, and

3. swim in the same direction they are.


Let’s Complicate Things

There’s a word for that…

While the term flocking is used to describe collective animal behaviour in general, other terms are used for different types of animals:

  • Swarming for insects;
  • Flocking or murmuration for birds;
  • Herding for tetrapods;
  • Shoaling (sticking together socially) or schooling (swimming in the same direction) for fish.

Creating a simulation

Flocking behaviour was simulated on a computer in 1987 by Craig Reynolds with his simulation program, Boids. His program simulates simple agents (boids) that are allowed to move according to a set of basic rules.

The three basic rules that govern the complex behaviour of flocking animals are:

  1. Separation: steer to avoid crowding your neighbours;
  2. Alignment: steer towards the average heading of local neighbours;
  3. Cohesion: steer to move toward the average position of neighbours.

Experiment with the boids simulation yourself, or download the source code here.

What’s in it for the fish?

It’s better to stick with the crowd for many species as it helps with:

  • Defence against predators through better predator detection  and by diluting the chance of individual capture;
  • Enhanced foraging success by the school assuming a parabolic shape, suggestive of cooperative hunting. A shoal of fish means many eyes are searching for food and fish monitor each other’s behaviour closely such that feeding behaviour in one fish quickly stimulates food-searching behaviour in others;
  • Higher success in finding a mate since shoals provide increased access to potential mates, i.e., finding a mate in a shoal does not take much energy;
  • Potential increase in hydrodynamic efficiency in the same way that bicyclists may draft one another in a peloton.