Prototype reward-modulated STDP learner #155

Closed
opened 2026-09-12 11:37:26 +02:00 by SirStone · 1 comment
Owner

Question

Add the learning algorithm: reward-modulated STDP. Using the continuous learning loop (no episodes, wait-then-evaluate, shaped inverse reward), implement spike-timing tracking, eligibility traces, and reward-modulated weight updates. The SNN outputs a target angle, waits for gun to arrive, measures error, computes reward = 1.0 / (1.0 + error), and updates weights via R-STDP. Debug overlay should show error dropping over time.

Blocked by: #152 (SNN prototype must exist first)

Parent map: #147

## Question Add the learning algorithm: reward-modulated STDP. Using the continuous learning loop (no episodes, wait-then-evaluate, shaped inverse reward), implement spike-timing tracking, eligibility traces, and reward-modulated weight updates. The SNN outputs a target angle, waits for gun to arrive, measures error, computes reward = 1.0 / (1.0 + error), and updates weights via R-STDP. Debug overlay should show error dropping over time. Blocked by: #152 (SNN prototype must exist first) Parent map: #147
SirStone added the wayfinder:prototype label 2026-09-12 12:22:06 +02:00
Author
Owner

Resolution

Reward-modulated STDP implemented:

  • Spike timing tracking (lastSpikeIn, lastSpikeHid arrays)
  • Eligibility traces with exponential decay
  • STDP rule: potentiation on pre→post correlation, depression on post→pre
  • Weight update in EVALUATE state: w += η × reward × trace, clamped to [-2, 2]
  • ponytail: global learning rate, no per-synapse adaptation

Compiles clean. Ready for training runs.

## Resolution Reward-modulated STDP implemented: - Spike timing tracking (lastSpikeIn, lastSpikeHid arrays) - Eligibility traces with exponential decay - STDP rule: potentiation on pre→post correlation, depression on post→pre - Weight update in EVALUATE state: w += η × reward × trace, clamped to [-2, 2] - ponytail: global learning rate, no per-synapse adaptation Compiles clean. Ready for training runs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SirStone/SirRoboGarage#155