Watch a four-neuron brain teach itself to love the light

A visual explanation of reinforcement learning

Watch a four-neuron brain teach itself to love the light

Aatish Bhatia and neuroscientist Arkarup Banerjee build a simple digital creature called a spark with just four neurons and three adjustable parameters, then let it learn by trial and error. Through thousands of attempts, guided only by reward and punishment, the spark goes from spinning in place to expertly tracking light. The piece visualizes learning as a path through the space of possible brains, and shows how the same algorithm can produce fleeing, freezing, or fighting depending on the reward.

Learning is how you navigate this vast internal space. And feedback is the compass that points the way.
  1. jspaw

    It seems as if you’re using an analogy to how human brains learn, but aren’t being explicit that it’s only an analogy. Or are you asserting that this describes how human brains learn?

  2. dejongh

    Thanks for sharing. I am not concerned about the brain analogy - it is a good explanation of the algorithm.

  3. bobosha

    Love it! It's a very helpful and clear visualization. Thanks very much for putting this together.

More from this day

2026-11-14