Ecology & Life Cycle¶
FishEcologyAgent owns runtime needs and state transitions.
Life states¶
WanderingSchoolingFleeingSeekingPlantGrazingHuntingReproducingDead
Decision checks are staggered instead of evaluating every expensive choice every frame.
Feeding continuity¶
Search Food At starts feeding, while Stop Eating At ends it. Crossing the search threshold does not interrupt a valid active meal. A genuine threat may still interrupt feeding.
Plant feeding points are clamped into FishSwimVolume, allowing short plants near the seabed to remain reachable when their raw feeding point lies below the padded movement boundary.
Predator awareness¶
Prey uses contextual danger ranges:
- Full danger radius when the predator targets that fish.
- Reduced radius when the predator hunts another fish.
- Short personal-space radius for a fed or wandering carnivore.
Escape targets evaluate multiple lateral routes, boundary clamping and local crowding to reduce corner pileups.