How a Neural Network Learns

Watch a tiny neural network learn the XOR problem — a classic task that demonstrates how adjusting weights through gradient descent lets a network discover patterns.

Network Architecture
Positive weight
Negative weight
Weak connection
Training Loss
Loss (lower = better)
Ready Epoch: 0
0.50

What's happening?

This network has 2 input neurons, 4 hidden neurons, and 1 output neuron. It's trying to learn XOR: output 1 when inputs differ, 0 when they're the same. Press Train to watch it learn through trial and error — adjusting its connection weights to reduce mistakes.

0, 0
expect: 0
0, 1
expect: 1
1, 0
expect: 1
1, 1
expect: 0