Pod agents · Magnetic guidance · Feeding & breeding grounds · Shipping noise impact
This simulator models whale migration as an agent-based system. Each pod of whales navigates between polar feeding grounds (cold, nutrient-rich water) and tropical breeding grounds (warm, calm water) following seasonal cues. Agents steer using a simplified magnetic field compass, maintain cohesion within pods, and avoid shipping noise corridors. The simulation shows how anthropogenic noise can disrupt migration routes, forcing whales into sub-optimal paths and increasing energy expenditure.
Humpback whales migrate up to 8 000 km each way — one of the longest of any mammal. Grey whales hold the record at ~20 000 km round trip. Whales navigate using Earth's magnetic field, the angle of sunlight, and even the pattern of ocean swells. Shipping noise has doubled every decade since the 1960s and can travel hundreds of kilometres underwater, masking whale communication calls and disrupting feeding behaviour. Some populations have shifted their routes by 100+ km to avoid noisy shipping lanes.
Each whale pod is an agent-based flock: individual whales steer toward a shared seasonal target, stay cohesive with their podmates, and separate to avoid collisions, all blended into a single velocity each frame. Pods alternate between polar feeding grounds and a tropical breeding ground based on the current simulated month, while a magnetic-style compass keeps them oriented. Four fixed shipping lanes cut across the ocean; whales that stray too close feel a repulsion force scaled by the Shipping Noise setting, and closer encounters are tallied as noise incidents.
Northern-hemisphere pods and southern-hemisphere pods migrate in opposite seasonal phases between the Arctic/Antarctic feeding zones and the shared tropical breeding zone, tracing fading trail lines as they go. Red-tinted shipping lanes cross the basin, and whale bodies bank in the direction of their current velocity vector.
Drag Pod Count and Whales per Pod to change the population, Migration Speed to accelerate the month-by-month seasonal cycle, and Shipping Noise to strengthen the repulsion whales feel near lanes. Toggle Migration trails, Shipping lanes and Feeding/breeding zones independently, or hit Pause/Reset to freeze or restart the run.
Humpback whales migrate up to 8,000 km each way, and grey whales cover roughly 20,000 km round trip — journeys guided partly by Earth's magnetic field, sun angle and ocean swell patterns, all of which this simulator compresses into a simple compass-and-target steering rule.
Each whale blends four steering forces every frame: attraction toward the pod's current seasonal target, cohesion toward the pod's center, separation from nearby podmates, and repulsion from shipping lanes. The blended vector is smoothed (95% of the previous velocity is kept) and capped at a maximum speed tied to the Migration Speed slider.
The simulation tracks a running "month" counter (0-11) driven by Migration Speed. Northern-hemisphere pods target their Arctic feeding ground during months 4-9 and the tropical breeding ground otherwise; southern-hemisphere pods run the opposite schedule, so the two groups are always migrating in complementary seasons.
Each of the four shipping lanes is treated as a line segment. When a whale's distance to a lane falls below twice the lane's width, it receives a repulsion force perpendicular to the lane, scaled by the Shipping Noise value; if the whale gets closer than one lane-width, it is also logged as a noise encounter in the stats panel.
Every whale is pulled toward its pod's centroid (a mild cohesion force) but pushed away from any podmate closer than a small threshold distance (separation), the same boids-style pair of rules used in classic flocking simulations, which keeps pods loosely grouped without whales overlapping.
Total whales is simply Pod Count times Whales per Pod. Avg speed averages each whale's current velocity magnitude and converts it to a rough km/h figure, while Distance covered accumulates every whale's per-frame displacement over the whole run, both using an arbitrary scale factor rather than real whale speeds.