Status: done (2026-11-13) Priority: 3 Size: M Arch: animals Phase: implement Design ref: Animals; docs/review-animals.md (review of 31 October 2026); answers in QUESTION_ARCHIVE.md under “VB-047: animals review”. Goal: One wild grazer, roe deer (Kim, 30 Oct): meat and hides when hunted; forest edges and meadows; can damage crops. Acceptance criteria:
w.graze at forest edges.docs/testing.md stands; tests/deer.js in the integration tier).
Notes / questions:w.graze, which VB-136 makes (was ready).Implementation (13 Nov 2026):
src/sim/deer.js (new, after sim/byre): st.deer = {head[], since[], cap[], edges[][]} per region of w.regions, owned by sim/deer, made by
initDeer in makeState (and for older saves in sim/saves). A forest-edge tile is a wood tile (forest or pine) with open land beside it;
the capacity is DEER.perEdge (0.3) an edge tile, recounted at the year’s first step (recount, keeping the deer). The stock grows
logistically at DEER.growth (0.35 a year), read in closed form (Rules for cost, 3). A new run starts every region at its capacity.DEER.graze (1.5 cow-hours) a deer over DEER.spots (3) of its edge tiles in turn, through
sim/grazing’s graze (the owner of w.graze). Work: regions × 3 a day.DEER.crop.below, 0.45, the cattle’s) is browsed with DEER.crop.chance (0.04) a day times its region’s deer against the capacity;
fd.browsed counts it (sim/fields’ trample(fd, true)), and the reaping takes DEER.crop.loss (5%) a time. Logged as deerInCrop
(kept a generation, as cattleInCrop). Nobody is blamed: the deer are nobody’s.hunt, its record in sim/deer, registered in sim/kinds with fishing’s urgency by spare food. Foraging work for the men
alone (hunt: 0 for the wife, maid, daughter, retired and child; farmer 3, farmhand 6, son 7 from foraging), from 14; autumn and
winter; a 4-hour trip to the nearest forest edge within 6 steps whose region holds a deer or more. On coming home: a kill with 0.3 times
the deer against the capacity, one deer fewer and 3 rations of fresh meat (a sheep’s) into the larder, salted as the slaughter’s
(ledger reason hunt, routine, folded yearly). The deer random stream draws the kills and the crops.src/page/deer.js (new): roe deer art (summer red-brown, winter grey-brown; grazing and looking up), drawn within 2.5 hours of
the dark’s start or end, near the camera (zoom over 0.3), on the open ground beside an edge tile in view, a group of one to three on a
tile with chance 0.12 times the region’s density, by a hash of the tile and the day; at most 12. Reads st only.DEER in sim/rules beside FISH and HERD: that took sim/rules over its baseline, so VB-419 (Refactor: split sim/rules by concern)
was opened, as the lint asks. sim/kinds grew by three lines: VB-418 (each domain declares its own job kinds) was retitled to name
sim/kinds, which it splits, so the lint finds it. sim/records’ one line is covered by VB-372.deerGround (tiles searched for a hunting ground) and deerCrop (fields tested for deer); tests/counters.json re-recorded.Decisions (Deciding without Kim):
Validation:
tests/deer.js (integration): edges and capacity, logistic growth in closed form, the recount, the day’s grazing, crop browsing (a mended
fence, the chance, the loss at reaping, no deer), the kind and who hunts, posting by season, the urgency equal to fishing’s, a kill and a
miss, a hunted-out region; a month of autumn on a tiny village: 2 hunters, 4 kills, 5.7 deer down to 1.8, invariants daily; a save keeps
the deer and their stream; an older save gets them.st.deer in tests/lib/invariants.js; meat allowed as a routine total’s good; tools/stocks.js has its line.npm test 45/45; npm run verify 89/89, 3 targets out as on the base (scaling.routeRefresh, roundPairs, takeInWeighed; same values);
node tests/smoke.js and node tests/browser.js pass.tools/sim.js --map small: populous seed 7, 5 years: population, births, deaths and marriages identical each year
(348, 365, 374, 375, 390); mean grain 327.8/431.7/467.0/467.3/506.8 before, 329.4/435.8/472.0/472.0/505.5 after. Founders seed 7, 10
years: population identical (19 at year 10); mean grain at year 10 499.3 before, 495.8 after (men’s hours to the hunt). Households are
no worse off in hunger (no hungry days either way); the venison is small beside the grain, as wild meat was.docs/img/vb139-deer-dusk.jpg (populous tiny seed 7, 20:00 of the first day, deer on a glade by the wood).