Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to Econ-Engine are documented here. The changelog records what changed in each update. Design rationale, experiments, observations, and lessons are documented separately in [Lab Notes](LAB_NOTES.md).

## [LIFE15-Wayfinding-071] - (2026-10-28)

- A new route is planned as people find their way: the straight line when every triangle it crosses is known walkable ground, otherwise steered along the chain of pieces, heading in each piece for the crossing nearest the line on to the target, straight where it can and by a search confined to that piece where it cannot.
- The band of chunks, the search over all known ground and `full` walks are removed. Walk plans are now `way`, `joined`, `straight` and `steered`; the panel says "heading straight there" or "finding a way through".
- The checker requires a way remembered from a straight walk to be exactly the triangles its line crosses, and rejects a new way holding a triangle twice.
- The chain of pieces and the fine search reuse typed arrays and one heap instead of maps, sets and a heap per search.
- Trajectories change: new fingerprints are recorded for 21 of the 22 runs; one flat-land run is unchanged.
- New unit fixtures for straight and steered plans, a line through a vertex, the crossing nearest the line, an obstacle inside one piece, and the checker rejecting a straight way off its line.
- The Life 15 specification is revised for update 071.

## [LIFE15-Lighter-070] - (2026-10-28)

- An exchange no longer copies group members who are dead or out of talking distance, and copies back only the views that changed.
Expand Down
10 changes: 10 additions & 0 deletions LAB_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@

Every meaningful model, architecture, experimental, or design update should receive a newest-first entry. Use at most one base update number per Git commit. Refinements completed before that commit keep the same base number with a decimal suffix—for example, `003` and `003.1` belong to the same commit family. Allocate the next base number only for a later commit. Preserve the context, observed problem or research question, rationale, important implementation decisions, trade-offs, findings, and unresolved questions. Distinguish verified observations from hypotheses. If the original rationale is unknown, say so rather than inferring intent from the finished code.

## [LIFE15-Wayfinding-071] - (2026-10-28)

After update 070, route planning was about 30% of a day: about 80 new plans a day past day 50 at about 1 ms each, each expanding some 3,400 triangles. The owner pointed out that people do not compute so much to find their way and approved a specification that plans as people do: straight at the goal when the ground ahead is known, otherwise steering round what is in the way, piece by piece (Hochmair and Frank 2000; Bailenson et al. 2000).

**How lifelike the walks are, on the canonical forty, seed 20260813, against the shortest path over each walker's known ground.** Straight walks are within about 0% of it. Steered walks: day 5, 52 walks, median 0.0% longer, longest 101%; day 13, 562 walks, median 1.4%, longest 156%; day 30, 90 walks, median 2.1%, longest 289%; day 55, 84 walks, median 0.9%, longest 50%. The medians meet the specification's 15%; the long tails are walks whose chain of pieces turns away from the line, which people also do when they head the wrong way round an obstacle. Most new walks past day 20 are steered: about 78 a day against 23 straight.

**Speed, in Node, 12-hour steps, single runs, against update 070's 1,791 ms, 9,083 ms and 172 ms.** Days 1–10 1,878 ms; the hut week, days 11–19, 7,340 ms; days 20–60 about 185–205 ms a day. A straight plan costs about 4 µs and a steered one about 0.5 ms, with a corridor of some 340 triangles. The first steered version took about 206 ms a day at days 50–59: the chain of pieces built maps and sets, and every in-piece search a new heap. Reusing typed arrays and one heap, and reading each chunk's piece labels once instead of per triangle, brought it to 186 ms, the same cost per wake-up as update 070; this run has about 9% more wake-ups past day 50 (about 1,860 a day against 1,705).

**Findings.** The specification expected ordinary days at roughly 130–150 ms; they are not faster than before. Planning is cheaper per walk, but steered corridors are long, and cutting a route along them, and the garbage it leaves (about a fifth of the time), costs as much as before. The busy hut week is about 20% faster. Next: cheaper route cutting along long corridors, and the remaining speed-ups that change no result.

## [LIFE15-Lighter-070] - (2026-10-28)

