Fish move under simple flocking rules (cohesion, separation, alignment) biased by ocean current, and forage on nearby plankton to gain energy. Predators hunt the school; energy depletes with warmer water (higher metabolism) and is regained by eating plankton.
v_fish = w1·cohesion + w2·separation + w3·alignment + w4·current
dEnergy/dt = feeding_rate − metabolic_rate(T)
P(eaten | predator within r) ∝ predator_speed / fish_speed
- Ocean current — a steady drift added to every fish and plankton particle's velocity.
- Plankton density — how much food is available for the school to forage on and regain energy.
- Predators — number of hunters chasing the nearest fish; each successful catch removes one fish.
- Water temperature — raises metabolic energy drain, forcing fish to forage more (or starve) as it rises.
Real-world application: this mirrors how marine ecologists model trophic transfer — plankton blooms driven by currents and temperature ultimately limiting fish stocks and predator populations up the food web.