Reinforcement learning you can see: a four-neuron creature finds the light
TL;DR: A tiny simulated creature learns to follow light, and you can see its entire learning problem in three dimensions. Aatish Bhatia and Arkarup Banerjee’s new Myriad chapter makes reinforcement learning inspectable, while its biological analogy needs a narrower reading.
Open the interactive explanation:
aatishb.com/myriad/how-brains-learn/
Start with a creature you can understand
The “spark” has two light sensors and two outputs that drive its flippers. Three controls determine its behaviour: straight connections, crossed connections and a drive that keeps it moving without light. Adjust them by hand before watching the automatic learner. You can connect a particular wiring choice to the movement it produces.
That small design makes something usually hidden visible. A point in a three-dimensional cube represents one complete configuration. A line through the cube records changes to the wiring; it is separate from the creature’s route around its arena. Keeping those two kinds of movement distinct is the key to reading the diagrams.
What feedback actually changes
Each training trial perturbs the parameters, runs the creature for 500 time steps and measures the average brightness it encounters. Performance is compared with a running average. A better trial nudges the wiring towards the perturbation; a worse trial nudges it away.
The baseline matters: feedback concerns improvement relative to recent performance. Random changes supply experiments, and the reward supplies a direction for retaining or reversing them. The winding paths make the cost of this search visible, including detours that a neat before-and-after animation would hide.
Change the reward, change the behaviour
The chapter then rewards avoiding light or approaching it quickly. Those objectives produce different behaviours from the same basic creature. Following, fleeing, freezing and charging can look purposeful even though the experimenter chose the scoring rule.
For anyone trying to understand AI, this is a useful place to pause. A score records what the designer decided to measure. To judge whether a learned behaviour is desirable, you also need to inspect the setting and the objective. The animation makes that judgement possible because both remain simple enough to examine.
The research behind the teaching model
The authors connect their learner to Ronald Williams’s 1992 REINFORCE work. His paper describes reward-driven adjustments for networks containing stochastic units. Myriad explicitly identifies its own variant: it perturbs weights and biases, rather than each neuron’s output.
That distinction has a research history of its own. Paul Züge, Christian Klos and Raoul-Martin Memmesheimer’s 2023 study compares weight and node perturbation. Their analysis and simulations show conditions where weight perturbation can match or outperform node perturbation, particularly when tasks extend over time or are grouped into batches. It supports taking this learning mechanism seriously; it does not turn the spark into a biological brain.
Where the brain analogy ends
There is experimental evidence for reinforcement during natural behaviour. A 2025 Nature study by Jonathan Kasdin, Alison Duffy and colleagues tracked juvenile zebra-finch song learning alongside dopamine activity. Its reported relationship between dopamine, recent performance and later song development concerns a particular biological system.
The four-neuron browser creature cannot establish how a human learns to walk or speak. Readers have both praised the explanation of the algorithm and challenged the breadth of its brain analogy. That is a productive distinction: use the spark to understand a feedback-driven search, then turn to experiments for claims about living brains.
Foundational algorithm:
link.springer.com/article/10.1007/BF00992696
Weight versus node perturbation:
journals.aps.org/prx/abstract/10.1103/PhysRevX.13.021006
Song-learning experiment, published in 2025:
www.nature.com/articles/s41586-025-08729-1
