Spike: wire neurons, run a body

· Spike

8 min read Original article ↗

Plate I A game about neural circuits

grow a nervous system

Wire neurons. Run a body. Connect sensors to interneurons to motor pools and a leg kicks, a lamprey swims, a heart holds its pressure when you stand up.

Every neuron is a real NEST model, simulated live, in NEST's own units: mV, ms, pA, nS, Hz.

Alpha Runs on Linux, macOS and Windows. Rough in places. Tell us what broke.

Fig. 1. A lamprey swims on a half-centre oscillator: left and right pools inhibit each other and tire, so they take turns. Live, at true speed.

15
chapters in three wings: Body, Bestiary, Theory

29
cell types, from integrate-and-fire to Hodgkin-Huxley

1 ms
per step. Circuit and body move together.

0
numbers in a verdict. It names what is missing, not the answer.

What it is

A bench, a body and the scopes between them

Each level hands you sensors, motors and an empty bench. Add neurons, drag connections, set weights. The circuit drives a simplified body, one millisecond at a time. You read the result off a physiologist's instruments.

The Spike lab running the lamprey level: the circuit of stained neurons on blue graph paper at left, the swimming lamprey, a score gauge, a spike raster, voltage traces and motor output bars at right, and the level brief below the circuit
Fig. 2. The lab on the lamprey level, with the reference circuit running.
  1. The bench. Neurons are stained cell bodies on graph paper. Sienna excites (arrowhead). Prussian blue inhibits (bar, ⊣). A firing cell bleeds stain.
  2. Parts and wiring. Pick a cell type, then add excitatory or inhibitory groups, noise and connections. Undo and redo are on the bar above.
  3. The body. Here, a toy lamprey driven by the motor pools. Elsewhere: a limb, a heart, lungs, an eye, a gut, a fly's heading.
  4. Score and verdict. A running score, your stars, and one sentence on what the circuit is doing.
  5. The spike raster. Every spike of every cell, grouped by population.
  6. The scopes. Membrane potential in mV, and the rate on each motor channel.
  7. The brief. One new idea per level: what to build, what passes. The numbers are in a recipe, and the recipe costs a star.

What you do

Six verbs

The interactive tutorial on the first level: the lab dimmed except the sensor card, and a banner asking you to raise the weight until the cell spikes

I. Build

Start with an empty bench and the level's sensors and motors. Add cells from a parts bin of NEST and NESTML models: integrate-and-fire, adaptive exponential, Izhikevich, Hodgkin-Huxley, an SA-node pacemaker, a brainstem burster, a crab STG cell. Drag connections. Set weights. A tutorial walks you through the first neuron.

The autonomic heart level running: a drawn heart with heart rate, pressure and stroke volume readouts, an ECG strip, and the circuit of sympathetic and vagal pools

II. Run

Watch it live: spike raster, voltage traces, gauges, and the body. A limb, a heart with blood pressure, lungs, an eye, a gut, a swimming lamprey, a crawling worm, a fly's compass.

A CHECK result card reading Not passed: left and right are not alternating, the bursts of the two sides overlap too much

III. Check

Instant scoring in five slightly different worlds (seeds). Pass all five for the second star. The verdict says what your circuit did and what is missing. It never gives the answer.

The lab notebook: cards on rheobase, synaptic delay, coincidence detection and the reflex arc, each with its citations

IV. Learn

One new idea per level. Three tiers of hints. A recipe you can buy with a star. A notebook of cited findings, and a glossary.

A diagnosis case on the crab pyloric circuit: patient symptoms, a probe counter, the lesion lab button and five candidate lesions to choose from

V. Diagnose

A patient's circuit has a hidden lesion and a list of symptoms. Probe it with the scopes and the lesion lab, then name the broken connection. Fewer probes, better score.

The lesion lab on the leech heartbeat: a table of single lesions swept over several seeds, with the score of each

VI. Dissect

Cut any connection and re-run it across seeds. Count motifs. Analyse bursts and heart-rate variability. Plot a phase-response curve and a spike-triggered average. Read the energy bill.

The campaign

Three wings

Each chapter is a hand-inked plate with its levels pinned to the anatomy: micro-puzzles that teach one idea each, a scored task, and diagnosis cases. Three modes, Guided, Standard and Researcher, change tolerance and noise. They never change the circuit.

Plates I–V

The body

Five chapters, from one cell crossing threshold to a whole day of autonomic control. 20 micro-puzzles, 14 tasks, 2 bosses, 6 diagnosis cases.

  1. Invertebratesreflexes, a swimming rhythm, a nose for salt
  2. Spinal cordstretch, hold and reach
  3. Hearta pacemaker, the autonomic nerves, the baroreflex
  4. Breathinga bursting brainstem network tuned by CO2
  5. Autonomicpupil, gut, fight or flight
Plate III. The heart chapter: levels pinned to a drawn heart, nerves and node.

Plates VI–XI

The Bestiary

One chapter per model organism, built on the circuit neuroscience knows best. Opens once you pass chapter I. Each has micro-puzzles, the animal's behaviour as a scored task, and diagnosis cases.

