Machine Learning 101 • Interactive

Watch a tiny neural network learn XOR.

Press Train and see gradient descent gently adjust connection weights until the network learns a classic pattern: output 1 when the two inputs are different, and 0 when they match.

Current loss
lower is better

The network

Circles are neurons. Lines are weighted connections: blue pushes a signal up, pink pushes it down. Thicker lines mean stronger weights.

2 inputs3 hidden neurons1 output
Input layer the example Hidden layer learned features Output prediction Example: 0 XOR 0 → target 0
Training complete: the loss is low!
1. Forward passThe two input numbers flow through the network to make a prediction.
2. Measure errorLoss compares the prediction with the correct XOR answer.
3. Backprop + updateGradient descent nudges each weight in the direction that reduces loss.