binary neural network

A neural network with 2 inputs, 2 hidden neurons and 1 output, learning XOR: the output should be 1 when exactly one input is 1.

Each sample goes through one layer at a time: the inputs, then the hidden layer, then the output. After the output, backpropagation nudges every weight and bias to lower the error on that sample. Four samples make an epoch.

Drag the scene to orbit it, scroll to zoom.

training
While paused, moving α re-applies the last update at the new rate.
Layer steps per frame while playing.
XOR samples
x₁x₂targetoutput
view
key
network 2 → 2 → 1
loss
・