Machine Learning 101

Watch a tiny neural network learn.

This little network is trying to solve XOR — a classic puzzle a single neuron can't crack. Hit Train and watch the connections adjust, the predictions sharpen, and the error fall as it figures things out.

The Network

2 inputs → 4 hidden neurons → 1 output. Blue lines push toward 1, red lines push toward 0. Thicker = stronger.

Positive weight Negative weight Neuron activation (brighter = more active)

Controls

Steer the training and see how each choice changes the outcome.

How big a step it takes each update. Too small = slow; too big = unstable.

Epoch
0
Loss
Idle — press Train to begin.

Loss Curve

“Loss” measures how wrong the network is. Learning is working when this line trends down toward zero.

Predictions vs. Truth (XOR)

The goal: output ≈ 1 when inputs differ, ≈ 0 when they match.

Input AInput BTargetPredictionRight?
1

Forward pass

Inputs flow through the weighted connections. Each neuron sums what it receives and “fires” more or less strongly.

2

Measure error

We compare the output to the right answer. The gap is the loss — our score for how wrong we were.

3

Backpropagate

The error is sent backward to nudge every weight in the direction that reduces it. Repeat thousands of times.