Status: done (2026-11-16)
Priority: 2
Size: M
Arch: between
Phase: implement
Design ref: Inheritance, expansion and other bodies (Between villages: Ease of mixing, Over the sea; Leaving home: Marriage). Survey: backlog/VB-281.md
Goal: A village’s round (VB-277) matches its own men with the unmarried women of every village, and the score knows nothing of how far apart the two live: it adds 2 for the same village, else 2 × the lesser of the two villages’ ties to their culture’s centre (matchScore, src/sim/matching.js:17-22). So a woman 60 hours’ walk away, or on another island, scores as one next door when both villages lie near the centre. VB-281 measured the marriages of the last ten years in the fixtures’ histories: at medium-ref, of 118, 47 within the village, 17 within a day’s walk (12 h), 34 further and 22 over the sea; at small-y40, of 70, 19, 10, 33 and 8. Kim decided on 10 November that distance governs the mixing and close villages mix easily. Make the pool the women within walking reach, and the score prefer the nearer.
Acceptance criteria:
hoursBetween(st, v, u) finite (by land, at most ROUTE.reach, 67 h; VB-286). A woman of a village over the sea or beyond reach is not in the pool. The pool is built from the villages within reach and their living, not from the island’s living filtered.2 × exp(-h / 8) for h walking hours between the two villages (MARRIAGE.nearHours 8, a tunable): 2 within the village, as today; 1.21 at 4 h, 0.94 at 6 h, 0.45 at 12 h, 0.10 at 24 h, 0.01 at 41 h. It replaces the term of the two villages’ ties, which keep their use in the culture’s drift. The scale 8 h is the tie’s own (its decay is exp(-d / 25) in steps, about 8 h of walking at 3 tiles an hour).kinPressure, as VB-277 leaves it): an unmatched pawn is pushed only when it has no allowed partner among the free pawns of the other sex within reach, but would have one under the next looser limit within reach; the plenty pull is unchanged.matchBar, src/sim/matching.js): a wished partner beyond reach is refused with that reason, shown where the wish is set.tools/marriage-demography.js): marriages a year and mean first-marriage age, each within 5%; the share of women 45 to 54 never married within 2 points; each seed’s never-married count; seeds 7 and 42 reported. Marriages by the walking hours between the two villages (the same village, up to 6 h, 6 to 12, 12 to 24, 24 to 48, over 48, over the sea), against VB-281’s ten-year shares above. Customs over 20 years at seeds 7 and 42 (--report customs), the marriage limit included, since kin pressure now counts within reach. Households with an unmarried adult over 30 at year 30. tests/counters.json re-recorded with roundPairs listed. If the demography is out, say by how much and why, and do not tune here: the suitor’s visit (VB-289) and the score’s scale are Kim’s.small-y40 and by tests/scaling.js; medium-ref and history.roundPairs owed to VB-662 by VB-881: no fixture of these sources on the machine.) Cost (target): pairs scored a year, VB.count.roundPairs, at medium-ref and small-y40, before and after: fewer, since a man scores only the women within reach (Rules for cost, 2: pairs meet only among those who can meet). The scaling.roundPairs target (+0.85 out on main) and history.roundPairs (+2.1) reported with their residuals. Each pair’s term is one table read (VB-286), no search.
Notes:matchScore (sim/matching.js, since VB-274), and sim/matching.js added to what it edits.QUESTION_ARCHIVE.md, “VB-281”): no mixing without a route by land until slice 10, and the suitor’s visit (VB-289) narrows the pool; the two proposals this task proceeds on are Decided. VB-274 and VB-275 are done.QUESTIONS.md, “VB-281”): the pool reaches only villages by land (question 4: no land route, no mixing, until slice 10’s boats and ice; every village of both fixtures has a land neighbour within 16 h); and, until the suitor’s visit (question 1, VB-289), every woman within reach is in the pool with the distance in the score. If Kim answers question 1 as proposed, VB-289 narrows the pool to a day’s walk and the villages visited.sim/matching.js (matchScore, matchBar), sim/lifecycle.js (the pool, kinPressure) and sim/rules.js (MARRIAGE.nearHours).Implementation (16 Nov 2026):
sim/matching: poolFor(st, v), the living of the villages u with hoursBetween(st, v, u) finite (v first), read from each village’s
farmsteads, their households and members: not the island’s living filtered. A living pawn of no household is in no pool (as today,
when settlementIdOf is null). nearTerm: MARRIAGE.sameVillage × exp(-hours / MARRIAGE.nearHours), one table read, 0 beyond reach;
it replaces the lesser tie in matchScore (the ties keep their use in the drift). matchBar refuses a partner whose village is beyond
walking reach of the man’s: “sim/rules: MARRIAGE.nearHours 8.sim/lifecycle (villageRound): the pool walk is poolFor’s list (roundWalk counts it); the living’s kinPush is cleared at
village 0’s round by its own walk of the living, as before; kinPressure is unchanged in code, since its men, women and others are now
the pool within reach. Net 0 lines in lifecycle (VB-062’s merge takes it to 703; VB-876 splits it).tests/matchreach.js (in npm test): the pool of A with B at 6 h and C beyond reach; the term at 0, 4, 6, 12, 24, 41 h; the wish’s bar;
a round where A’s men have only first cousins in B under “first”: pulled towards “close” with B in reach, not pulled with B beyond.Decisions:
Validation (16 Nov 2026), populous small, 30 years (scratch mb.js, marriages binned by the hours between the two’s villages the day before):
tools/marriage-demography.js 7 42): marriages a year 6.183 -> 6.167 (in); first-marriage age 20.74 -> 20.84 (in);
never-married women 45 to 54: 0 -> 0.05 (one of 10 at seed 7; 0 of 22 at seed 42), now in the band (was +0.011 out at these two seeds).
Seed 7: 5.90 -> 5.93 a year, age 20.61 -> 20.72, never married 0 -> 1; seed 42: 6.47 -> 6.40, 20.87 -> 20.97, 0 -> 0.cu.js, as --report customs reads them): the marriage
limit “first” in every village, before and after (19 at seed 7; 17 -> 18 at seed 42). Seed 7: claims kin 17, assembly 1, villagers 1 ->
kin 15, assembly 3, anyone 1; new land all “village” -> 17 village, 1 labour, 1 intended; the rest unchanged. Seed 42: one or two
villages of 18 drifted elsewhere (daughters’ share equal 2, daughters first 1, feeding children first 1, commons first 1); handover and
widow all marriage and life (were 16 and 1). Drift between two trajectories, not a direction.Cost: roundPairs a year, seed 7 129 -> 137, seed 42 103 -> 54; a year on from a small-y40 save (seed 7; every pair by land within
16.3 h) 110 -> 110 pairs, roundWalk 17,917 -> 15,929. scaling.roundPairs 2 -> 2 (+0.85 out, unchanged: the test’s four villages lie
within reach); history.roundPairs not measured (+11.92 out on the record of 10 Nov). tests/counters.js: roundPairs 0.001125 and
roundWalk 0.06526 a pawn-day, as recorded (two villages within reach), so tests/counters.json is not re-recorded; heirRank and roundRank
+0.000225 out, as on the base. Each pair’s term is one table read.
tests/occasions.js moved from seed 11 to seed 4: with the pool within reach, the first round at seed 11 marries one couple, where
the test needs two (seed 4 marries three). npm run verify: 173 of 173 pass, 9 targets out (advisory).