ChimeraBot_garage: M7 twin gun — flight-horizon aiming, spread-based power, aim-bias corrector, Dodger archetype

This commit is contained in:
2026-10-07 08:44:37 +02:00
parent 53effb408c
commit 8bf7152512
16 changed files with 1274 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
# G8 offline hit-rate bench (M7, twin gun)
Replayed archived trajectories (`/tmp/chimera_g4_run`) + a synthesized Dodger; hit = bullet passes within 20. units of the realized enemy position. Aim slew/cadence abstracted. Generated by `tests/bench_g8.nim`.
| opponent | twin % | ELM % | head-on % | shots |
|---|---:|---:|---:|---:|
| Corners | 49.3 | 59.6 | 52.2 | 339 |
| Crazy | 50.3 | 31.5 | 15.0 | 1042 |
| Fire | 50.7 | 41.4 | 45.9 | 440 |
| RamFire | 90.5 | 92.7 | 89.9 | 328 |
| SpinBot | 88.3 | 20.1 | 20.1 | 715 |
| TrackFire | 84.2 | 87.3 | 87.3 | 221 |
| VelociBot | 38.7 | 23.3 | 28.4 | 786 |
| Walls | 43.8 | 22.1 | 1.8 | 825 |
| Dodger | 85.5 | 11.4 | 72.7 | 220 |
**G8 offline bar: twin >= ELM on >= 6/9 opponents AND twin >= head-on on the movers.** Result: twin >= ELM on 6/9; twin >= head-on on 5/5 movers. **Verdict: PASS.**
## Method / caveats
* `TWIN` = `chimera/aimer.nim`: iterated flight time
`h = dist/(20-3*power)`, horizon-bucketed predictor Hedge (mixture/residual/persistence), trained ONLINE per record (one aimer, score-then-aim each sampled tick), spread-selected power.
* `ELM` = the ELM gun's **base** geometric intercept from the observed velocity (the learned correction is gated and small, and the online ELM state cannot be replayed offline). This is a proxy for the full ELM gun — a documented deviation.
* Power monotonicity: `selectPowerFromSpreads` returns the largest power whose required spread fits the enemy-silhouette tolerance `2*atan2(18, dist)`; the choice is non-increasing in spread (`test_aimer.nim`, aimer 4).
* The synthesized Dodger fires a wave every 12 ticks; a real battle would add shooter motion. Live results (`m7_g8_live.md`) are the reality check.
@@ -0,0 +1,19 @@
# G8 live bench (M7 twin gun)
Three arms from the SAME tree: inert (`-d:chimeraInert`), elm (`-d:chimeraNoTwinGun`), twin (default). 5 rounds per arm per opponent. Generated by `tests/bench_g8_live.nim`.
| opponent | elm W% | elm margin | twin W% | twin margin | inert W% | inert margin |
|---|---:|---:|---:|---:|---:|---:|
| Corners | 100.0 | 2538.0 | 100.0 | 2354.0 | 100.0 | 2477.0 |
| Crazy | 100.0 | 1779.0 | 100.0 | 2240.0 | 100.0 | 1746.0 |
| Fire | 100.0 | 2571.0 | 100.0 | 2494.0 | 100.0 | 2588.0 |
| RamFire | 100.0 | 2549.0 | 100.0 | 2545.0 | 100.0 | 2665.0 |
| SpinBot | 100.0 | 2085.0 | 100.0 | 1635.0 | 100.0 | 1086.0 |
| TrackFire | 100.0 | 2334.0 | 100.0 | 2337.0 | 100.0 | 2371.0 |
| VelociBot | 100.0 | 2100.0 | 100.0 | 1842.0 | 100.0 | 2141.0 |
| Walls | 100.0 | 1895.0 | 100.0 | 1788.0 | 100.0 | 1697.0 |
| Dodger | 100.0 | 2665.0 | 100.0 | 2662.0 | 100.0 | 2653.0 |
**Totals:** elm 100.0% (margin 20516.0), twin 100.0% (margin 19897.0), inert 100.0% (margin 19424.0).
**G7 no-regression (twin >= inert win-rate on every opponent): PASS.**