A real, tiny feed-forward network (2 inputs → your hidden layers → 1 output, tanh hidden units, sigmoid output) trains in your browser to separate the four corners of the classic XOR pattern — the textbook example that needs at least one hidden layer, because no single straight line can split it.
Loss = (1/n) · Σ (yᵢ − ŷᵢ)²
Weight update: w -= η · ∂Loss/∂w (backpropagation)
- Supervised — every point comes with its true label yᵢ; the network minimises the loss above directly. This is what "training data" means.
- Unsupervised — no labels are shown. The network instead self-trains toward its own current majority split (pseudo-labelling), the same idea behind clustering: finding structure without being told the answer.
- Reinforcement — one random point arrives per episode; the network guesses an action and only gets a scalar reward (+1 correct / −1 wrong), never the label itself, and learns via a policy-gradient rule.
The floor plane always shows the network's current output across the whole 2D input space (blue → red), the four dots are the true XOR corners, glowing pulses trace the forward pass layer by layer, and connection colour encodes each weight's current sign and magnitude.