C. elegans connectome explorer
C. elegans has exactly 302 neurons. Every synapse has been mapped. It is the only organism for which we have a complete wiring diagram of the nervous system — and it is enough to produce chemotaxis, learning, decision-making, and a repertoire of locomotory behaviors that look, from the outside, like intention.
This is a simulation of that nervous system, running live in your browser. The top panel shows the anatomical connectome: 302 neuron dots positioned by ganglion, glowing with their membrane potential. The bottom panel shows a worm foraging in a 20mm arena with food patches.
How it works
The simulation computes graded potentials — not action potentials. Most C. elegans neurons don’t spike. Instead, transmitter release is proportional to membrane voltage. The entire 302-neuron network is a single 302×302 matrix multiply per integration step: chemical synaptic input, gap junction current (ohmic, voltage-difference-based), leaky integration toward baseline, and slow adaptation.
The worm’s behavior emerges from an 8-phase sensorimotor cascade:
- Olfactory input — AWC neurons (OFF-type: tonically active, silenced by odor) detect volatile attractants
- Disinhibition — odor silences AWC, which disinhibits AIY (via GLC-3 glutamate chloride channels), promoting forward runs
- Gradient computation — temporal derivative dC/dt determines whether the worm is moving toward or away from food
- Motor competition — bistable AVA/AVB command interneuron network (gap-junction-mediated) selects forward vs. backward
- Dopaminergic drive — CEP mechanosensory neurons detect food contact, releasing dopamine for the basal slowing response
- Motor selection — AIY→AVB for forward runs, AIB→AVA for reversals, RIM for omega turns
- Motor execution — A/B/D-type motor neurons drive a 20-segment sinusoidal body wave at ~0.5 Hz
- Reinforcement — NSM serotonin on food ingestion promotes dwelling and reinforces odor-food associations
Try it
Use the preset dropdown to ablate specific neurons and watch the behavior change:
- AWC ablation — the worm loses chemotaxis and wanders randomly (Bargmann et al. 1993)
- CEP ablation — the worm fails to slow down on food: the basal slowing response disappears (Sawin et al. 2000)
- AIY ablation — constitutive turning: the worm can’t suppress reversals and spirals in tight circles (Gray et al. 2005)
- AVA ablation — no backward locomotion: the worm only moves forward (Chalfie et al. 1985)
Hover over the neural panel to identify individual neurons by name, type, neurotransmitter, and behavioral role.
What the data is
The connectome is from Cook et al. 2019 (Nature), accessed via the wormneuroatlas Python package. Synaptic signs (excitatory/inhibitory) come from three sources in priority order: literature-curated connections (Chalasani 2007, Suzuki 2008), the atlas’s SynapseSign predictions, and a neurotransmitter-based heuristic (GABA→inhibitory, glutamate→inhibitory via GluCl channels, ACh→excitatory).