The owner asked why 1 month/s (30 simulated days a second) is out of reach and approved any speed-up that leaves the simulation unchanged. The camp wake-up cascade was kept on purpose: who wakes whom will matter for relationships.
Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The 3D world draws each firm and Government across its plot: `buildingScale` str
- **Clock and queue.** `clock.ts` holds the wake-up queue, ordered by minute, then world before people, then person id. `calendar.ts` turns a minute into a day, a season and a year of `daysPerYear` days. `world.ts` owns hourly and midnight work: regrowth, fish growth, fires and daily summaries. `wake.ts` handles a person's wake-up: it settles the task that ended, perceives, chooses the next task by priority and queues the next wake-up.
- **Places.** `places.ts` and `layout.ts` place berry and hazel thickets, wood stands and stone outcrops as aggregate stocks, indexed by place id, with their own regrowth (`logRegrowth` keeps each felled tree's schedule). The terrain, water, shore geometry and fish of Life 11 (`terrain.ts`, `water.ts`, `banks.ts`, `fish.ts`) are kept unchanged.
- **Ground mesh.** `mesh.ts` builds, once per layout, a constrained Delaunay triangulation (Delaunator and Constrainautor, pinned) over the whole valley: the hydrology's shorelines simplified to within `shoreToleranceCm`, relief vertices from a quadtree of squares from `meshMaxEdgeCm` down to one terrain cell, and refinement until every dry 5 m point is within `meshHeightToleranceCm` of the terrain. Each triangle has an area type (ground, lake or river), neighbours, a chunk and a region; the largest walkable region is the main land, where founders start. The mesh is cached per terrain and checked once by `meshViolations`.
- **Knowledge and routes.** `perception.ts` records what a person sees at a wake-up: mesh triangles, places with their stock, bank points and other people. Triangle knowledge is a bitset shared between a state and its copy until its holder learns something. `routes.ts` runs A\* over known ground triangles, pulls the path straight through the corridor with the funnel algorithm, and cuts it at triangle edges into segments with their slope and walking time. Bank points sit on the ground side of each shore edge. A new route is planned coarse to fine: an A* over the person's pieces, the joined-up patches of known ground within each chunk, linked across chunk borders only where the person knows ground on both sides (`ChunkLinks`, precomputed per mesh), gives a band of chunks, and the triangle search stays inside it. A chain of pieces is joined-up known ground, so the band always holds a path; the search over the whole known ground remains only as a guard, recorded as a `full` walk, which the checker rejects. Pieces are derived from knowledge, cached per knowledge and carried forward at each survey by dropping only the chunks where triangles were learnt. The still landscape is surveyed again only after moving `resurveyCm` (100 m) from the last survey point; stock at the person's place, people and fires are seen at every wake-up.
- **Knowledge and routes.** `perception.ts` records what a person sees at a wake-up: mesh triangles, places with their stock, bank points and other people. Triangle knowledge is a bitset shared between a state and its copy until its holder learns something. `routes.ts` runs A\* over known ground triangles, pulls the path straight through the corridor with the funnel algorithm, and cuts it at triangle edges into segments with their slope and walking time. Bank points sit on the ground side of each shore edge. A new route is planned the way people find their way: first the straight line, kept when every triangle it crosses is known walkable ground (`lineCorridor`, exact side tests; a line through a vertex counts as blocked); otherwise it is steered. Steering takes an A* over the person's pieces, the joined-up patches of known ground within each chunk, linked across chunk borders only where the person knows ground on both sides (`ChunkLinks`, precomputed per mesh), and then crosses each piece toward the crossing into the next whose midpoint is nearest the line on to the target: straight where the line stays in the piece, otherwise by A* confined to that piece. A chain of pieces is joined-up known ground, so a steered plan always arrives; there is no search over the whole known ground. Pieces are derived from knowledge, cached per knowledge and carried forward at each survey by dropping only the chunks where triangles were learnt. The still landscape is surveyed again only after moving `resurveyCm` (100 m) from the last survey point; stock at the person's place, people and fires are seen at every wake-up.
- **Ways.** `ways.ts` keeps each person's remembered ways: immutable corridors of triangles between two ends (the hearth, a place, a known bank point), at most `waysRemembered` (64), the least recently used forgotten first. A walk to such an end takes a way that holds the walker's triangle, whole or joined part-way, in either direction; the route is pulled straight along the way's corridor at the walker's current load. A way is planned again once a day has passed and the person has seen new ground since, or at once if it crosses ground no longer known. Walk events record whether the walk used a way, joined one or planned a new one. An idle person with nothing to explore takes one leisure walk a day along the way from home used longest ago (`leisureMinute`), goes home when away, and otherwise rests.
- **Tasks and lazy bodies.** `tasks.ts` builds a `TaskRecord` (kind, start and end minute, place, route, reason, starting body and load). `body.ts` gives energy and water at any minute of a task in closed form (`energyAt`, `waterAt`), and `positionAt` gives the position along its route. Nobody is advanced minute by minute. Food, wood, fire, huts, axes, trade and practice (`food.ts`, `work.ts`, `fire.ts`, `huts.ts`, `axes.ts`, `trade.ts`, `practice.ts`, `social.ts`) apply their rules when a task settles or two people meet.
- **Checker.** `invariants.ts` checks each interval against the preceding immutable state. `replay.ts` keeps separate stock, fish, body, tool, hut and water ledgers, replays recorded transfers and regrowth, and compares them with the returned state. Geography is checked once.
Expand Down
Loading
Loading