The problem
I wanted to see if I could get a working game agent out of individual simulated neurons instead of a neural-net library, and be able to watch why it picks each move.
Spiking neurons
Finished September 2026A Snake controller built from leaky integrate-and-fire neurons and synapses that learn from reward. No ML libraries. Every spike and weight update is my own code.
I wanted to see if I could get a working game agent out of individual simulated neurons instead of a neural-net library, and be able to watch why it picks each move.
Eleven game-state features become sensory spikes. Sixteen populations, one per heading and food direction, feed three motor neurons (left, straight, right) through synapses that strengthen when a move earns reward. Danger signals inhibit unsafe moves, and the motors compete until one fires.
On 40 seeds it never trained on, it averaged 19.52 food. Untrained, it scores zero, and a random player that only avoids crashing gets 1.0. Its best run was 45, and 29 tests check the neuron code against game behavior.
A one-line rule, take a safe move toward the food, averages 34.4 and beats it on 34 of the 40 seeds. With only 16 contexts and 3 actions, the network is really learning a 48-entry lookup table, and it doesn't find the best entries. The spiking competition also picks the same move as a plain argmax every time, so the neurons implement the decision without changing it. Richer inputs would give the spiking part something to do.

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.
Details