0. What you need
- A Train bearer key (provisioned per partner).
- The gym endpoint URL for your key.
- Optional, for offline pre-training: the recorded episode dataset (JSONL, same observation schema; controllers trained on recordings plug straight into the live loop).
1. Create a gym session
world:robotorepuck(e-puck front-sensor-pair convention matches the proximity contract).camera: 0if your SNN only consumes proximity; observations get smaller and faster.terminal_collision: falseis training semantics: collisions are countable spikes and the run continues (the contact engine re-arms after a cooldown). Settruefor game-style terminal episodes.
2. The control loop
Onestep per control tick; the response is the post-action observation.
wheelsis the SNN-native command: differential velocities from your motor populations, quantized server-side onto the world’s drive (the response echoesapplied_action). Discreteactionalso works.collisionis edge-triggered: true exactly once per hit, derived from a monotonic counter, so a spike between two reads is never missed. Use it as your punishment or terminal signal;collision_countis the running total.holdMs(60–2000, default 300) is your control tick: how long the command holds before the observation is read. Match it to your SNN’s simulation window.sensor_age_msreports how stale proximity/labels are relative to the camera frame. Cloud-detector worlds run ≈500–1000 ms behind, local-detector worlds tens of ms; discount or compensate in your dynamics.- Reward is yours to shape client-side. The observation gives you survival
time (
t_ms), collision spikes, and proximity margins.
3. Pre-train offline (optional but recommended)
The dataset exporter emits recorded episodes as JSONL in exactly the same observation schema, so you can warm up your encoder and controller on recordings (imitation, STDP pre-exposure, calibration of input scaling) before spending live GPU sessions. Ask us for the current vetted dataset release with your key.4. Scale up
- Sessions on one runner are serialized; parallel training uses several runner instances. Coordinate the parallel-session count with us; it maps 1:1 onto GPU streams (your budget).
- Keep episodes honest: don’t sense or score the first frames right after a
reset(world-model settle). The physics exam has no settle window (it senses from tick 0), so never make your controller depend on blindness.
5. Evaluate and certify
Gym telemetry (t_ms, collision_count) is self-reported training signal,
not certification. When your controller is worth a claim:
1
Benchmark in the gym
Freeze the weights, run a fixed episode battery (same worlds, same
settings), and record survival + collision stats.
2
Certify your trained SNN
Package it as a Python module (
reset/act over the same obs dict) and
submit it to the frozen Webots exam: your own
architecture, sandboxed, no 9-float restriction. The verdict is comparable
to the whole program history because everything except the policy slot
stays frozen.3
Transfer showcase
A trained SNN can drive a live hosted world client-side (the SNN transfer
demo): the same brain, unmodified, in a world it never trained in.

