Watch a tiny brain teach itself XOR — one of the simplest problems a computer can't solve with a straight line. Press Train and see the connections strengthen, the loss fall, and the answers snap into place.
2 inputs → 2 hidden neurons → 1 output. Each line is a weight: thick & green means “pass this signal through,” thin & red means “block it.”
Loss is how wrong the network is. The goal of learning is to push this curve toward the floor.
Output is 1 only when exactly one input is 1. Watch the network's guess converge on the truth.
| In 1 | In 2 | Target | Network's guess |
|---|
Each neuron mixes its inputs using its weights, then squashes the result with a curve (the tanh function). Numbers flow left → right to produce a guess.
We compare the guess to the target. The gap is the loss. A big loss means the network is badly wrong; zero means perfect.
The network works backward, nudging every weight a tiny bit to reduce the error. Repeat thousands of times and the weights settle into a solution.