Status: done (2026-11-16)
Priority: 3
Size: S
Arch: between
Phase: implement
Design ref: Inheritance, expansion and other bodies (Leaving home: A village’s round). QUESTION_ARCHIVE.md, “VB-242 and VB-280”, question 1 (answered 10 Nov). Measurements: backlog/VB-242.md (The order of villages).
Goal: In village id order (VB-277), the men of the first villages ask before anyone else every year. A woman of a later village may be chosen by an earlier village’s man before her own village’s men ask, and never the other way round. VB-242’s static study, on 38 states (populous small, seeds 1 to 6, years 5 to 30, plus small-y40 and medium-ref), had the same men ask under three orders. Today the first third of village ids lose the woman they score best 38% of the times they ask; by village id order they lose her 21% of the times, and the middle third 48% (43% today). The first third marry 44% of the times they ask (36% today), the middle third 36% (41%) and the last 40% (45%). Turning the first village by the year spreads the advantage: 34%, 40% and 57%, varying with the year rather than the village. The proposed answer in QUESTIONS.md is the criteria below.
Acceptance criteria:
year mod villages and go on in id order, wrapping: village (s + j) mod villages on the window’s j-th slot. year is cal(st.t).year, so the order is deterministic and draws nothing. The number of villages is the one the step reads (VB-277’s window rule).tests/spread.js: each village’s step runs exactly once a day in the turned order, and saves between steps go on, as before.--report customs).QUESTION_ARCHIVE.md, VB-242): decided, the starting village turns by the year. No longer waits for Kim.design.md, A village’s round, now records the turn as Decided (Kim, 10 Nov).villageTurn(k, n, year) in sim/occasions now gives slot j = (k - year) mod n, then step j (n <= 60) or floor(j * 60 / n); villagesOfStep in sim/lifecycle inverts it (village (j + year) mod n on slot j), so the meetings and the round share one rule. year is cal(st.t).year; no draw, no new export, no state. Cost: one modulo a village-step. tests/spread.js checks the meetings’ order is (j + year) mod villages on step j (the round’s count test is unchanged: one village a step); tests/occasions.js passes the year to villageTurn. npm test 55/55, npm run verify 112/112.--report customs): [0,0,1,1,1,0,1,0,0,0,1,0,0,0,1] at both seeds, the same as each other; they were not run on the base, so no before/after pair (VB-277 recorded the 14-custom list of its day).node tools/marriage-demography.js at seeds 1 to 12 against the reference.tests/offers.js failed after this merge (“the bride speaks for herself”; then section 11’s “the round marries the man of village 0”): both scenes assumed village 0 asks first. The turned order is intended, so the test was mended, not the code: section 1 now finds the round’s first marriage of a son of the house to a bride who speaks for herself (the fifth at seed 54, year 1) instead of taking the first; section 11 at seed 61, year 1, four villages, is now its mirror (man 32 of village 1, which asks first, and man 8 of village 0, which asks last), and asserts the year’s first village. Every assertion kept.