SNNBot: lead-predicted aiming against moving targets #159

Open
opened 2026-09-13 20:27:49 +02:00 by SirStone · 1 comment
Owner

Destination

SNNBot aims at predictably-moving targets (wall bots, spinners) with lead prediction. Enemy velocity computed from position deltas and fed as additional population-coded input to the SNN. Learning signal: geometric "would-have-hit" error (no bullet-hit reward). Gun fires to verify aim quality. Done when hit rate exceeds 50% against a wall bot over a full game.

Notes

  • Language: Nim. Same garage convention as map #147.
  • Skills: nim, tdd, ponytail, research.
  • Builds on map SNNBot: SNN-aimed gun against stationary target — SuperSpike learner, 36→12→2 topology, sin/cos decode, population coding.
  • Architecture principle: structure the input layer so temporal features (recurrence, sliding window) can replace or augment velocity features later without rewriting the SNN core. Step 2 of 4 toward a competitive anti-wavesurfer gun.
  • Road map: (1) stationary target → (2) predictable movers → (3) reactive movers → (4) full competitive gun.

Decisions so far

Not yet specified

  • Whether to fire every tick or learn fire timing (likely always-fire for this map, fire timing is step 3+)
  • Whether to increase hidden layer size (12→24+) for the richer input space
  • How to handle enemy respawn / position reset between rounds
  • Whether the fast training runner (deferred from map #147) is needed for convergence at this complexity level

Out of scope

  • Reactive/dodging targets (wavesurfers) — step 3
  • SNNBot body movement — step 3+
  • Multiple enemies
  • Recurrent SNN (LSNN) — step 3, but input interface designed to accept it
  • Sliding window input — step 3 alternative to recurrence
## Destination SNNBot aims at predictably-moving targets (wall bots, spinners) with lead prediction. Enemy velocity computed from position deltas and fed as additional population-coded input to the SNN. Learning signal: geometric "would-have-hit" error (no bullet-hit reward). Gun fires to verify aim quality. Done when hit rate exceeds 50% against a wall bot over a full game. ## Notes - Language: Nim. Same garage convention as map #147. - Skills: `nim`, `tdd`, `ponytail`, `research`. - Builds on map [SNNBot: SNN-aimed gun against stationary target](https://git.fossellini.top/SirStone/SirRoboGarage/issues/147) — SuperSpike learner, 36→12→2 topology, sin/cos decode, population coding. - **Architecture principle:** structure the input layer so temporal features (recurrence, sliding window) can replace or augment velocity features later without rewriting the SNN core. Step 2 of 4 toward a competitive anti-wavesurfer gun. - Road map: (1) ~~stationary target~~ → **(2) predictable movers** → (3) reactive movers → (4) full competitive gun. ## Decisions so far - [Research bullet mechanics — speed, travel time, lead angle formula](https://git.fossellini.top/SirStone/SirRoboGarage/issues/160) — speed=20-3*fp, quadratic intercept for lead angle, bullet events available in API - [Research existing lead-targeting code in repo](https://git.fossellini.top/SirStone/SirRoboGarage/issues/164) — no lead code exists; PPO_Bot enemy_tracker reusable for position history; no wall bot adversary exists - [Decide test adversary — wall bot or spinner for training](#161) — adversary picked at runtime by operator; no new bot built; existing roster used as-is; adversary fires back - [Decide input encoding for enemy velocity](https://git.fossellini.top/SirStone/SirRoboGarage/issues/162) — polar: 36-neuron direction (same band scheme as bearing) + 8-neuron speed; 1-tick delta, SNN smooths internally; 80 total input neurons - [Decide geometric would-have-hit error signal](https://git.fossellini.top/SirStone/SirRoboGarage/issues/163) — retroactive: 100-tick ring buffer of actual positions; error = bearing diff between aim and actual enemy pos at bullet impact time; delayed-target SuperSpike update; skip learning until buffer matures ## Not yet specified - Whether to fire every tick or learn fire timing (likely always-fire for this map, fire timing is step 3+) - Whether to increase hidden layer size (12→24+) for the richer input space - How to handle enemy respawn / position reset between rounds - Whether the fast training runner (deferred from map #147) is needed for convergence at this complexity level ## Out of scope - Reactive/dodging targets (wavesurfers) — step 3 - SNNBot body movement — step 3+ - Multiple enemies - Recurrent SNN (LSNN) — step 3, but input interface designed to accept it - Sliding window input — step 3 alternative to recurrence
SirStone added the wayfinder:map label 2026-09-13 20:27:49 +02:00
Author
Owner

Child tickets

  • #160 - Research bullet mechanics (research)
  • #161 - Decide test adversary (grilling)
  • #162 - Decide velocity encoding (grilling, blocked by #160)
  • #163 - Decide error signal (grilling, blocked by #160)
  • #164 - Research existing lead-targeting code (research)
## Child tickets - #160 - Research bullet mechanics (research) - #161 - Decide test adversary (grilling) - #162 - Decide velocity encoding (grilling, blocked by #160) - #163 - Decide error signal (grilling, blocked by #160) - #164 - Research existing lead-targeting code (research)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#159