Skip to content

Commit 23cbb70

Browse files
authored
Merge pull request #45 from AdaWorldAPI/claude/fix-adr025-lod-formula
fix(adr-025): correct the LOD depth formula — n = 16^r (4×4), not 4-ary
2 parents a806b87 + 110dd3b commit 23cbb70

1 file changed

Lines changed: 26 additions & 9 deletions

File tree

docs/ARCHITECTURAL-DECISIONS-2026-06-04.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,13 +1427,29 @@ to pick its work, with zero data-dependent branches:
14271427
NiblePath arithmetic; no float-rounding daylight between them.
14281428

14291429
2. **Jirak says which level L the cheap path will succeed at.**
1430-
For the LOD pyramid:
1431-
`n` = current sample size at level L (e.g. n ≈ 16^r for a
1432-
4-ary radix pyramid)
1433-
`predicted_error_L = C · n^{-1/2}` (L^q regime, which the
1434-
Σ-sandwich Mahalanobis distance lives in)
1435-
`r* = ⌈log₄(C/τ)⌉` for clinical tolerance τ — closed-form,
1430+
For the LOD pyramid, sample size grows by a fixed branching factor
1431+
`b` per hop-radius increment: `n = b^r`. Then:
1432+
`predicted_error_L = C · n^{-1/2} = C · b^{-r/2}`
1433+
(L^q regime, which the Σ-sandwich Mahalanobis distance lives in).
1434+
Solving `predicted_error_L < τ` for the smallest accepting level:
1435+
`C · b^{-r/2} < τ ⟹ b^{r/2} > C/τ ⟹ r > 2·log_b(C/τ)`
1436+
**`r* = ⌈2·log_b(C/τ)⌉`** for clinical tolerance τ — closed-form,
14361437
evaluated once per task class.
1438+
The helix pyramid ships **`b = 16`** (16-way per-hop sample growth
1439+
— the pyramid increases resolution ×4 in **both** x and y per hop,
1440+
so `4 × 4 = 16` samples per level; per the runtime session's
1441+
helix-pyramid spec), so `n = 16^r`, `n^{-1/2} = 4^{-r}`, and the
1442+
general formula reduces to the canonical anchor:
1443+
`r* = ⌈2·log_16(C/τ)⌉ = ⌈log₄(C/τ)⌉`.
1444+
**Implementer note for `D-JC-PREDICT-LOD`:** build the level
1445+
formula on the pyramid's true per-level *sample* growth, not its
1446+
per-axis fan-out. Here the ×4 per-axis fan-out gives `n = 16^r`
1447+
(`= 4 × 4` per level) → `r* = ⌈log₄(C/τ)⌉`. The trap Codex flagged:
1448+
pairing that `⌈log₄⌉` pick with a pyramid that actually grows only
1449+
`n = 4^r` selects a level **half as deep as that pyramid needs**
1450+
a 4-ary pyramid needs `r* = ⌈log₂(C/τ)⌉` (since `log₂ = 2·log₄`) —
1451+
and so leaves the predicted error above tolerance. Verify the real
1452+
`b` before wiring the formula.
14371453
No per-frame probing; the LOD pick is `r*` directly.
14381454

14391455
3. **HHTL routes the prefix at the picked level.**
@@ -1520,9 +1536,10 @@ ADR-024 → §11 callouts in PR #475 + PR #476).
15201536
- **Cesium tileset `bounding_volume` becomes a derived field** for
15211537
helix+HHTL-shaped tilesets. Producer/renderer round-trip lossless
15221538
by construction.
1523-
- **5-12 hop range = `r* = ⌈log₄(C/τ)⌉`** evaluated against
1524-
clinical (FMA registration), pixel (Cesium SSE), and tile (OSM
1525-
pyramid) tolerances. Same formula across the three domains; the
1539+
- **5-12 hop range = `r* = ⌈log₄(C/τ)⌉`** (the `b = 16` reduction of
1540+
`r* = ⌈2·log_b(C/τ)⌉`) evaluated against clinical (FMA
1541+
registration), pixel (Cesium SSE), and tile (OSM pyramid)
1542+
tolerances. Same formula across the three domains; the
15261543
per-domain Jirak certificate supplies `C`.
15271544
- **theta ∈ [1.45, 1.6] window** is the regime where the Jirak
15281545
bound applies cleanly to palette256 distances (ADR-024 codec).

0 commit comments

Comments
 (0)