Bring a spreadsheet of data, pick what you want to predict, design a neural network, and watch it learn. Everything runs in your browser, so your data never leaves this device.
A neural network is a computer program that learns from examples instead of being given rules. It makes a guess, checks how wrong it was, and adjusts itself a tiny bit. Repeat that thousands of times and it gets good. This lab lets you watch it happen, step by step.
Takes about a minute. It loads a spiral of colored dots and trains a small network to tell the three arms apart, while drawing what it currently believes.
Tables: learn from a spreadsheet · Text: learn to write · Games: learn by playing itself · Worm: a real worm's brain wiring
Start with a sample dataset, or bring your own. Your data should be a table where each row is one example and each column is one piece of information about it, like a CSV exported from Excel or Google Sheets.
Drag a CSV file here
Comma, semicolon, and tab separated files all work. The first row should be column names.
Tell the network what to learn. The target is the one column you want it to predict. Inputs are the columns it's allowed to look at. Ignore anything that's just a label, like an ID number or a name.
What should it predict? Pick one or more (up to 6) by setting "Use as" to Answer.
Networks only understand numbers, and learn best when every input is on a similar scale. These settings handle that for you.
Design the brain. Data flows left to right: from your inputs, through hidden layers of neurons that find patterns, to output neurons that give the answer. Start small; you can always make it bigger.
Dropout randomly switches off some neurons during training so the network can't rely on any single one. It helps when the network memorizes the training data but does worse on new data.
Connected is how many of the possible connections into a layer exist. Real brains are sparse: each neuron talks to only a few others. Lower values make a smaller network with fewer weights to memorize with.
Training shows the network each example, measures how wrong it was, and nudges every connection a little to be less wrong. One pass through all the training data is called an epoch. Press Start training and watch the charts: the mistakes line should fall and the accuracy line should rise.
Across: passes through the data. Up: how wrong its guesses are. Lower is better. If the test line starts rising while the training line keeps falling, it's memorizing instead of learning.
Across: passes through the data. Up: how often it's right on examples it never trains on. Higher is better.
These can be changed any time, even mid-training.
Every neuron in a hidden layer learns to respond to some pattern in the data. Here you can see what each one has learned, which examples excite it, and what happens if you switch it off.
How well does it really work? Everything here is measured on the test data: examples held back from training, so it's like a surprise exam.
Scrambles one input at a time and measures how much worse the network gets. A big drop means it relies on that input.
Looking at where it goes wrong is often the fastest way to improve. Sometimes the data itself is wrong.
Put your trained network to work on new examples, and check it against real answers it has never seen.
Change any value and the prediction updates instantly.
Paste rows with the same column names as your data (the first line is the header). Include the target column to see which predictions were right and wrong; leave it out to just get predictions. The box below is filled with real held-back examples to start.
Saved networks live in this browser and include everything needed to make predictions (but not your data). To move one to another device, export it as text.
This network is wired like a real animal. The roundworm C. elegans has exactly 302 neurons, and scientists have mapped every connection between them. Sensory neurons take in the world, motor neurons move the body, and interneurons connect the two. Here that wiring diagram is frozen in place. A task's inputs go into the worm's sensory neurons, the signal flows through the real connections for a few time steps, and the answer is read from its motor neurons. Only the way inputs enter and the way the answer is read out are trained.
Across: training checkpoints. Up: how often each network gets new test examples right. Higher is better.
Three networks learn side by side. Real worm wiring uses the actual connections. Same synapses, shuffled has exactly the same number and strengths of connections, but wired to random neurons. No wiring reads straight from the sensory neurons.
One training run can be lucky. This trains all three networks five times from scratch (with different random splits and polarities) and reports the average, so you can see whether real wiring genuinely does better than random wiring.
Wiring data: Cook et al. 2019, Nature (hermaphrodite whole-animal connectome), read through the OpenWorm Connectome Toolbox. Neuron classes come from the same toolbox.
Here the network isn't shown answers. It learns by playing: it tries a move, sees whether that led to a win or a loss, and slowly works out how good each move is (this is called Q-learning, and with a neural network doing the guessing, a deep Q-network). In the two-player games it plays both sides, so both improve together.
The rules. Each round, Side A then Side B picks one: Hold, Arm (+1 missile), Defend (+1 shield, absorbs 20% of damage, up to 3) or Strike (fire every missile). Each missile takes 15 off the other side's 100 people. Whoever is struck fires back automatically with as many missiles as were fired at it (never fewer than 3), and nothing can stop that. The exchange ends the game. It's all fictional and abstract: no real countries or weapons.
Changing either one starts a fresh learner.
Type and size apply to practice, tests and the play area. Changing them keeps what it has learned.
How much of the maze around itself it can see. Bigger sees more, but makes a bigger network that learns slower.
Rewards: +1 for reaching the goal, −0.01 per step, −0.2 for walking into a wall, and −0.03 for stepping back onto a tile it has already visited (more if it keeps doing it). A run ends after half as many steps as there are tiles. Changing any of these settings starts a fresh learner.
You changed the setup. The next Train starts a fresh learner.
A well-trained network should draw almost every game against itself: each side blocks every win the other could set up. Turning up Variety adds mistakes, and the other side can pounce on them. The numbers show what really happens.
The numbers are the AI's ratings from +1 (it expects to win) to −1 (it expects to lose). Near 0 means it expects a draw, which is what most moves lead to against good play. It was never taught strategy, only whether it won.
Why this matters. The learner isn't cheating or being sneaky: it does exactly what the points reward, and we wrote the points badly. Real AI systems are also trained to chase scores that people write, so part of making AI safe is checking that the score really matches what we want. This kind of mistake has a name: reward hacking.
Tap or drag across tiles to add or remove walls. To move the start or goal, choose Start or Goal, then tap a tile.
Why this isn't memorizing. Every maze is made fresh, so it has never seen this one before, and it only knows what its flashlight shows plus a compass pointing at the goal. To do well it has to learn a general skill: how to find its way. Draw a maze of your own to test it.
Teach a network to write. It reads text and learns to guess the next character from the few characters before it, then invents new text one character at a time. This simple version has no memory beyond that short window, so it learns spelling and word shapes, not meaning. Or switch the model to Words: it guesses whole words instead, so everything it writes is made of real words.
Paste any text (a few hundred characters or more), or a list of words with one per line (50 or more) to make a name-style generator.
The defaults work well, so you can go straight to Train. Come back later to experiment.
Heads up: very large windows make the network much wider, so it trains more slowly.
You changed the model. The next Train starts a fresh one.
Across: training progress. Up: how surprised it is by what really comes next (the loss). Lower is better. One line is the text it trains on, the other is text it never trains on.
Every word is stored as a list of numbers that the network learns while it trains. This map squashes those lists flat, so it is only a rough shadow of what the network sees. Words the network uses in similar ways end up close together. With this little text, only the common words form neighborhoods that mean something: rarer words get too few examples to move far from where they started.