True direction Decoded (population vector) Active neuron (spiking)

Population Vector Decoding of Motor Cortex Spikes (2D)

This 2D-canvas companion models the same core algorithm behind intracortical brain-computer interfaces as its 3D counterpart: a population of cosine-tuned motor-cortex neurons, each preferring a different reach direction, fires Poisson-distributed spikes whose rate depends on how close the intended movement direction is to the neuron's preferred direction. A population-vector decoder — the same weighted-sum algorithm from the landmark Georgopoulos motor-cortex studies, and the ancestor of every modern intracortical BCI decoder — reconstructs the intended direction purely from the spike counts, letting you see in real time how neuron count, tuning strength and neural noise trade off against decode accuracy, including a direct sweep of decode error versus population size.