Fish flock over the reef using classic boid rules (separation, alignment,
cohesion) but avoid the fishing zone outside the translucent teal marine
protected area when it's active. Population responds to fishing pressure and
pollution as logistic growth minus harvest.
dP/dt = r·P·(1 − P/K) − h·P·(1 − MPA_fraction)
K (carrying capacity) ∝ reef_health = 1 − pollution
biodiversity ≈ 100% · (population/K) · (1 − 0.3·fishing_outside_MPA)
- Fishing pressure — harvest rate h; fish inside the marine-protected-area zone are shielded from it.
- Protected area — fraction of the reef closed to fishing, shown as the glowing teal dome; larger zones let the population rebuild.
- Pollution level — degrades carrying capacity K and reef coral colour/health directly.