docs: G8 twin-gun goal (flight-horizon aiming) + matrix

This commit is contained in:
2026-10-07 08:35:40 +02:00
parent 051c4e733b
commit 43b9ae912f
+42
View File
@@ -588,6 +588,41 @@ head-to-head and against the primary benchmark suite (official sample bots) as
well as the optional repo adversaries as extra diversity (win rate / score
bounds), i.e. learning never makes it worse when the twin is uncertain.
**G8 — FLIGHT-HORIZON AIMING (twin gun).** The ELM gun leads the enemy by a
single geometric dead-reckon and its learned correction is trained on a 5-tick
lookahead; a bullet fired at power `p` flies `d / (20 − 3p)` ticks (≈15–45 ticks
across the legal power range), so on a dodging opponent the aim must target the
**bullet-arrival position**, not a 5-tick extrapolation.
*Mechanism (spec §10 extension):* `chimera/aimer.nim` maintains a
**horizon-bucketed Hedge** over three predictors — the posterior-mixture twinsim
rollout, the linear-residual trajectory and constant-velocity persistence — with
buckets `1–7 / 8–17 / 18–35 / 36–70` ticks. Each bucket's weights are updated
online from the realized enemy position at the horizon that was actually used
(neutral/uniform start). `fusedPositionAt(h)` blends the predictors at horizon
`h`; `flightTime(dist, power) = dist / (20 − 3·power)` is iterated at most 3×
until the aim point converges, and the result is clipped to the arena. Fire power
is chosen from the posterior **spread**: the top-`k` (`k ≤ 4`) kernels' predicted
positions at the flight horizon give a max pairwise angular spread as seen from
our position, and the largest power whose enemy-silhouette angular tolerance
`2·atan2(botRadius, dist)` (botRadius = 18) covers that spread is selected. Fire
only at zero gun heat, inside that tolerance and energy-sane, with a conservative
cooldown (`≥ 8` ticks unless the spread is tiny) so the gun cannot spray. A
segmented online histogram (distance band × enemy-speed band) of post-shot
angular misses is applied as an aim-bias correction, deterministic and persisted
per match. The whole path is gated by the fusion influence scalar and removed
entirely by `-d:chimeraNoTwinGun`, which restores the exact current ELM gun.
*Bar.* Offline (replayed trajectories + a scripted reactive Dodger archetype),
**twin-gun hit-rate ≥ ELM-gun hit-rate on ≥ 6 of 9 opponents AND ≥ head-on aim
(aim at the enemy's current position) on the movers**. Live head-to-head and
suite no-regression are reported alongside (win rate / margin), with any twin-gun
loss stated plainly.
*Failure* ⇒ the flight-horizon aiming upgrade does not beat the ELM baseline —
a component/idea-level failure of the M7 aiming claim, not an inference-layer bug
(G1/G3/G4 stay green independently).
### Falsification Matrix
| Goal | Boundary | Failure proves |
@@ -602,6 +637,7 @@ bounds), i.e. learning never makes it worse when the twin is uncertain.
| Fusion mixer (M6.5) | oracle-data predictor race | **fusion correctness bug** (command vs realized space; power-as-probability) when the residual wins on clean oracle data |
| G6 | components | **component value claims wrong** |
| G7 | safety floor | **fallback/fusion correctness bug** |
| G8 | live/offline aiming | **flight-horizon aiming does not beat the ELM/head-on baselines** (idea-level) |
The matrix is the answer to *"if the bot is not learning, can we prove whether the
idea was wrong or the implementation?"*: G1/G3/G7 failures indict the build;
@@ -692,6 +728,12 @@ prediction, probing) remain unproven or falsified at their stated bars.
bullet dodge). Ablations `-d:chimeraNoFusion` / `-d:chimeraInert`. Tier A
tests (`test_residual/fusion/influence`) green; G7 head-to-head + suite PASS
on the stated bar (margins caveat above).
- **M7 — Twin gun / flight-horizon aiming (G8).** Implemented: `chimera/aimer.nim`
(horizon-bucketed Hedge, iterated flight-time aim, spread-based power
selection, aim-bias corrector), wired into `ChimeraBot.computeGun` behind the
influence gate, removed by `-d:chimeraNoTwinGun`; a garage-local reactive
`Dodger` archetype and an offline TWIN/ELM/HEAD-ON hit-rate bench
(`tests/bench_g8.nim`, artifact `benchmarks/m7_g8.md`).
### Resolved decisions