Alpaca Guard and the Selfish Herd: Domain of Danger, Interception and Fox Attacks

A guard alpaca watches a grazing herd: exact Voronoi domains of danger, Hamilton selfish-herd packing, lead-pursuit interception and random fox attacks decide how often a raid is repelled.

Switch to 2D

Presets

Playback

Parameters

Camera

Layers

Quality

Model check

The science

What is modelled

A herd of grazing animals on a 60 x 40 m pasture is watched by one to three guard alpacas. A fox appears at the fence and runs at the animal nearest to where it came in. Two pieces of real geometry decide the outcome: how much of the pasture each animal "owns" (Hamilton's selfish-herd domain of danger) and whether a guard can reach the fox before the fox reaches its target (lead-pursuit interception).

Equations

  • Domain of danger: a predator arriving at a random point attacks the nearest animal, so the risk of animal i is Ai / (W H), where Ai is the area of its Voronoi cell clipped to the pasture. The page computes the cells exactly by half-plane clipping; the fair share is W H / N.
  • Selfish-herd rule (Hamilton 1971): an animal that steps towards its nearest neighbour shrinks its own cell and enlarges the neighbours' gaps, so every animal does it and the herd packs. The slider sets how strongly this competes with grazing and spacing.
  • Interception: a guard of speed vg at G and a fox at F with velocity u meet after the smallest positive root of |F + u t − G| = vg t, a quadratic in t. The guard runs to that meeting point and recomputes it at every step. The locus of equal arrival times is an Apollonius circle.
  • Outcome: the attack is repelled if a guard gets within 6 m of the fox before the fox is within 1 m of its target; the alarm only starts when the fox is inside the guard's alarm range, and the guard reacts after the chosen delay.

Simplifications

The fox runs in a straight line at constant speed and the herd is treated as frozen during the headless attack runs behind the graphs (120 random attacks per point); the live scene lets the herd move. Alarm range, reaction time, guard and fox speeds and the 6 m deterrence distance are illustrative values, not field measurements of alpaca guarding. Animals are never harmed in the simulation: an attack that lands is only counted. The percentages describe this model, not real predation rates.

Numerical checks on the page

Voronoi cell areas sum to the pasture area; 60,000 Monte Carlo attack points reproduce each cell's share; a two-animal case with the closed-form cell area; the stepped interception time against the quadratic root; and the Blender alpaca against its real height.

Loading model...
Loading Blender model...
Domain of danger of each animal, most exposed first
Attacks repelled against the number of guards
Attacks repelled against fox speed
Made with 🟠 Blender · Three.js