Presets
Playback
Troop
Group size and how much of its time each animal spends head-up.
Threat and food
Raptor visibility window, detection rate of a watcher, food intake while head-down and the warning target.
Strategy
Layers
Model checks
The science
Behaviour as a Markov chain
Each animal is head-down (foraging) or head-up (scanning). A scan starts at rate λ and ends at rate μ = 1/b, so the vigilance fraction is v = λb / (1 + λb). Animals scan independently.
Detection
A raptor is visible for τ seconds. A head-up animal notices it at rate r; a head-down animal does not. One animal fails to notice with probability S1(τ) = (1,1)·exp(Mτ)·π, with M = [[-λ, μ],[λ, -μ-r]] and π = (1-v, v), evaluated in closed form. For N independent animals the troop is warned with probability P = 1 - S1(τ)N.
The common shortcut 1 - exp(-r N v τ) assumes a constant number of watchers and over-estimates P, because watchers come and go and some animals are blind for the whole window.
Sentinels
With k = N v animals always up nobody is blind: P = 1 - exp(-r k τ), which beats random scanning at equal v (Jensen's inequality).
Trade-off
Intake per animal is γ(1 - v). The vigilance needed for P ≥ target is found by bisection; for large N it falls roughly as 1/N (Pulliam 1973, Bednekoff and Lima 1998), so a bigger troop lets every animal eat more.
Honest simplifications
- Animals are identical and scan independently; real mongooses coordinate and differ in hunger and rank.
- Detection rate r is assumed rather than derived from vision, distance and cover.
- The alarm reaches every animal instantly. Nothing is harmed: a missed alarm is only counted.
- Predation risk, food depletion and competition costs are not modelled. All numbers are illustrative.
What to try
- Press "Lone animal" then "Troop of 8, v = 15 %": same threat, very different warning rate.
- Raise the troop to 24 and drop v to 5 %: detection stays high while intake rises.
- Switch to designated sentinels at equal v and compare the green curve.
- Set the bout to 6 s: long rare scans leave blind gaps.
- Let events accumulate and compare the live warned fraction with the exact P.