tune(SNNBot): tighten adaptive dead zone to 1.5°–0.3°

Settled gun error at ~2.6° was within the 3.0° stationary dead zone,
too generous for reliable hits. Tightened bounds from [3.0°, 0.5°] to
[1.5°, 0.3°] across the lerp—revert to proven AIM_TOL=1.5° baseline
for stationary targets, 0.3° for full-speed movers (8 units/tick).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 08:43:34 +02:00
parent 3066a0c72b
commit 1790dd0ca4
+3 -3
View File
@@ -383,9 +383,9 @@ method run*(bot: SNNBot) =
let err = abs(normalizeRelativeAngle(bot.targetAngle - gunDir))
# Adaptive dead zone: scale learning threshold by enemy velocity
# Stationary → 3° (stable), full speed (8 units/tick) → 0.5° (fast tracking)
# Stationary → 1.5° (stable), full speed (8 units/tick) → 0.3° (fast tracking)
let t = (bot.velSpeed / 8.0).clamp(0.0, 1.0)
let adaptiveDeadZone = 3.0 + (0.5 - 3.0) * t # lerp(3.0, 0.5, t)
let adaptiveDeadZone = 1.5 + (0.3 - 1.5) * t # lerp(1.5, 0.3, t)
# Fire gate: only fire when error within adaptive dead zone
if err < adaptiveDeadZone:
@@ -406,7 +406,7 @@ method run*(bot: SNNBot) =
# Adaptive learning dead zone: scale by enemy velocity (same as fire gate)
let t = (bot.velSpeed / 8.0).clamp(0.0, 1.0)
let adaptiveDeadZone = 3.0 + (0.5 - 3.0) * t # lerp(3.0, 0.5, t)
let adaptiveDeadZone = 1.5 + (0.3 - 1.5) * t # lerp(1.5, 0.3, t)
when USE_RESERVOIR:
let aimRaw = bot.res.forward(bot.lastBinInput)