tune(SNNBot): restore P3 + patience config with improved encoding

Set currentFirePower=3.0, bulletSpeed=P3_SPEED (11.0), PATIENCE_TICKS=15.
Fire gate: strict 3° post-warmup, loose 5° cold-start.
Thermometer speed encoding (bits 36-43) unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 23:12:49 +02:00
parent cc3c2649c2
commit 929fe5a696
+9 -8
View File
@@ -48,7 +48,7 @@ const
P1_SPEED = 17.0 # bullet speed for P1 (20 - 3*1)
P2_SPEED = 14.0 # bullet speed for P2 (20 - 3*2)
COLD_K = 3 # exemplars needed before leaving cold start
PATIENCE_TICKS = 5 # min ticks before firing
PATIENCE_TICKS = 15 # min ticks before firing
# ── SNN types ─────────────────────────────────────────────────────────────────
@@ -293,9 +293,9 @@ method onRoundStarted*(bot: SNNBot, e: RoundStartedEvent) =
bot.bulletsHit = 0
bot.hitRateEMA = 0.5 # optimistic start
bot.powerChangeCounter = 0
bot.currentFirePower = 2.0
bot.bulletSpeed = P2_SPEED
bot.lastBulletSpeed = P2_SPEED
bot.currentFirePower = 3.0
bot.bulletSpeed = P3_SPEED
bot.lastBulletSpeed = P3_SPEED
bot.lastEnemyX = 0.0
bot.lastEnemyY = 0.0
bot.lastAbsBearing = 0.0
@@ -427,13 +427,14 @@ method run*(bot: SNNBot) =
aimTo(bot.targetAngle, gunDir)
let err = abs(normalizeRelativeAngle(bot.targetAngle - gunDir))
# Fire gate: P1 volume strategy — 5° gate, fire after minimal patience
# Fire gate: strict 3° after warmup, loose 5° during cold start
let energy = getEnergy()
let warmedUp = bot.res.count >= COLD_K and bot.roundTick >= PATIENCE_TICKS
let readyToFire = err < 5.0 and energy >= ENERGY_GUARD and (bot.roundTick >= PATIENCE_TICKS or warmedUp)
let gateAngle = if warmedUp: 3.0 else: 5.0
let readyToFire = err < gateAngle and energy >= ENERGY_GUARD and bot.roundTick >= PATIENCE_TICKS
if readyToFire:
bot.lastBulletSpeed = P2_SPEED
discard setFire(2.0)
bot.lastBulletSpeed = P3_SPEED
discard setFire(3.0)
bot.phase = EVALUATE
else:
discard setFire(0.0)