village-builder

VB-888: Populous seeding leaves an empty, nameless village on small islands

Status: done (2026-11-17) Priority: 2 Size: S Design ref: src/sim/layout.js; tests/populous.js Goal: Verify takes about half a minute and holds a small constructed case of each rule the nightly-only scripts assert (Kim, 13 November) Acceptance criteria: Populous seeded on a cramped island leaves a village with no farm and no name: on the 48 by 34 island of tests/lib/probe.js at seed 42 villages 2 and 5 (centres 1020 and 100) have farmsteads: [] and name: '' but fences and a settlement in st.cenv; at seed 7 village 4; on 36 by 26 at seed 42 village 3. Two villages named ‘’ break the rule “no two villages share a name” (tests/names.js), and a village with no farm has no one to hold its meeting. Found by VB-856 while moving names to small islands (it now runs on 60 by 44, where none is left empty).

Noted by VB-856, 16 November 2026.

Notes (VB-888)

Implementation: addVillage (src/sim/layout.js) drops a village whose first farm finds no room (it is not pushed, ids stay dense; its centre stays in used, so no site is tried twice); Populous (src/sim/scenarios.js) counts a centre only when a village stood. Check: tests/populous.js, 36x26 and 48x34 at seeds 7 and 42 (every village has a farm, a name, a unique name). Numbers at seeding, populous, probe islands (villages / farms / living), before -> after: 36x26 s7 3/8/49 -> same; s42 5/8/48 -> 4/8/48; 48x34 s7 6/22/137 -> 5/22/137; s42 7/20/118 -> 5/19/111; 60x44 s7 and s42 unchanged (4/24/150, 7/22/130). Empty villages before: 0,1,1,2,0,0; after: 0. Default map not measured beyond verify (populous.js extended is nightly). Scripts moved: tests/offers.js scene needed a bride who speaks for herself at seed 42 on the small island; the seeding changed, so SEED is now 9 (seeds 9, 10, 19 of 1..40 hold it).