This is a self-regulating Spiking Neural Network I'm building that uses time, spike, and neuromodulatory based plasticity. It's designed to change its own synaptic structure based on learning rules similar to those in the human brain. The simulation currently runs with about 26k neurons.
The environment is a simple 2D world with colored circles. Red is poison, green is food, and blue is water. A large static ball in the center signals the agent's state: white means it's hungry, black means it's thirsty. The agent must learn to walk, to follow the correct ball based on the central signal, to avoid the red poison balls, and to predict the movement of the moving objects.
The agent's "brain" processes vision from sensory rays through a cortical model using predictive coding. A basal ganglia circuit then selects the appropriate action by disinhibiting motor neurons, whose spikes generate movement. Learning is driven by a reinforcement rule called R-STDP. The model also has a hippocampus for spatial planning and a sleep phase for memory consolidation.
Known limitations are unpredictable learning and very slow performance; with 20k neurons it runs at 0.002x real-world speed. There is also a recurring issue where synaptic weights in the motor system grow too strong over time, causing the agent to move too fast and lose delicate control.
My current work is focused on making the code more modular, improving documentation for maintainability, and optimizing performance through better memory access and SIMD. I am also trying to improve the model's learning quality to fix the movement sensitivity.