Status: done (2026-11-19) Priority: 3 Size: S Arch: town Phase: implement Design ref: design.md, Balance loops and targets (The balance review: Deaths; The growth budget: The town); Settlements, Towns and regions (Crowding); docs/plans/VB-189.md, section 5.7 Goal: The urban penalty is crowding (Kim, 16 Nov): living close costs lives, by a named rule with a physical meaning, wherever it happens, and stands in for disease until disease exists. Acceptance criteria:
CROWD in src/sim/rules.js, each with its meaning: steps 2 (hex steps around a house that count as living close), free 36 (people within them that cost nothing: about the 99th percentile of a village house, 31 to 41), per 0.035 (hazard added for each person beyond), max 2.5.steps of its house, its own among them. Its factor, 1 + per x max(0, n - free), at most max, is compiled into an array: refreshed when a house is founded, left or rebuilt and when people move in or out at the round, never daily; one writer, an owner in src/owners.json (a cache; find its owner in target-v2 section 4 first), rebuilt on load and not saved. tests/lib/invariants.js: the array equals a fresh count.death.hazard through the rules registry, declared before the first seed; the death roll reads the array (rule 6; value() allocates nothing). explain names it (“crowded: 44 people within 2 steps”).design.md, Towns and regions: a label no rule reads): the contribution is by household, wherever its house stands.tests/tiny.js): ten houses within 2 steps of each other at five people each give 1.49; four give 1; the factor never passes 2.5; a house left lowers its neighbours’ factor at the refresh.free and per, so that under 2% of village households pay anything and ten plot households packed close pay about 1.5; the values tried and what each gave in the task file; the rest as a tuning note.medium-ref) x a refresh on a house’s or a round’s change x the 19 tiles within 2 steps, by an index of houses by tile; nothing a day. A declared counter for the refresh, before and after in tests/counters.js.Noted by VB-189, 16 November 2026.
Done by the VB-766 run (19 November):
st.crowd, st.crowdN, owner sim/crowding, a new small kernel module beside sim/hex) changes at every membership change (join, leave, death, founding, dissolving), not only at the round, so that the invariant holds exactly each day; a house never moves, so its farms are found by a pass over the farms at the change (counter crowdScan), not by a tile index. The death roll reads the array; no daily pass.illness (stands in for disease). explain carries a note (“crowded: 44 people within 2 steps”), a new optional field of a contribution.free 36 and per 0.035, kept; run on small, populous seeds 7 and 42 (40 y) and founders seed 7 (50 y), each against per 0: share of household-years above factor 1: populous 7 by decade 2.8, 0.6, 0, 0.2 % (highest 1.18, at year 10; 5 households ever), populous 42 0.3, 0, 0, 0 % (1 household ever, 1.10), founders 7 none. Deaths per 1,000 by decade identical to per 0 (22.7, 24.3, 23.4, 25.7 on seed 7; 22.1, 25.8, 26.6, 26.1 on seed 42; founders 9.5 at year 50), growth the same: 2.05 and 1.96 a year on populous (the paying households’ few deaths did not move a count), 2.59 on founders. Ten plot households of five pay 1.49 (tests/crowding.js). Left: the first decade’s 2.8% on seed 7 (80 households) is over the 2% aim; noted for tuning (free 38 would clear it).