Piano sequence learning

One leaky integrate-and-fire neuron per key, all-to-all connected, all weights starting at zero. STDP strengthens a synapse whose spike arrives just before the target fires — so learning only happens when the conduction delay is close to the note interval. Hover an arc to read its weight.
Cells tire as they fire and terminals run their vesicles down, so replay stops after a few laps instead of looping forever. Every spike inhibits all the other cells at once, with no delay, so of two learned successors only one wins — and because the tired one loses, cueing twice tends to play the other tune. Turn on the second-order lines to let the note before last pick the branch instead.
Sequence
Play by hand with A W S E D F T G Y H U J, or click keys and neurons.