# School of Fish: Swarm Behavior

A turquoise coral reef with two thousand GPU\-simulated fish: play seek, evade and follow and discover how three simple rules make a school

By Numa

Topic: Nature &amp; Biology

[Open the interactive Jig](https://ask.jig.com/j/L7Jvx29ReJYP)

## Transcript

### 1. A living cloud

Over a sunny coral reef, two thousand little fish swim as one\. No fish is in charge, and none can see the whole school\. Yet together they flow like one shimmering creature\. Drag the water to look around\.

About a quarter of all fish species school for their whole lives, and about half do for part of their lives\.

### 2. Three simple rules

Each fish watches only its nearest neighbours and follows three rules: do not bump, swim the same way, and stay close\. Switch one rule off and see what happens to the school\.

In 1987 Craig Reynolds showed that these three rules are enough to make a lifelike flock on a computer\.

### 3. Seek: dinner time

A cloud of plankton, tiny drifting food, glows in the water\. Every fish steers toward it and slows down as it arrives, so the school pours in without crashing\. Drag the glowing plankton and the school will chase it\.

Steering toward a goal is called seeking\. Slowing down near it is called arrival\.

### 4. Evade: a big visitor

A bluefin trevally cruises by, hoping for a snack\. Fish near it dart away sideways, so the school opens around it like a fountain and closes again behind it\. Drag the trevally through the school\.

With so many fish flashing at once, a hunter struggles to pick just one\. Scientists call this the confusion effect\.

### 5. Follow the leader

This yellow tang knows where it is going, and the school tags along just behind it\. Drag the tang on a winding path and watch the school trail after it\.

Real schools have no permanent boss\. A few fish that know the way can steer the whole group, and the front keeps changing\.

### 6. The bait ball

When hunters circle, small fish pack into a tight, spinning ball and each one tries to reach the safer middle\. Press Scatter to see a flash expansion: the ball bursts open in a blink, then pulls itself back together\.

Bait balls can be up to 20 metres across and usually last less than 20 minutes\.

### 7. Many eyes, one mind

No plan and no boss, only neighbours watching neighbours\. These simple local rules let a school find food, dodge danger and save energy\. The same idea guides flocks of birds, swarming robots and crowds of people\.

Swimming in a school can save a fish up to a fifth of the effort of swimming alone\.
