What had to change.
Most game agents hide decision-making behind high-level ML libraries. This project asks what a controller looks like when the computation is built at the individual neuron and synapse level.
03 · SPIKING NEURAL NETWORKS · PYGAME
COMPLETE · REWARD-TRAINEDA reward-trained Snake controller built from leaky integrate-and-fire neurons, plastic synapses, and recurrent winner-take-all motor populations—without ML frameworks.
A visual explanation of the system's core behavior.

WHAT THE NETWORK IS DOINGFood is behind-left in absolute space. The east × south context activates most strongly, so the right motor spikes twice and wins the inhibitory competition.
Observable inputs, action values, and spikes—not a generated chain-of-thought.
Most game agents hide decision-making behind high-level ML libraries. This project asks what a controller looks like when the computation is built at the individual neuron and synapse level.
Eleven state features become sensory spikes. Sixteen heading × food populations feed left, straight, and right LIF motors through reward-modulated synapses; danger channels inhibit unsafe moves and recurrent competition selects one action.
Across 40 fixed unseen seeds, the trained controller averaged 19.52 ± 9.85 food against an untrained score of zero, reached 45 on its best run, and passed 28 neuron-to-game tests.
IMPLEMENTATION NOTES
Want the code and full documentation?
View source on GitHub ↗