research: Astra pass 3, compiled spatial passage evaluator design (read-only)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-28 04:46:50 +01:00
1 parent fa78192c86
commit 04cdd197fb
2 files changed
+235

No files matched your search

@@ -0,0 +1,74 @@
Thank you for both earlier passes. Your rec #1 (localize passages) turned out to be right, and here is what we've
learned since. This is a focused third pass: **passage evaluation design.** Read and reason only; no edits
anywhere, including temp files. Web allowed. Labels as before.
## What we know now (all measured, ablations verified to remove the work)
- **Owner four-strate world, cold LOD0–2-ready at W12:** FI 2.27 s, TN 2.25 s. Passages off: FI 0.81 s,
TN 0.85 s. Boundary bands cost only 0.1–0.2 s. Passage composition costs **~1.4–1.6 s** of near readiness, and
it alone separates FI/TN from the ~1 s goal. SW 1.02 s and VS 1.13 s are close already.
- **Inside the passage phase** (sampled, L83): carve distance ~40%, wall relief ~21–24% (3D value noise, 3 octaves
at 43/29/19 voxels), support restoration/columns ~14%, mouth shaping ~4%, other ~11%. Top symbols:
`ApplyResolvedStratePassageCarves`, `VF_FieldCachedValueNoise`, `VisitNearestPassageSpatialNode`,
`PassagePotentialWithinNode`, the carve lambda.
- **Exact trims done** (L81–L85):
- a density-aware outer reach bound (carve = `max(source, -roughSDF/Q)`, reach = `-d·Q + 0.24 m`);
- an exact relief skip when it can't change the max;
- per-tile BVH node masks and contiguous ranges;
- heavy-tile splitting;
- heavy-first order.
Each gave 5–12%. Readiness is throughput-bound (workers 81–85% busy).
- **Two representation shortcuts failed:**
- L86: a lazy exact per-sample result cache. 24% hit rate, ~700 MB, +47% slower.
- L88: a tile-local 4-voxel trilinear cache of passage deltas, exact near the surface. Coarse-node
evaluations still paid full route cost, and carve-segment visits rose from 34.5M to 56.2M (FI), making it
+46% slower.
**Lesson:** each route evaluation is expensive in itself, and reorganising *where* we evaluate doesn't help
unless the evaluation gets cheaper.
- **Composer semantics that must keep their meaning:**
- the carve is `max(source, -roughSDF/Q)`;
- support restoration, applied after later overlapping bores;
- segment-local capsule clearance;
- mouth shaping and fades;
- the walkable tread floor;
- Catmull–Rom joins on short segments;
- wall/floor relief of ±0.21/0.20 m.
Reports: `Standalone/Research/WorldAssemblerM3/Linux81`–`Linux88/REPORT.md`; code in `ShapeWorldInternal.h`
(`ApplyResolvedStratePassageCarves` and its helpers).
## The owner's rules (unchanged)
- One seed gives the same world on every machine. Byte equality with older versions isn't required; a perf pass
may change the world slightly.
- Passages stay walkable arrival → departure (support, capsule, grade, ripple audits), and look natural.
- No visible quality regression.
- Target: **LOD0–2 ready in ~1 s** after cold arrival. The whole view is a bonus; continuous low-priority far
generation afterwards.
## Questions
1. **What makes one route evaluation expensive** (read the code path end to end)? Per sample: how many segments are
visited, what does each visit compute (closest point on a Catmull–Rom or linear segment, frames, radius
interpolation, relief noise, support capsule tests, later-bore checks)? Which parts are redundant per sample, per
segment, or per tile?
2. **Design a passage representation where per-sample cost is near-constant and small,** and the work is not merely
moved around. Candidates to evaluate (don't limit yourself):
- analytic primitives: polyline/capsule chains with precomputed per-segment frames and an arc-length table;
- relief defined in 2D (arc length, angle) with a cheap periodic or table noise;
- a precomputed narrow-band distance grid per passage, built once per world at a fixed resolution with
deterministic integer construction, plus its build cost;
- separating "is this sample within reach" (cheap) from "exact carve value" (expensive);
- vectorising across a z-run of samples sharing the same segment candidates.
For each: expected per-sample cost, build cost, memory, how exact (displacement vs today), determinism risk, and
effort.
3. **Rank by expected gain toward ~1 s,** with arithmetic from the numbers above. For the top choice, describe the
smallest prototype and the cheapest falsifier, so the implementer can prove it before building it fully.
## Output
At most ~3,000 words, **ranked recommendation first**, file:line evidence, labels [CODE]/[MEASURED]/[PRIOR ART]/
[INFERENCE].