Pair a presynaptic spike with a postsynaptic spike and watch the NMDA receptor of a dendritic spine detect the coincidence: glutamate crosses the cleft, the back-propagating spike lifts the magnesium plug, calcium floods the head and decides whether the synapse strengthens or weakens. Change spike timing, pairing frequency, number of pairings, extracellular magnesium, receptor strength and the potentiation threshold, with numerical checks of the calcium-control model built in. A Blender spine and presynaptic terminal.