From 1790dd0ca4d9c35cb674ea043523d5e14e1dc1ff Mon Sep 17 00:00:00 2001 From: Davide Cappellini Date: Tue, 15 Sep 2026 08:43:34 +0200 Subject: [PATCH] =?UTF-8?q?tune(SNNBot):=20tighten=20adaptive=20dead=20zon?= =?UTF-8?q?e=20to=201.5=C2=B0=E2=80=930.3=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- SNNBot_garage/src/SNNBot.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SNNBot_garage/src/SNNBot.nim b/SNNBot_garage/src/SNNBot.nim index 6ae37b0..8d3ad4a 100644 --- a/SNNBot_garage/src/SNNBot.nim +++ b/SNNBot_garage/src/SNNBot.nim @@ -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)