Decide input encoding for enemy velocity #162

Closed
opened 2026-09-13 20:27:58 +02:00 by SirStone · 2 comments
Owner

Question

How should enemy velocity be encoded and fed to the SNN alongside the current bearing input?

Current input: 36 population-coded neurons for relative bearing (-180°..+180°, 10° bands).

Options for velocity:

  1. Population-code velocity direction (another 36 neurons) + population-code speed (N neurons for speed bands)
  2. Population-code predicted-future-bearing directly (36 neurons, same encoding as current bearing but lead-adjusted)
  3. Cartesian velocity components (vx, vy) as population-coded channels

Design constraint: the input interface must be structured so recurrent features can augment or replace velocity features in step 3 without rewriting the SNN core.

## Question How should enemy velocity be encoded and fed to the SNN alongside the current bearing input? Current input: 36 population-coded neurons for relative bearing (-180°..+180°, 10° bands). Options for velocity: 1. Population-code velocity direction (another 36 neurons) + population-code speed (N neurons for speed bands) 2. Population-code predicted-future-bearing directly (36 neurons, same encoding as current bearing but lead-adjusted) 3. Cartesian velocity components (vx, vy) as population-coded channels Design constraint: the input interface must be structured so recurrent features can augment or replace velocity features in step 3 without rewriting the SNN core.
SirStone added the wayfinder:grilling label 2026-09-13 20:27:58 +02:00
Author
Owner

Blocked by: #160 (Research bullet mechanics — need to know what velocity info matters)

**Blocked by:** #160 (Research bullet mechanics — need to know what velocity info matters)
Author
Owner

Resolution

Polar encoding: velocity direction (36 neurons) + speed (8 neurons), 1-tick delta, SNN smooths internally.

Input vector layout (80 neurons total)

Range Channel Neurons Encoding
0–35 Relative bearing 36 10° population bands, triangular interpolation (existing)
36–71 Velocity direction 36 Same 10° population scheme as bearing
72–79 Speed 8 1 unit/tick bands (0–8 range), triangular interpolation

Key decisions

  • Raw velocity, not pre-computed lead bearing — SNN learns the velocity→aim relationship itself; keeps the door open for recurrence in step 3
  • Polar, not Cartesian — matches the SNN's existing angular representation; direction uses identical encoding scheme as bearing
  • 1-tick position delta for velocity — LIF membrane leak (τ=0.9) + 10-tick inference window handles smoothing; no preprocessing filter
  • Hidden layer stays at 12 — weight count goes from 432 to 960; revisit if convergence struggles
  • Architecture constraint met: velocity channels are additive inputs; recurrence can augment or replace them in step 3 without touching SNN core (hidden→output unchanged)
## Resolution **Polar encoding: velocity direction (36 neurons) + speed (8 neurons), 1-tick delta, SNN smooths internally.** ### Input vector layout (80 neurons total) | Range | Channel | Neurons | Encoding | |-------|---------|---------|----------| | 0–35 | Relative bearing | 36 | 10° population bands, triangular interpolation (existing) | | 36–71 | Velocity direction | 36 | Same 10° population scheme as bearing | | 72–79 | Speed | 8 | 1 unit/tick bands (0–8 range), triangular interpolation | ### Key decisions - **Raw velocity, not pre-computed lead bearing** — SNN learns the velocity→aim relationship itself; keeps the door open for recurrence in step 3 - **Polar, not Cartesian** — matches the SNN's existing angular representation; direction uses identical encoding scheme as bearing - **1-tick position delta for velocity** — LIF membrane leak (τ=0.9) + 10-tick inference window handles smoothing; no preprocessing filter - **Hidden layer stays at 12** — weight count goes from 432 to 960; revisit if convergence struggles - **Architecture constraint met**: velocity channels are additive inputs; recurrence can augment or replace them in step 3 without touching SNN core (hidden→output unchanged)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#162