Interactive neural network

Visualizing how brain cells communicate and learn

Rather than just watching a brain work, in the space below you can create your own miniature brain! Simply click/press anywhere to add a new neuron to the brain. Press the up/down arrow or any number on your keyboard to change the layer your new neurons are made in. Just like in our brains, information is processed through different layers of neurons. For example, one layer in the visual part of our brain processes lines, the next layer combines lines together, the next layer figures out the shape of those lines, such as a box. In this visualization, information comes into layer 0 neurons by clicking/pressing the “Generate Input” box. This causes the voltage within these neurons to increase, making the neurons go from white (-70 mV) to a solid color as the voltage rises. Once the voltage is high enough (-50 mV), information is relayed to the next layer through an action potential (yellow balls). You can watch as information moves through a brain you create! More than just that, we can see here how our brains learn. You may notice that some of the connecting lines between neurons, called axons, get thicker or thinner as information flows through our mini-brain. This is called neuralplasticity. Neurons that fire with one another strengthen their connections (they become thicker) while neurons which fire out of sync with one another will get weaker (thinner) connections. When we learn something new, it is these connections between neurons which are getting thicker and helping us remember new information! Before you generate the input, can you guess which neurons will learn the fastest and wire together? 
You’ll have to refresh the page to make a new brain.

TL; DR: Click to make a new neuron. Use the arrows or number keys to change the layer. Once your brain is built, click “Generate Input” to get things going. Click individual neurons to see more about them.

Let me know in the comments if there are other features you would like to see in the program or of any errors you find.

All the code is available below. I wrote this in Processing, a open-source language built on Java. You can easily play around with the code here.
This neural network tool is inspired by Neuronify which is much more in-depth than mine (though requires a download).

Interested in programming and neural networks? Start here with the Coding Train. 

Creative Commons License
This work by Blake Porter is licensed under a Creative Commons Attribution-Non Commercial-ShareAlike 4.0 International License

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.