From dbc73f15ef25d3a542f2a78f9451e81b28d83d55 Mon Sep 17 00:00:00 2001 From: Davide Cappellini Date: Wed, 16 Sep 2026 08:25:52 +0200 Subject: [PATCH] feat(SNNBot): reset per-round stats and stale state, keep learning Reset bulletsFired, bulletsHit, lastEnemyX/Y, lastAbsBearing, lastDecideGunDir, targetAngle, and lastInput at round start. BinaryAimer exemplar buffer persists across rounds to maintain learning continuity. Co-Authored-By: Claude Opus 4.6 --- SNNBot_garage/src/SNNBot.nim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SNNBot_garage/src/SNNBot.nim b/SNNBot_garage/src/SNNBot.nim index 8842a58..9b48b4c 100644 --- a/SNNBot_garage/src/SNNBot.nim +++ b/SNNBot_garage/src/SNNBot.nim @@ -276,6 +276,15 @@ method onRoundStarted*(bot: SNNBot, e: RoundStartedEvent) = bot.velSpeed = 0.0 bot.phase = DECIDE bot.tick = 0 + # Reset per-round stats (learning persists across rounds) + bot.bulletsFired = 0 + bot.bulletsHit = 0 + bot.lastEnemyX = 0.0 + bot.lastEnemyY = 0.0 + bot.lastAbsBearing = 0.0 + bot.lastDecideGunDir = 0.0 + bot.targetAngle = 0.0 + bot.lastInput = [0'u64, 0'u64] setTargetSpeed(0.0) setTurnRate(0.0)