Status: done (2026-11-01, 2c6dd87)
Priority: 1
Size: L
Arch: expansion
Phase: implement
Design ref: Inheritance and expansion, Moving to new land (Decided, 1 Nov: who leaves, distance; the rest Proposed). Review: docs/review-expansion.md.
Goal: A village whose land within 6 steps is taken leaves its landless adults waiting for life: in populous small at seed 7, 8 of 11 villages are full by year 30 with 20–33 adults waiting. Let a waiting adult of a crowded village leave with their family and siblings who follow, and found a village of one farm on good land 10 to 30 steps away, living in a booth while they build the cottage.
Acceptance criteria (Kim, 1 November 2026: landless only, 10–30 steps; the numbers below are Proposed starting values, in a SETTLE record in src/sim/rules.js):
startPlots, a village is crowded when adults of it are in st.demand with no plot and no cottage coming, and findSite returns null. v.crowded holds how many such adults wait (0 when the village is not crowded).p.landWait); it is 0 again for anyone not waiting in a crowded village. Aged 18–45, they leave at the round with a chance of 0.3 at landWait 1, 0.6 at 2 and 0.8 from 3 (st.rand), oldest landWait first, then oldest, then lowest id.p.servant), farmhand or maid.ECON.ration) and seed for one field (ECON.seedPerField). The party’s stakes come first; then each old household, the settler’s first, gives grain above SHARES.reserveBase + members × SHARES.reservePerMember, as far as needed. Short of it, nobody moves, nothing is taken, and the log says the family could not spare the grain (once per settler and round).bfs with walkable) from the home village’s centre, on meadow (as generated villages and lone farms; siteScore scores only meadow), off rivers, unowned, not in st.used, at least 3 steps (hexSteps) from every house, green and field and from every tile of a plot or field project; with a block of 3 fields from placeFields (avoiding every yard) and a wood within 24 steps (nearestWood). Score: siteScore + 3 × the block’s summed fertility − 0.15 × steps. The block’s mean fertility must be at least 0.9 × the mean fertility of the home village’s fields (1.0 if it has none). The search stays under 30 ms on populous small (reported).commonsWood the nearest wood; plots: []; founded: { t, from, by }), and a new Culture settlement with the same id, the mother’s culture and a copy of the mother’s practice. Name: the founder’s given name in the genitive (an s added unless it ends in one) with torp, ryd, boda, hult or mark, the first not taken; if all are taken, villageName.booth: { i: 0, done: 0 } for the cottage stages, named for its surroundings as a lone farm; a new household (holder the settler) with the provisions as grain; house owned by it (setOwner); its field tile starts as the farm’s field project (f.project, clearing). The party moves in (moveTo, a “moved” life event naming the new village); followers are servants. The log names the settler, the party, the mother village, the new village and the steps.f.booth stands, the household posts the stages foundation (30 h), walls (60 h), roof (30 h) at the house, owned by the household; progress persists while a job is dropped. When the roof is on, f.booth is null and the log says so.@state lines for v.crowded, v.founded, p.landWait and f.booth; invariants in tests/lib/invariants.js: every village has a settlement with its id; v.crowded is a non-negative integer; f.booth is null or has i from 0 to 2.tests/settle.js, in npm test): a constructed crowded village with one waiting adult (landWait 3) and a sibling founds a village 10–30 steps away; the new household sows its first field in the spring after its field is broken; a village with room founds nothing; a party without provisions stays.docs/review-expansion.md, Decisions.src/sim/settle.js (after sim/society in the manifest): markCrowded sets v.crowded and p.landWait, settleRound (called by movingRound after startPlots) rolls who leaves, partyOf, provisions, newSite (candidates from one walking search per village and round, a third of the meadow tiles, the best 40 by siteScore less distance tried with placeFields), found and settleFarm. The booth’s stages are household jobs booth:f<id> from boothJob (src/sim/expansion.js), finished by the done of the kinds foundation, walls and roof. addSettlement (src/sim/society.js) is now the one maker of Culture settlements; loneFarmName (src/sim/layout.js) names lone farms; moveTo takes an optional event text. House sites are meadow only, as siteScore scores only meadow. A settler and spouse leave st.demand at once; followers stay in it.succession (src/sim/heirs.js) named a guardian for a heir who did not exist when a holder died with a spouse but no heir under “a right to her keep”; the changed random stream of founders on the tiny map reached it in tests/invariants.js.booth, crowded, founded, landWait; the dumps match with them left out): nobody settles in their first 3 years.