ChimeraBot_garage: M5.5 — unified metrics, cross-round posterior carry, probe set v2, G5' v2

This commit is contained in:
2026-10-07 02:27:11 +02:00
parent f9f3cd7576
commit 6dd0b1c3cb
12 changed files with 815 additions and 452 deletions
+30
View File
@@ -130,6 +130,36 @@ block:
if abs(cam.targetSpeed) <= 8.0 and abs(cam.turnRate) <= 10.0: anySmall = true
check("probe magnitudes stay plausible", anySmall)
block:
echo "probes 6: probe set v2 (distance + gun, M5.5)"
var c = baseCtx()
check("gunProbeAllowed false when not aimed", not gunProbeAllowed(c))
var kinds: set[ProbeKind] = {}
var gunFire = 0.0
for cand in candidates(c):
kinds.incl cand.kind
if cand.kind == pkGunShot: gunFire = cand.fire
check("distance candidate present", pkDistance in kinds)
check("gun candidate absent when not aimed", pkGunShot notin kinds)
c.ourGunHeat = 0.0; c.ourGunAimed = true
check("gunProbeAllowed true when cool+aimed", gunProbeAllowed(c))
kinds = {}; gunFire = 0.0
for cand in candidates(c):
kinds.incl cand.kind
if cand.kind == pkGunShot: gunFire = cand.fire
check("gun candidate present when cool+aimed", pkGunShot in kinds)
check("gun probe IS a shot (low power)", gunFire > 0.0, $gunFire)
check("all six probe types selectable", kinds.len == 6, $kinds)
var d = baseCtx(); d.ourGunHeat = 0.0; d.ourGunAimed = true; d.enemyAimedAtUs = true
check("gunProbeAllowed false when enemy aimed at us", not gunProbeAllowed(d))
var e = baseCtx(); e.ourGunHeat = 1.0; e.ourGunAimed = true
check("gunProbeAllowed false when our gun hot", not gunProbeAllowed(e))
let dec = chooseProbe(kernels, origin(), c)
check("chooseProbe deterministic over v2 set",
dec.candidate.kind == chooseProbe(kernels, origin(), c).candidate.kind)
check("entropy selection covers v2 set (non-increasing entropy)",
dec.entropyAfter <= dec.entropyBefore + 1e-9)
block:
echo "probes 5: entropy closed form"
check("uniform n=4 entropy = ln4",