Stellar Grove · Concrete Mathematical Modelling
Which worms should a bird eat?
A big worm is worth more but takes longer to eat. When should a bird ignore small worms?
Chapter 7 · Optimal decision and reward. A worked example rebuilt from the chapter's topic in Mike Mesterton-Gibbons, *A Concrete Approach to Mathematical Modelling*; the scenario and numbers are our own illustration, not the book's text.
Headline: Rank worms by energy per second of handling: big worms (5 J/s) beat small ones (2 J/s). The bird should still eat small worms now, and ignore them once big worms are met more than 0.083 times a second, however many small worms there are.
- 1.72 J/sbest intake rate (both kinds)
- 0.083/sencounter rate with big worms above which small ones are ignored
- 0effect of small-worm abundance on whether to eat them
The problem
A thrush searches a lawn. It meets big worms ( J, s to handle) at rate per second of searching, and small ones ( J, s) at . Eating a small worm takes time that could have been spent finding a big one. Which worms should it take to maximise energy per unit time?
The model
Time alternates between searching and handling. Over a long foraging bout of search time , the bird meets worms of type ; if it eats the types in its diet , the long-run intake rate is the ratio of expected energy to expected time (Holling's disc equation, a renewal-reward ratio):
Rank types by profitability . Adding the next type raises exactly when its profitability beats the rate already achieved without it. For two types, small worms are worth eating when
Here the threshold is . At the specialist rate is 1.429 J/s and the generalist 1.724 J/s.
Try it
Diet choice explorer
Drag the sliders; hover the chart to read values.
Key findings
- The zero-one rule: a worm type is either always eaten or always ignored on encounter; there is no 'sometimes' in the optimum.
- Whether to eat small worms doesn't depend on how many there are. With big worms common (λ₁ = 0.15), the bird ignores small worms whether they are met 0.5 or 2.5 times a second (the optimal diet is big only in both cases: confirmed).
- Abundant good food makes a forager picky: as big worms become common the specialist's rate rises past what any small worm offers (2 J/s), so small worms drop out at λ₁ = 0.083.
- The same renewal-reward ratio decides when to leave a depleting patch (the marginal value theorem,
decision.mvt_exponential).
from books.concrete_mathematics import decision as de
d = de.optimal_diet(rates=[0.05, 0.5], energy=[40.0, 6.0], handling=[8.0, 3.0])
print(d.include, round(d.rate, 3))
print(round(de.switch_density(0.05, e=(40.0, 6.0), h=(8.0, 3.0)), 4))
print([round(x, 3) for x in de.mvt_exponential(G=10, a=0.5, travel=4)]) # patch-leaving time and rate
# → [0, 1] 1.724
# → 0.0833
# → [3.01, 1.11]
Assumptions and extensions
- Sequential, random encounters and perfect recognition: the bird knows a worm's type instantly.
- Energy rate is the currency. A bird at risk from predators may trade energy for safety, which needs the dynamic programming of the next explainer.
- Field tests (great tits choosing mealworm pieces on a conveyor belt) found the predicted switch, with partial preferences around the threshold.