Status: done (2026-11-17)
Priority: 2
Size: M
Arch: fair
Phase: implement
Design ref: Settlements, The gathering (10 Nov); docs/review-markets.md, sections 2.3 and 5
Goal: The first thing between villages: a yearly gathering at a host village’s green. Villages offer to host and choose where to go, so hosts compete; the villages of one gathering are a district.
Acceptance criteria:
TRAVEL.dayWalk). The walk is hoursBetween(st, v, host) (VB-286; by land only, so islands gather apart: Kim, 10 Nov); plus up to 4 for customs that differ (hard customs count double); less 0.5 for each household of kin in the villages that went there last year, at most 2; less or plus up to 2 for the disposition between the two villages (read from their holders’ opinions and balances, never stored); less 1 if it was held last year; less up to 1 for the ale its host poured at last year’s gathering (VB-305, merged: Stores.pour, aleStanding), so a host that poured nothing loses that pull the next year (carried from VB-305). A host’s own walk is 0. Tunables in src/sim/rules.js. (GATHERING; the customs hours are not added: decision 2.)src/owners.json), in the WORLD list of src/sim/saves.js, with invariants: the host is an inhabited village with a green; every attending village is within reach. (village.gathering, owned by sim/gathering; saved with st.villages, not in WORLD, which lists the world’s tile arrays: decision 7. Inhabited is checked at the settling, in the test: decision 6.)district(st, host), gatherings(st).)gathering.)st.villageHours (VB-286), villages × hosts once a year, in each village’s own meeting step (VB-278); no search of its own; a counter; measured on medium-ref. (Built: four counters, villages × hosts in each meeting step, no search; not measured on medium-ref: no fixture in this worktree, owed in VB-1008.)tools/sim.js --report): gatherings, their hosts and villages, by year; over 40 populous years on small and medium, how many stand, how often a host changes, and the share of villages with no gathering (islands apart is accepted; the number is for slice 10). (--report gathering built; 10 years run, seeds 7 and 42, below; the 40-year runs are owed in VB-1008.)node tools/same.js --base REF prints same, or what changed is listed). (tests/gathering.js; what changed is listed below.)
Notes:QUESTIONS.md, “VB-294”).docs/review-markets.md; QUESTIONS.md, “VB-183: the gathering, the fair and goods of place”). Its numbers were settled by Kim’s answers of 10 November (QUESTION_ARCHIVE.md, “VB-183”; design.md, sections 8, 9 and 11).sim/gathering (src/sim/gathering.js), loaded before
sim/meetings; the state village.gathering ({chosen, by, hosting, prefs, year, host, ale}), owned there; tunables GATHERING in
src/sim/rules.js; the meeting’s verb gathering in src/sim/commands.js; four work counters (gatherChoice, gatherDisposition,
gatherKin, gatherSettle); the record kind gathering (kept, one line a gathering at its host, in the village history’s Customs and
meetings); invariants in tests/lib/invariants.js; tests/gathering.js (in npm test); node tools/sim.js --report gathering
(tools/gathering.js). At each village’s meeting step (autumn day 10, VB-278), after its routines, chooseGathering ranks the villages
that can host (a green and people on its farms) within a day’s walk by effective hours, from the village’s row of st.villageHours:
the walk (its own 0), less 0.5 an hour a household of kin (kinHouseholds) in the villages that went there last winter (at most 2),
less or plus up to 2 by the pull between the villages (its holders’ opinions of the other village’s holders among their ties, memories
and goodwill balances, summed by village over its holders, -1 to 1, never stored), less 1 if held there last winter, less 0.25 a barrel
its host poured there (at most 1; 0 until VB-295 pours). At 18:00, once every village has chosen, settleGatherings assigns each
village to its first host still in the running (deferred acceptance: a host takes those that ask nearest first, those within 2 hours free,
the others while 3 goers a household fit its 10 guests a farm; one turned away asks its next), and puts the smallest gathering that does
not stand out of the running until all left stand. The date: GATHERING.dates.harvest (winter days 1 to 3), read by whenHeld through
dateOf, the one place VB-809 makes the culture’s gatherDay.decision note in the inbox): (1) a gathering of fewer than three is put out of the running,
the smallest first, and its villages choose again until every one left stands, not once: every village with a green walks 0 hours to
its own and offers, so choosing again once among those that stand held no gathering on any seed (seed 7 small: none in 3 years);
(2) the customs hours are not added: the design marks them Under revision for opinion between pawns whose customs differ (Kim, 12 Nov),
which VB-520 built and the disposition reads; (3) the actor is the village’s meeting ({settlement}), as for its routines, until the
alderman (VB-314, blocked) carries out what the meeting decides (principle 16); the settling is no act, only what the choices add up
to; (4) a village offers to host when it has a green and ranks its own first; without a quorum its culture’s noDecision practice
applies (nothing: no gathering that winter; asLastYear: last year’s choice); (5) the choice is settled at 18:00 of the meetings’
day, since the hosts need every choice to count their guests; the gathering’s date is unchanged; (6) that the host is inhabited is
checked at the settling (the test), not as an invariant, since a village may empty at the moving round before the winter; reach is
checked for the year’s choice only, as the table of hours is compiled anew each autumn; (7) village.gathering is saved with
st.villages, so it needs no place in WORLD, which lists the world’s tile arrays (the save test loads it back as it was);
(8) advocacy: the meeting’s choice reads no cause, as its routines read none (their need is the stand-in until VB-313’s Decisions);
the player’s pawn weighs in through the quorum and, as a holder, through its opinions.node tools/same.js --base 5d39260 (founders and heirs, seeds 7 and 42, tiny, 2 years): only villages[*].gathering
differs (8 keys, a run-year each); nothing reads the choice yet, so no household is better or worse off until VB-295 sends goers.
On populous the record gains one gathering line a gathering a year. npm test and npm run verify pass.Numbers (populous, 10 years, --report gathering; after the run’s branch of 17 Nov):
| Map, seed | villages (y1 to y10) | gatherings a year | villages naming each green, y10 | host changes / kept | no gathering | turned away (lodging) |
|---|---|---|---|---|---|---|
| small 7 | 10 to 14 | 2 (Ekeby, Frövi every year) | 0:13 2:10, others 1 to 12 | 0 / 73 | 22.7 % | 9.1 % |
| small 42 | 8 to 13 | 1 (Torsåker every year) | 2:7, others 1 to 7 | 0 / 41 | 53.8 % | 11.3 % |
| medium 7 | 23 to 31 | 3.4 (Åsinge and Steninge every year) | 14:19, 9:23 | 29 / 153 (15.9 %) | 19.6 % | 4.1 % |
| medium 42 | 28 to 34 | 7.8 | 8:13, others 3 to 11 | 22 / 252 (8.0 %) | 4.0 % | 0.6 % |
Work counters over the 10 years: small 7 gatherChoice 1,121, gatherDisposition 31,523, gatherKin 684, gatherSettle 1,367;
small 42 1,045 / 40,200 / 1,616 / 1,084; medium 7 6,213 / 100,583 / 2,730 / 6,038; medium 42 9,674 / 85,814 / 4,576 / 6,389.
gatherChoice is villages × villages once a year (a read of a row of the table each; no search); the settling is villages × the hosts
each names, a round for each host put out of the running; there is no pass over pairs of villages beyond a village’s own row.
Times are left to the nightly bench (a shared machine). Small 42’s half without a gathering are the villages no host lodges or none
reaches: islands apart (accepted, Kim 10 Nov) and a host of few farms; held last year’s hour makes hosts stay (no change on small).
medium-ref (no fixture in this worktree).