Synthesis
The frontier: a cortex that rewires the spinal cord. A Hebbian network reads proprioception and terrain, then outputs all six CPG parameters — tonic drive, time constants, coupling weights — in real time. The gait phase gates the learning: weight updates fire only during stance, when ground contact makes proprioception reliable. Flight is for gathering traces. Touchdown is for applying them.
sensors → cortex → CPG internals → muscles → physics → stance → learn → harmonize
Cortex
12 sensors → 8 hidden → 6 CPG parameters. Reward-modulated Hebbian plasticity with eligibility traces. The weights learn which sensory patterns demand which spinal cord configurations.
Spinal Cord
Matsuoka oscillators with proprioceptive reflexes. The cortex tunes the oscillator's internal wiring: drive level, time constants (tau, tauV), reciprocal and contralateral coupling weights.
Stance-Locked Plasticity
Weight updates are gated by gait phase. During stance, ground reaction forces give the cortex reliable signal — learning fires. During flight, eligibility traces accumulate but weights hold still. On touchdown, a burst multiplier amplifies the strike moment. The gait itself decides when to learn.
Harmonic Resonance
The three coupling weights — reciprocal, contralateral, ipsilateral — define frequency relationships between oscillators. Their ratios map to musical intervals on the circle of fifths. A consonance reward nudges Hebbian learning toward just-intonation: when wRecip:wContra falls near 3:2, the gait locks into a perfect fifth. The ring visualization shows the coupling triangle drifting through harmonic space as the cortex learns. Consonant gaits are rhythmically stable — the same math that makes a chord ring makes a stride repeat.