From 581bfb532cc86c420cc4302ac2e68d64ac4c7888 Mon Sep 17 00:00:00 2001 From: Davide Cappellini Date: Tue, 15 Sep 2026 08:46:06 +0200 Subject: [PATCH] =?UTF-8?q?tune(SNNBot):=20tighten=20stationary=20dead=20z?= =?UTF-8?q?one=20to=200.5=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 8d3ad4a..66db60e 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 → 1.5° (stable), full speed (8 units/tick) → 0.3° (fast tracking) + # Stationary → 0.5° (stable), full speed (8 units/tick) → 0.3° (fast tracking) let t = (bot.velSpeed / 8.0).clamp(0.0, 1.0) - let adaptiveDeadZone = 1.5 + (0.3 - 1.5) * t # lerp(1.5, 0.3, t) + let adaptiveDeadZone = 0.5 + (0.3 - 0.5) * t # lerp(0.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 = 1.5 + (0.3 - 1.5) * t # lerp(1.5, 0.3, t) + let adaptiveDeadZone = 0.5 + (0.3 - 0.5) * t # lerp(0.5, 0.3, t) when USE_RESERVOIR: let aimRaw = bot.res.forward(bot.lastBinInput)