worm-whisperer Grounding behaviour in a fixed C. elegans connectome: a learning agent may stimulate only a whitelist of interneurons — the wiring, the motor layer and the body do the rest.

Principle. The connectome (which neurons connect, and how many synapses) is never modified. The agent cannot touch motor neurons or muscles. Everything below is a recording from the simulator (302-neuron c302 model in JAX + Boyle 2012 motor layer + 2D body on agar), replayed at 20 frames per simulated second.
t = 0.0 sC = —distance = —
Neurons read by the motor layer (ΔV from rest, mV)
forward gatereverse gatedeep bend
Orange bar = channel currently stimulated by the agent (whitelist only: AVB, AVA, SMDD, SMDV, RIV). Blue = membrane potential rise produced by the network. Gates open when AVB or AVA exceeds +3 mV above rest; a deep bend (omega) fires when RIV exceeds +30 mV, its dorsal/ventral direction set by SMDD − SMDV (ADR-017).

What we found

Numbers are from pre-registered evaluations (n = 128–256 random starts unless noted). Negative results are kept on purpose.
0.914

Chemotaxis through command interneurons

Stimulating only AVB, AVA, SMDD, SMDV and RIV, an evolved policy reaches an odour source 2.5 mm away within 40 s in 91 % of trials (random policy: 4 %). The minimal circuit needs all three of reversal, deep bend and steering.

0.109

Sensory neurons alone cannot do it

With only sensory channels (ASE, AWC, AWA, ASK, ASH, PLM, ALM, AVM) the same learner stays at chance (0.125). In this model the sensory-to-command step of the connectome is silent — a negative result confirmed both with static stimulation and with learning.

ρ = −1.00

The pirouette rule re-emerges

Given reversal and deep-bend channels only, evolution rediscovers the textbook rule: concentration falling → reverse + omega turn, rising → run (Pierce-Shimomura et al. 1999). Reversal onset rate falls monotonically with dC/dt in the full policy too.

100 % left

Corners are turned by the deep bend

In a corridor four body-widths wide, head steering alone cannot take a corner (0/32). Only a deep bend pressed against the wall does — and its dorsal/ventral direction is the turn direction. With ventral-only bends the worm enters the left arm of a T-maze on 128/128 trials and never takes a right corner.

1.00 → 1.00

Right corners need dorsal bends

Letting SMDD/SMDV set the bend direction (as reported for real worms, Nature Neurosci. 2026) makes the right-turn corridor learnable (reach 1.00) — but the learned policy becomes right-handed and loses the left corner.

0.73

Lateral information selects the bend side

With a left/right concentration difference at the nose (an idealised head-sweep sample), the policy chooses the bend direction toward the source in 73 % of pulses (62 % without it) and navigates as fast as an oracle that knows the direction.

stall ⇒ reverse

Why the worm still goes left first

In narrow corridors a wall stall reads as "concentration stopped rising", which triggers the open-field reflex reverse + ventral bend. That reflex is the only way to take a corner — and the reason a correctly aimed right entry is aborted. Learning settles on "go left first, reverse if worse".

prediction

Testable in real worms

In narrow T-mazes, arm choice should be decided by the dorsal/ventral direction of the bend executed at the junction; conditions that suppress dorsal turns should bias animals to the ventral arm and delay reaching the other goal. Wall stalls should trigger pirouettes.

Model: OpenWorm c302 (C2) neurons re-implemented in JAX with fitted dynamics ("Vfit"); Boyle, Berri & Cohen 2012 motor layer gated by AVB/AVA; 2D viscoelastic body with wall contact. Learning: evolution strategies over a small MLP. Full methods, decision records (ADR-001…017), and every negative result are in the repository: github.com/kairess/worm-whisperer. Korean documentation lives in docs/.