Spikes → decoder → cursor. A brain–computer interface loop you can break and fix in the browser.
Each channel is a cosine-tuned motor-cortex unit (Georgopoulos, 1986): firing rate = baseline + depth · cos(θ − preferred direction) · speed. About 18% of units are tuned to click intent instead. Spikes are Poisson in 20 ms bins, with optional rate noise, electrode dropout and slow random-walk drift of preferred directions.
The cursor moves along minimum-jerk trajectories to random targets and pauses to “click”. The population fires as if attempting that movement — an open-loop calibration. 80% of the 40 s session trains the decoder, 20% is held out for R².
A velocity Kalman filter (Wu et al., 2003): linear tuning model fitted by least squares, diagonal observation covariance, so every update is a 2×2 problem even at 1024 channels. Click is decoded by linear discriminant analysis on the same bins, smoothed and thresholded.
Webgrid bits per second = log₂(N − 1) · max(correct − wrong, 0) / t, where N is the number of cells. Your mouse is only the intention signal; the cursor never sees it directly. Try more noise, 50% dropout or drift, watch performance fall, then recalibrate.
The same decoded cursor and click drive a 30-key on-screen keyboard: copy-type a phrase, fix mistakes with ⌫. Words per minute = (correctly typed characters / 5) per minute — the metric used for text entry by BCI users. Link: ?mode=speller.
Closed-loop recalibration (Gilja et al., 2012): the simulated user plays the current task for 40 s with 70% computer assist, intended velocity is assumed to point at the target, and the decoder is refitted on that data. After losing half the electrodes it recovers more than a fresh open-loop calibration (scripted user, 256 ch: 18.8 vs 11.4 WPM), because training data now matches how the cursor is really used.