Choose quantities of eight foods to meet five nutrient requirements at minimum cost (Stigler's classic diet problem). Each food has a price and a nutrient profile, and falling short of any requirement is penalised. Cheap foods rarely cover every nutrient alone, so the optimum mixes a few complementary ones. Score is food cost plus unmet-requirement penalty, to minimise. 8-D problem.
| Algorithm | Cost | Evals |
|---|---|---|
| — no runs yet — | ||
The JS objective is a line-for-line port of
example_applications/diet_problem and agrees to floating-point tolerance.
Green bars are food servings chosen; the right group shows each nutrient's intake
against its requirement line (red if short).