VI. C. elegans. Touch the head and it backs up, touch the tail and it goes: a command switch wired from the real connectome.
VII. The leech. Two heart interneurons that burst in turn: a half-centre with a slow cycle.
VIII. The sea slug. A reflex that habituates, recovers and is sensitised, all in one synapse.
IX. The fly's compass. A bump of activity on a ring holds the heading in the dark and turns with the fly.
X. The mushroom body. A sparse odour code, and a dopamine-gated depression that teaches the fly to avoid an odour.
XI. The crab. A conductance-based pacemaker kernel and two rebound followers make the pyloric rhythm.

Plates XII–XV

Theory

A computational-neuroscience course in four chapters of three levels. Each has its own lab view: a live phase plane, rate strips, a pattern grid, a tuning ring. Plus a spike-triggered average in the Analysis screen.

XII. Dynamics. Class I and II onset, a fixed point that ends firing, one neuron that remembers a pulse.
XIII. Rate models. A Wilson-Cowan pair that oscillates, a winner that holds, a spiking network against its mean field.
XIV. Attractor memory. A whole recalled from a part, two memories without blends, a memory written by plasticity.
XV. Tuning and decoding. A cell tuned by its inputs, tuning sharpened by competition, a direction read from a crowd.

See it run

Real circuits, running bodies

Captured from the released game, at the speed shown in each lab's corner. Clips play while on screen. With reduced motion on, they wait for you.

Fig. 3. The heart. Sympathetic and vagal pools steer a sinoatrial pacemaker; exercise starts and the rate climbs.
Fig. 4. The baroreflex. The body stands up, blood pools, pressure falls; the brainstem circuit pulls it back within seconds.
Fig. 5. The stretch reflex. A tendon tap stretches the muscle, spindle Ia afferents fire, the motoneurons answer and the antagonist is held off.
Fig. 6. The leech heartbeat. Two heart interneurons inhibit each other and burst in turn; each releases its own side's motor neuron.
Fig. 7. The fly's compass. A bump of activity moves round a ring of sixteen cells as the fly turns in the dark.
Fig. 8. The phase plane. Nullclines and fixed points from the cell's live parameters; a pulse throws the trajectory onto a firing loop.
Fig. 9. The pyloric rhythm. Conductance-based STG cells start up and the raster fills with the triphasic pattern.
Fig. 10. CHECK. The episode is scored headless over the level's seeds and the result lands like a stamp.

Every clip and screenshot, with notes →

Honest by design

Cheap tricks fail

  • The mechanism is checked, not the output. Every level reads your circuit's structure for the mechanism it teaches. A swim without crossed inhibition does not pass, however well it wiggles.
  • Cheap circuits must fail. Every level has a table of them in the test suite. The reference circuit must pass on several seeds.
  • Verdicts carry no numbers. Nor do the first three hint tiers. You get what the circuit did and what is missing.
  • Sources are checked. Citations are verified against PubMed, with DOIs. Generated histograms are labelled generated, not passed off as other players.
Fig. 11. The same lamprey without its crossed inhibition: not passed, and the verdict says why.

Sources and simplifications

What is real here

The neuron models are real. The bodies and circuits around them are simplified. A page in the docs says which of five labels applies, layer by layer and level by level.

NEST
The equations are NEST's own, unmodified. Checked by golden checksums and PyNEST parity.

NESTML re-fit
A cell written in NESTML for the game, structure from a paper, numbers adjusted by hand. Not validated against recordings.

Tuned in silico
Chosen by sweeping until the level passed: circuit weights, delays, gains, pass bands.

Illustrative
A body coefficient picked so the module behaves plausibly. Shapes are tested; values are not fitted.

Generated
Produced by a script: the post-solve histograms are variants of the reference, not players.

Read What is real, level by level →

Download

Free, no account

The latest build is on GitHub Releases.

  1. Download the zip for your system and extract it anywhere. No installer, no account.
  2. Linux: run ./Spike.x86_64.
  3. macOS: the app is not notarized, so the first launch is blocked. Open System Settings, Privacy & Security, and choose Open Anyway; or run xattr -dr com.apple.quarantine Spike.app once.
  4. Windows: run Spike.exe. It is unsigned, so SmartScreen warns: More info, then Run anyway.
  5. Optional: each zip has a SHA-256 checksum beside it.

Every zip is built and smoke-tested by GitHub Actions from the tagged source. The game reads and writes only its own save folder.

Run from source

Build it yourself

Needs a C++20 compiler, CMake 3.24+, static GSL, Python 3 and Godot 4.7.

git clone https://github.com/blackmetaltech/spikes
cd spikes
scripts/build-all.sh --tests   # NEST (pinned), NESTML cells, engine, extension, tests
godot --path godot

Or in Docker: docker build -t spike-build . && docker run --rm -v "$PWD":/src spike-build scripts/build-all.sh --tests. Packaging, tests and custom cells: docs/BUILD.md.

A circuit is data

One JSON file, read by the game, the C++ engine and the Python package. A circuit built in the game runs unchanged in PyNEST, with identical spikes.

import spike                           # python/
net = spike.build("my_circuit.json")   # the file you saved in the game
spikes = spike.run(net, 1000.0)