diff --git a/docs/chimera-spec.md b/docs/chimera-spec.md index 7fdff7a..b945bfb 100644 --- a/docs/chimera-spec.md +++ b/docs/chimera-spec.md @@ -725,6 +725,57 @@ benefit: the twin gun trades a small amount of score margin for the offline hit rate. The G8 offline bar is met on the stated protocol; the live benefit remains unmeasured because the suite does not discriminate. +### Final status — M7.5 additions (virtual-gun tournament + Dodger-v2, G8) + +**The saturation finding, answered.** M7 live showed all arms winning 100% of +rounds, so win rate could not discriminate; and the offline "Dodger" was not a +real dodger. M7.5 attacks both: + +1. **Virtual-gun tournament (`chimera/virtual_guns.nim`).** The standard + Robocode answer to *"which gun fires now?"* is not one more predictor but an + online **selection** among a small candidate set, each scored by the outcome + of a simulated ("virtual") bullet — the **classic Robocode Virtual Guns** + pattern (provenance: `https://robowiki.net/wiki/Virtual_Guns`; see also the + RoboWiki "Targeting/VirtualGuns" discussion). Candidates are `TWIN` + (`chimera/aimer.nim`), `ELM` (`modules/ELM` geometric-intercept base) and + `HEAD_ON` (aim at the current scanned position). Every tick with low gun heat + each candidate's virtual bullet is launched; when it resolves (target hit or + arena exit) its realized outcome updates a **damage-weighted** per-gun score + with **exponential forgetting** (`tau = 200` ticks) plus a per-gun **EMA**. + The bot fires the **argmax** gun under **hysteresis** (a rival must lead by + `0.1` EMA before the gun switches), so selection is deterministic and cannot + flap. The M7 influence gate still applies (the `TWIN` candidate is eligible + only above the same influence threshold); `-d:chimeraNoVguns` removes the + whole tournament and restores the exact M7 influence-gated twin/ELM path. + Telemetry records which gun fired. This is the direct answer to the M7 + live-saturation finding: instead of betting the whole game on one gun, the + bot picks the gun that is actually landing hits against *this* opponent. +2. **Dodger-v2 (`tests/archetypes/Dodger`).** The M7 archetype patrolled + straight (it charged its opponent) and had no gun. V2 keeps the wave-based + perpendicular strafe and corner-flip but adds a center-pull so it cannot + park in a corner, a documented **seeded** pseudo-random strafe reversal, and + a head-on **gun so it fires back**. `dodger_spec.nim` stays the single + verified spec function; its tests assert a **dodge rate >= 60%** of incoming + head-on-gun shots in an offline physics sim *and* that it still fires. + +*Bar.* Offline (replayed trajectories + the Dodger-v2 spec function): +**vgun >= max(TWIN, ELM-base, HEAD_ON) on >= 6/9 opponents AND vgun >= ELM-base on +all movers** (movers = Crazy, SpinBot, VelociBot, Walls, Dodger). Live: four arms +(inert / ELM / TWIN / vgun) x 9 opponents x 5 rounds, win rate + score margin; +the **discrimination test** is that against the upgraded Dodger the arms differ +materially in score margin (the M7 read was ~equal). Any failure is stated +plainly. + +| Goal | Verdict | Recorded numbers + caveat | +|---|---:|---| +| G8 virtual-gun offline | **see `benchmarks/m7_5_g8.md`** | four-column {vgun, twin, ELM-base, head-on} x 9 opponents hit-rate table; bar = vgun >= max(single guns) on >= 6/9 and vgun >= ELM-base on all movers. | +| G8 virtual-gun live | **see `benchmarks/m7_5_g8_live.md`** | four arms x 9 opponents x 5 rounds win% + margins; discrimination read against Dodger-v2. | +| G8 Dodger-v2 | **see `benchmarks/m7_5_g8.md`** | dodge rate vs head-on shots (bar >= 60%), and the archetype now fires back. | + +*Failure* => the tournament does not beat the best single gun where that gun +loses, i.e. online gun selection adds no reliability over committing to one gun +(idea-level failure of the M7.5 selection claim, not of the M7 aiming mechanism). + --- ## 13. Milestones @@ -751,6 +802,15 @@ unmeasured because the suite does not discriminate. 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`). +- **M7.5 — Virtual-gun tournament + Dodger-v2 (G8).** Implemented: + `chimera/virtual_guns.nim` (classic Robocode Virtual Guns pattern: per-tick + virtual bullets for TWIN/ELM/HEAD_ON, damage-weighted EMA + tau=200 + exponential forgetting, hysteresis=0.1 argmax selection), wired into + `computeGun` behind the same influence gate, removed by `-d:chimeraNoVguns`; + Dodger-v2 (center-pull + seeded strafe + head-on gun) with a dodge-rate matrix + test; four-column offline bench (`tests/bench_g8.nim`) and four-arm live bench + (`tests/bench_g8_live.nim`), artifacts `benchmarks/m7_5_g8.md` and + `benchmarks/m7_5_g8_live.md`. ### Resolved decisions