Beta — hosted gym. The
/v1/sim/* endpoints are live at
https://gym.alakazam.gg, authenticated with a bearer token we issue you
(Authorization: Bearer <token>). Every session holds one live world-model
GPU stream, so the runner caps concurrent sessions and returns 429 when
full. You can also run the gym yourself from the repo (gym-server.mjs) if
you prefer local.proximity— two virtual range sensors (like the e-puck’s IR pair).0= clear,1.0= at contact range. Objects left of the robot’s centre excite the left sensor, right excites right; something dead ahead (a wall) excites both. Compact obstacles grade by screen-space closeness, walls by time-to-contact.collision— a spike:trueexactly once per confirmed collision, and guaranteed to read1.0proximity on the colliding side. The monotoniccollision_countmeans a spike can never be missed between reads.sensor_age_ms— how far the sensors lag the camera frame in the same observation (cloud-detector worlds ≈ 0.5–1 s, local-detector worlds tens of ms). Compensate or discount accordingly.camera— optional square RGB frame (64/128/256), requested per session.
The control loop
action
(left | right | forward | none) or your controller’s native differential
wheels — quantized onto the world’s drive (right wheel faster → veers left,
near-equal → forward, near-zero → idle) and echoed back as applied_action.
With terminal_collision: false (the default) a bump emits its spike, the
collision engine re-arms, and the run keeps going — punishment signals without
episode churn. Pass true for game semantics where the first hit latches
done until you reset.
Generating a dataset
Your loop is the dataset generator: append eachstep response as a JSON
line and you have on-policy training data with your own actions embedded. Each
reset is a fresh world boot — a new stochastic seed — so episodes are
independent.
Don’t have a controller yet? The bundled batch generator drives a reactive
avoidance policy (the same shape a trained SNN produces) across worlds and
episodes, then converts to train-ready arrays:
world / episode / seed / action / obs). The NPZ companion is the load-once
training format:
Credits & rate limits
Simulation spends the same — and only — billed unit as every other live surface:session_seconds. A gym session holds a live world-model
stream, so what you consume is stream time, not API calls:
- Cost of an episode ≈
steps × holdMsof live seconds (plus ~30–60 s of world boot per session). Example: 100 steps at 600 ms = 60 s — the free developer tier’s 7,200session_seconds/day covers about 120 such episodes. - Steps, observations, resets and dataset files are free.
resetends the old stream before booting the new one, so seconds never double-count. - No per-minute rate limit applies to the control loop. Like the other
runtime routes,
step/obssit outside the per-key 60-second limiter (see rate limits); they’re bounded by your daily quota, the live-session concurrency cap (admission queues FIFO when capacity is full), and theholdMsfloor of 60 ms (≈16 steps/s per session). - Exhausting the daily quota returns
402at session creation, like any other session mint.
In the current self-hosted beta none of this is enforced — the runner binds
127.0.0.1 with no key, and you consume your own account’s stream time
directly. The hosted rollout meters sim sessions through the same admission
path as runtime sessions.Budgeting
- One session = one live GPU stream. Generate sequentially, or cap parallel sessions to your quota.
resetreuses the gym session — it is the cheap way to get new episode seeds.- Delete sessions when done; abandoned ones fall to the world’s idle governor.

