Universal Approximation Theorem: Neurons Fitting a Curve (2D)

This simulator makes the core promise of deep learning visible: a single hidden layer of sigmoid neurons, trained live by batch gradient descent, learning to reconstruct an arbitrary target curve one small weight update at a time. Rather than a single 3D scene, this version spreads the same live computation across four linked 2D panels — the network's live fit against the target curve, a ridgeline unstacking every individual neuron's own S-shaped contribution, a scrolling loss-history chart, and a draggable, zoomable weight-space scatter of every neuron's own slope and shift. Drag the neuron-count slider down and the network visibly loses the ability to represent sharp features — drag it up and the fit sharpens, exactly as the Universal Approximation Theorem predicts.