Skip to content

Iteration 3 setup: second zig across the line of sight (spec 007, generator 0.3.0) - #52

Merged
IanMayo merged 21 commits into
mainfrom
iter3/setup
Oct 21, 2026
Merged

IanMayo merged 21 commits into
mainfrom
iter3/setup

Conversation

@IanMayo

@IanMayo IanMayo commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Iteration 3 setup (spec 007). The owner's realism check and lever choice are recorded as decision 22.

The change is to the problem: ownship gets a second zig, and both turns cross the line of sight. The first zig keeps its timing. The models keep the 2c configuration and train from scratch on a fresh dataset, seed 204.

Evidence behind the choice (research R1, R2)

  • R1 (seed-203 gate predictions, observational slices):
    • Shorter first legs are worse for every estimator, so an earlier zig was not chosen.
    • Turning towards the contact helps only when the turn crosses the line of sight.
    • Larger turns help every estimator.
    • No slice brings the models within 2× of classical.
  • R2 (classical forecast on the new ranges): speed at zig + 600 s halves, 0.67 → 0.36 kt, and at zig + 300 s 1.13 → 0.56 kt.
    • The cost is large turns: median 143° against 61°.
    • Windows run longer, because second turns that do not fit are redrawn.
  • Forecast for the models, recorded before training: 1.1–1.3 kt, probably still above 1 kt.

What this PR contains

  • Generator 0.3.0 (packages/sim):
    • zig_rule: across_los puts the target on the other bow at a drawn offset, by the shorter turn.
    • zig2_delay_s adds a second zig, giving three legs.
    • The new draws come after every 0.2.0 draw, so earlier ranges are byte-identical.
    • Tested by hand-worked known answers, a 200-scenario rule check, a new golden file, and the unchanged 0.2.0 goldens.
  • Schema 0.9.1 adds ranges, parameters and metadata for the second zig, and ChangeDecision.plan / test_seed.
    • 0.1.0 and 0.2.0 data stay readable.
    • Data and features goldens change only in their version strings.
  • G0:
    • The independent-geometry check gains a hand-computed leg-3 case.
    • With across-LOS data, it recomputes every turn of every scenario with literal atan2.
    • Every turn is also checked kinematically (arc chord, heading bracket, turn rate, summed angle).
    • G0 passed on 0.3.0 (panel round 3, no rejections: experiments/20261017-g0-i3-r3/); the G0 guard accepts only it.
  • Slices: zig bands extend to 180°.
  • tma-g2:
    • From seed 204, --split test needs a decision bound to the plan and test seed (FR-009).
    • paired.json: paired bootstrap speed ratios against the other phase and classical (FR-006 validation rule).
    • The other phase is scored with its own normalisation when trained on other data.
  • Plan configs/iter3/a:
    • Seed 204 digests are pinned.
    • The model configs are identical to 2c's.
    • Seed 204 is reserved for iteration 3.
  • Viewer:
    • It draws the second turn and leg 3 and shows the second zig.
    • The seed-204 validation split is in the catalogue before any training, with a featured bookmark.
  • Docs:
    • Spec 007: spec, research R1–R4, tasks.
    • Annex A §A.7 record and D4.
    • SRD §3 row and decision 22.
    • AGENTS.md, glossary ("across the line of sight"), generator note.

Status

  • Decision record committed before training: experiments/20261017-i3-decision/.
  • Training is running on train/i3a (run 39024150564). The validation rule, any test scoring and the G2 panel follow in a later PR.

Constitution check

  • Data types defined only in schema/tma.yaml; pnpm schema:gen run (I): schema 0.9.1 regenerated, and schema:check passes.
  • Deterministic: seeded PRNG only; golden files updated deliberately, with the reason stated (II):
    • The new draws come after the existing ones.
    • The 0.2.0 sim goldens are unchanged.
    • The data and features goldens change only in generator_version and schema_version.
    • There is a new three-leg golden.
  • sim/features stay pure functions; one CLI per stage; Keras-equivalent layers only (III): simulateTruth(parameters) reproduces the tracks, because the realised turns are stored.
  • Any reported result sits beside naive and classical numbers on the same test set (IV): no model result yet, and the R2 forecast is classical only.
  • Respects the current gate: no training before G0, no scope beyond SRD §1 (V): the 0.3.0 G0 passed its panel before the decision record and training.

Site pages

  • Glossary entry (site/docs/glossary.md) for any new term: across the line of sight, leg, zig.
  • Data dictionary: regenerated automatically from the schema (nothing to edit).
  • Algorithm note (site/docs/algorithms/) for any new or changed algorithm: the generator's across-LOS rule and second zig.
  • Blog post (site/blog/) for any new result or gate decision: comes with the iteration-3 result.
  • Not applicable: this PR adds none of the above.

Checks

  • pnpm lint && pnpm typecheck && pnpm test && pnpm schema:check && pnpm site:build

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG

claude added 10 commits October 17, 2026 06:56
- docs/SRD.md: §7 stop clause lifted (Annex A Part B), hyperparameter cap
  replaced by pre-registration; §4 wall-clock cap replaced by chained CI jobs;
  §6 packages/demos holds the viewer; §8 decision 21 and D1-D3.
- AGENTS.md: gate status (what comes next) and the demos package.
- specs/006-engagement-viewer: spec (V-001..V-018 minus V-014), plan
  (browser-safe subpaths, @tma/demos core + React viewer, site page, tests),
  tasks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…ost, smoke script

