Status: done (2026-11-13)
Priority: 2
Size: M
Arch: between
Phase: implement
Design ref: Inheritance, expansion and other bodies (Between villages: A journey, Provisions and the season, Who travels). Survey: backlog/VB-281.md
Goal: A pawn who changes household is placed at its new home at once (moveTo, src/sim/heirs.js:150-157, calls placeAtHome), wherever the home lies: a bride married into a village 60 hours away is at her husband’s door in the same six-minute step. Kim decided on 10 November that the pawn should physically travel. Make every move between two villages a journey: the pawn walks the route from where it stands to its new home, from 6:00 to 18:00 each day, sleeps where it stops, and eats food carried from the household it leaves. Membership changes as today, at the act; only where the pawn is, and what it does, changes until it arrives.
Acceptance criteria:
moveTo (and foundHousehold’s moves, src/sim/membership.js:19-20) start a journey instead of placeAtHome when the pawn’s old household lay in another village than its new one (settlementIdOf of the two farms), or, for a pawn with no household, when the pawn stands more than 12 walking hours from the new home’s green (hoursBetween of the nearest village). A move within a village is walked too (Kim, 10 Nov, QUESTION_ARCHIVE.md, “Consistency review”, pawns placed, question 1): the household changes at the act and the pawn, released from its job but keeping the load it carries, walks home to the new door (goHome), with no journey entry; only a pawn already indoors at its old home at night walks at 6:00. The consistency review’s probe counted 64 such moves in 40 years of populous small, seed 7 (median 2 tiles, the longest 6.6). Measured by VB-281, a year from medium-ref moves 26 pawns between villages (12 by marriage) and from small-y40 10 (5 by marriage): the spouse who moves, a servant (service.js, takeServants), a servant where labour is short (serveWhereShort, service.js:140, VB-090), kin or a servant who comes to a household short of people (takeIn, service.js:173, VB-308), a guardian and its family (careForOrphans), children who go to kin or service (heirs.js, kinHomeFor, serviceHome), a claimant’s household moving into a mended farm (farmclaims.js, moveIn), and a settlers’ party walking to its booth or a small village (settle.js, found). The counts predate VB-090’s and VB-308’s movers: the task measures them again.st.journeys, the open journeys sorted by due time, each {id, pawn, to (tile: the new home's house), why ('move'), due}, with ids from a counter in st and never reused. Owner sim/agents (src/owners.json), @state line, saved with the run; a save without it loads with none. A journey starts at once if it is between 6:00 and 16:00, else at the next 6:00 (its first entry’s due). Each due entry starts a leg: the agent walks its route (route, then walkTo) towards to, and at 18:00 a pawn still on the road stops where it stands, outdoors, and its next leg is due at 6:00. A route is found once, at the first leg, and kept on the agent (a.path, a.seg) between legs, so a journey costs one route search. Arrival ends the journey; the pawn is then at home as placeAtHome would have put it.st.journeys[0].due, as dueOffers reads only the first offer; in VB-241’s calendar this is one hourly entry at 6:00, guarded by an open journey. Between legs the pawn is not awake (awake, src/sim/agents.js:242); while it walks it is, like any walking agent.onHour’s goHome loop skips it as it skips a commanded pawn, and as VB-126 skips a pawn at an occasion, clock.js:45, a.occasion !== null: the pattern to follow), and is not drawn as company (companyFor); it may talk with those it passes, as anyone may. It sleeps where it stops. A pawn who dies on the road dies there (stillAtDeath), and its journey is dropped (killPawn). A pawn whose household changes again while on the road (a death at home, a handover) has its journey’s to set to the new home, and if that lies in the village it walks from, it turns back.ceil(h / TRAVEL.dayWalk) days for h hours of walking (TRAVEL, a new tunables block in sim/rules.js: dayWalk 12, the walking hours of a day, 6:00 to 18:00), one ration a day for a pawn of 14 or more and half below, as a store movement with the reason journey (src/sim/stores.js), from its stored food above its seed, or, where that falls short, from the new household’s. The pawn eats it on the road: while on a journey it is left out of its household’s meal share (src/sim/hunger.js), and its hunger is fed from what it carries. Settlers keep SETTLE.provisionDays of stakes as today, and walk on them. A household with no food to give sends the pawn unprovisioned: it goes hungry on the road, which shows in its hunger log.tests/record.js): setOut when a journey starts, in the pawn’s record, naming the farm it leaves and the one it goes to and the hours; arrived at the end, kept out of the village log (a routine event, folded with the year’s routine events, VB-199); diedOnRoad is the died event with the place where it fell. The village log keeps today’s line for the act (the marriage, the service), which now says “and sets out for”, where the home is in another village.tests/journeys.js in npm test): a move within a village is placed at once, as today; a move between villages walks, legs at 6:00, stops at 18:00, arrives at the new home in ceil(h / 12) days or fewer; the provisions leave the old household’s store and the pawn eats nothing from the new household’s meals while on the road; a death on the road drops the journey; a save made with a pawn on the road loads and plays as the unbroken run; invariants (tests/lib/invariants.js): sorted by due, ids unique and below the counter, each pawn living and in at most one journey, to its household’s house.tests/counters.json re-recorded, walkStep and routeSearch listed; over populous small at seeds 7 and 42 for 20 years, tools/sim.js’s yearly line and tools/balance.js (rations against need), and the hungry-households band (node tests/bands.js), with a word on whether the movers’ households are worse off. Journeys a year, days on the road and rations carried, at medium-ref and small-y40 (one year, --load).medium-ref and 10 at small-y40 (before VB-090’s and VB-308’s movers), each one route search (bounded at ROUTE.reach), one due entry a leg (about 3 legs a journey: 80 entries a year), and the agent’s walk, about 12 h × 10 steps a leg (under 1,000 walk steps a journey, against millions of walkStep a year). Measured: node tools/sim.js --load on each fixture --years 1 --report perf, before and after.@sys lines, docs/architecture/modules.md and ownership.md follow.
Notes:sim/heirs’ moveTo changes the household at the act and hands the pawn to sim/agents’ moved
(in place of release and placeAtHome). To another village (village of the two farms; with no household, more than
TRAVEL.dayWalk hours from the new village by hoursTo: the nearest village’s row of the hours table) it calls setOut; within one it
is released and walks home (goHome); indoors at night it stays where it is and walks at 6:00 as anyone does (the matcher), since
placeByDoor at the dark’s end now leaves a pawn indoors at another house where it is. A pawn on the road whose household changes
again is retargeted (its route dropped, found again). Phases: journey while a leg is walked, road before the first leg and
between legs (out of awake, route kept on a.path). Calendar: 6:00 dueJourneys (reads st.journeys[0].due only), 18:00
stopJourneys (before the go-home loop, which skips a travelling pawn as it skips one at an occasion), and after the households’ meals
feedTravellers; all three guarded by an open journey. The work, walkTo, goHome, idle and attend verbs refuse a pawn on
the road; occasions’ canGo and the cook’s call pass it over; its household’s meal leaves it out (sim/hunger, onRoad). Arrival:
endJourney in arrived, the pawn placed as placeAtHome would, the food left over into the new home’s meals (reason journey).ECON.rawGrain a ration, carried as rations on the
journey (food; from too, the farm left), since a pawn holds only a stake as a store holder; settlers (carry false) take theirs
from the new household, which holds their stakes. A journey whose act falls between 16:00 and 6:00 waits where the pawn stands (indoors
at its old home, or outdoors). The died event’s place is a new record field tile (the record’s fields are fixed), and its log line
ends “on the road”. setOut is notable, arrived routine (GENERATION), both on the pawn’s record only. The act’s log line says “, and
sets out for it” for the marriage, enterService and an orphan’s service (extinct); the other acts’ lines are unchanged. No
sleeping art exists outdoors: a pawn stopped on the road is drawn idle, as describe says “Resting on the road to X”. Within the
route search’s reach (200 meadow steps, about 17 hours) the walk follows the route; beyond it, as any walk, it goes straight.sim/births, placeAtHome); the player’s queued
commands are refused on the road, not held.tests/journeys.js (npm test) on tiny states; invariants in tests/lib/invariants.js; npm test 46/46,
npm run verify 89/89. Opened VB-419 (split sim/agents, 776 lines, 40 exports), VB-420 (sim/hunger, 20 exports), VB-421
(sim/rules, 806 lines), as the lint asks.tools/balance.js (seeds 7, 42): made/need 1.82, 1.54, 1.20 by weather
before, 1.80, 1.55, 1.21 after; hungry 0% both. Bands (node tests/bands.js): identical but worst-household at seed 11, 0 to 0.021;
0 targets out both. The movers’ households are not worse off on these measures (no hungry days added; a mover’s provisions are a ration
or two a journey). Counters (tests/counters.js): unchanged, the probe’s 30 days hold no move between villages, so
tests/counters.json is not re-recorded (walkStep 90.64, routeSearch 0.361 a pawn-day, both).medium-ref, 19 journeys (41 moves between farms), mean 0.48 days on
the road, longest 1.16, 19.5 rations carried, none died on the road; small-y40, 30 journeys (38 moves), mean 0.26 days, longest
0.95, 25 rations. Cost: walkStep +724 of 4.34 million (medium-ref) and +1,022 of 3.04 million (small-y40); routeSearch +1 and +5
(cache hits for the rest); the year’s wall time 129.9 s and 129.2 s at medium-ref, 107.2 s and 110.4 s at small-y40, on a machine
shared with other runs (noise; under heavy load, so not the budget’s ms a day).serveWhereShort and VB-308’s takeIn added to the moves between villages, with a note that VB-281’s counts predate them, awake’s line refreshed, and VB-126’s skip of a pawn at an occasion named as the pattern for the goHome loop.st.offers’s pattern (VB-293); the walk is walkTo; provisions are a stores.js movement as settlers’ provisions are. No new job kind: a journey is not work a household posts and anyone may take, but a move of one pawn; a visit (VB-289) is a journey with a way back.sim/agents.js, sim/heirs.js (moveTo), sim/membership.js, sim/hunger.js, sim/clock.js.