VB-786: The site search on the forested island: forest sites, hours along a trail, the small village within 6 hours
Status: done (2026-11-23)
Priority: 2
Size: M
Arch: far
Phase: implement
Design ref: design.md, Moving to new land (Settling in steps; Sleeping away from home); docs/plans/VB-445.md, sections 2 and 3; design.md, Moving to new land (Where; The new site)
Goal: On the forested island a crowded village finds land to settle: on forest, as far as there and back in a day along a trail.
Acceptance criteria:
A site may be wooded (broadleaf or pine): siteScore, the block of fields (placeFields), the room (FIELDS.room) and SETTLE.fertility read a wooded tile as the meadow it becomes when grubbed; the first field’s project fells, grubs and breaks it (the steps a plot has), and the house tile is felled and grubbed before the cottage’s foundation. A field broken there is fresh land.
The reach is hours: SETTLE.hours (6) from the green, by one bounded search (reachCosts’s, with a wooded tile that is not a path at a path’s cost: the trail the party would blaze), which replaces reachOf’s count of steps; SETTLE.reach goes (its lower bound never bound: centreApart, 12 hex steps, stays and is the only near bound); SETTLE.perStep becomes SETTLE.perHour (1.2). The log’s “within a day’s walk” says what the search does.
A small village is joined within SETTLE.join hours (6) by the villages’ table (hoursBetween), in place of 30 walking steps.
Until VB-787 lands the party still moves at once; with VB-447 not built its walk is over pathless ground, which the task says in its numbers.
Cost (Rules for cost, 9): one bounded search a crowded village where someone leads, a round: at most 7,057 tiles over open meadow, against the 67 hours of a row of the table; a counter settleReach; node tests/counters.js before and after. No search when nobody leads.
Numbers before (VB-780’s island, meadow sites within 10 to 30 steps) and after, populous small, seeds 3, 7, 11 and 42, 15 years, and medium, seeds 7 and 42, 5 years: villages founded and farms joined, the sites’ hours from home and their ground (meadow or forest), adults waiting with no room at the end, growth against Deciding without Kim 2, hungry days of the settlers’ households in their first two years against the others (a description). The plan’s year-0 counts to compare with: with meadow only 0 of 30 villages find a site on medium at seed 7; within 6 hours along a trail every village has wooded sites.
Up to five short runs on SETTLE.hours (3.75, 6, 12 named in the plan) if the first value founds no villages or scatters them; the values tried and what each gave in the task file, the rest to docs/tuning.md.
Tests on a constructed state: a village ringed by forest finds a wooded site and none beyond 6 hours; a site 11 hex steps from a centre is refused.
Noted by VB-445, 16 November 2026.
Notes (VB-786, 23 Nov 2026):
Built: trailReach (sim/routes) over trailStep (sim/walking); clearable/clearedFertility (sim/crops) read by siteScore, placeFields and roomAt under a cleared flag, so the generator and plots are unchanged. A wooded field or house gets fell and grub steps first (fellSteps, sim/fieldplans); fell and grub gained a done for a household’s own step; felled timber goes to the cottage’s walls. Other villages’ wood is kept free of new houses and fields.
SETTLE.hours 6 kept: at 3.75 (medium 42, 5 y; small 42, 15 y) fewer villages were founded (21, 10 against 33, 16), more adults were left waiting (19, 21 against 17, 7) and settlers went hungrier (docs/tuning.md). 12 not tried: at 6 every map founds.
Numbers (populous; before to after): founded small 3, 7, 11, 42 over 15 y: 8, 4, 6, 7 to 10, 23, 15, 16; medium 7, 42 over 5 y: 0, 8 to 13, 33; after, 88% on forest. Waiting at the end: small 15, 8, 15, 16 to 9, 8, 6, 7; medium 18, 25 to 7, 17. Growth: small 0.76, 1.14, -0.44, 1.32 to 0.40, 1.20, -0.16, 2.04 %/y; medium 1.82, 2.18 to 1.74, 1.96. Settlers’ hungry days a household-year in their first two years, against the others’: after, at or below theirs on every map (0 to 0.26, but small 11: 1.45 against 1.78); before, above them at small 3 (1.86 against 1.45) and medium 42 (0.73 against 0.23).
The party still moves at once (VB-787), and with no trail blazed (VB-447) it walks over pathless ground: the sites lie a median 5.8 to 7.8 hours out by the villages’ table, 12.7 at the farthest.
Cost: settleReach 9,557 tiles over two rounds at medium 42 (reachSettled 679,981); tests/counters.js unchanged but the new line (0 on the tiny probe: nobody leads).
The founders’ test of the small village moved to probe seeds 32, 35, 49, 73: at seed 7 the lone farm lies 10.3 hours off by the table. design.md’s Reaches-of-daily-work row still lists “a new village 10 to 30”; the Where row already says 6 hours (left to a design pass).