- /viewer page (BrowserOnly, lazy) with navbar link; prebuild writes the
  catalogue from the gate experiments' dataset headers and manifests and
  copies the carried models (4.5 MB) into site/static/viewer (ignored)
- Featured bookmarks from the 2c predictions on seeds 203 and 201 held-out
- Algorithm note and blog post with linked views (SC-003)
- scripts/viewer-smoke.mjs: Playwright smoke of the served page
- PNG export: Array.from, not a NodeList spread (Babel loose mode)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
….9.0, spec 007

- Generator 0.3.0: zig_rule across_los (target ends on the other bow at a
  drawn offset, shorter turn) and an optional second zig (zig2_delay_s);
  new draws after every 0.2.0 draw, so earlier ranges are byte-identical
- Schema 0.9.0: ZigRule, los_offset_rad, zig2_delay_s, zig2_angle_rad,
  zig2_index, turn2_start_index; 0.1.0 and 0.2.0 data stay readable
- Goldens: data and features headers carry the new version strings only;
  new three-leg sim golden; known-answer and generated-scenario tests
- G0 guard test: generator 0.3.0 refuses the 0.2.0 G0 until G0 is re-run
- Viewer: second turn, leg 3, zig 2 marker and readout
- configs/iter3-ranges.json, iter3-heldout-ranges.json
- Spec 007 (spec, research R1-R4, tasks); Annex A A.7 record and D4;
  SRD section 3 row and decision 22; glossary and generator note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…e seed 204

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…04 validation

- independent-geometry: hand-computed leg-3 case; with across_los ranges,
  every turn of every scenario recomputed with literal atan2 (target on
  the other bow, offset inside the drawn range)
- Viewer catalogue: validation splits of unscored plans (seed 204, before
  training) and a featured three-leg bookmark

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…ine pass, pending panel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
@github-actions

Copy link
Copy Markdown
Contributor

Site preview: https://debrief.github.io/Gitma/pr/52/ (updates on every push; removed when the PR closes).

claude added 11 commits October 17, 2026 09:06
…ter its panel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…ding, validation rule

- G0 independent-geometry: hand-computed second turn in both directions
  (mid-arc and leg 3); ownship kinematics on every scenario (step <= v dt,
  chord heading between the stored courses, turn <= omega dt per step,
  |turn| <= 180 deg); unchecked turns counted; catches the red team's
  wrong-way second arc and leg-3-on-leg-2 mutations (tests added)
- ChangeDecision gains plan and test_seed (schema 0.9.0); from iteration 3
  tma-g2 scores a test split only with the decision that names its plan
- Spec 007 FR-006 rewritten: paired comparison with 2c on the same seed-204
  validation rows, plus a possible-pass condition; FR-009; how the gate
  reads under three legs; realised window distribution
- Research R4 and the generator note: turn direction and the at-turn-start
  caveat corrected; across-LOS unit test runs on noisy data

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…red.json

- experiments/20261017-g0-i3-r2: machine pass, kinematic and second-turn
  checks included, zig bands to 180 deg
- tma-g2 --compare-models writes paired.json: per model, carried / other
  phase median-error ratio with its paired bootstrap interval on the same
  sigma = 1 deg rows (range and course at zig + 300 s, speed at zig + 600 s),
  the input to spec 007 FR-006's validation rule
- G0 guard test follows the round-2 G0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
… by content

- kinematicFailure: each step at least the full-step arc chord (a track
  slower than the stored speed fails); each turn's summed course change
  equals its stored angle (a turn the other way round fails); tests
- tma-g2: a decision binds to a plan by its path or its content (test seed
  204 or later), compared by resolved real path; a bound decision must name
  its test seed; tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…6 relabelled, schema 0.9.1

- paired.json adds each model / classical on the same rows (the reported
  measure of what the models gained)
- Spec 007 FR-006: a change to the problem has no like-for-like
  counterfactual; the operative condition is a possible G2 speed pass;
  beating 2c on the new problem is a sanity check (2c degrades there:
  1.93 kt against 1.49 kt on scratch seed 9001), never lever evidence
- Schema 0.9.1 (ChangeDecision plan and test_seed); goldens change only in
  schema_version
- Round-1 G0 folder marked superseded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…o the folder of record

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
… round 3)

A forged plan copy with another seed can no longer unbind the seed-204
test split; a bound decision's test_seed must match the data's header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…ns, no open blocker or major)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…nfigs/iter3/a, test seed 204

Change, forecast (1.1-1.3 kt), validation rule (FR-006: operative possible
G2 speed pass; sanity paired ratio to 2c), carried set, stalled true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
…ation; other phase on its own normalisation

- train-plan: a validation evaluation may name compare_models (must exist);
  a decision stays test-only
- configs/iter3/a: evaluate scores the 2c models beside (spec 007 FR-006)
- tma-g2: an other phase trained on other data is scored on inputs built
  with its own (inputs-only) normalisation, with a note in the manifest;
  the carried set still refuses a mismatch; test added

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv4979qzsScV5ohT5RNUoG
@IanMayo
IanMayo merged commit d5511c0 into main Oct 21, 2026
43 of 53 checks passed
@IanMayo
IanMayo deleted the iter3/setup branch October 21, 2026 16:41
github-actions Bot added a commit that referenced this pull request Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants