> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alakazam.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Local gym

> Train on your own hardware against the public world-model weights, then certify via the exam.

The doom world model Train uses is public:
[`alakazamworld/doom-dungeon-hg`](https://huggingface.co/alakazamworld/doom-dungeon-hg)
on Hugging Face. The published `denoiser.onnx` is byte-identical
(sha256-verified) to the checkpoint the Train exam history is built on, so a
policy trained locally against it is training against the *same dream*.

## Why train locally

* Speed: your GPU via WebGPU or ONNX Runtime beats the serving VM's CPU by a
  wide margin, and your RL loop runs at native speed with zero request latency.
* Cost: dream rollouts on your hardware are free. You only use Train for what
  only Train can do: the frozen exam.
* Freedom: bring any training algorithm. The API's CMA-ES is one recipe, not
  a requirement.

## The split

```
your hardware                          train
─────────────                          ─────
HF weights ──> local dream env ──> candidate policy ──> POST /jobs (exam) ──> verdict
```

The exam stays server-side by design. A self-administered exam certifies
nothing. See [The exam](/train/exam-contract) for the contract and the
anti-exploit machinery.

## What to match locally

For local training that transfers to the exam:

1. Checkpoint parity: use the HF weights unmodified (`sha256` published on
   the model page).
2. Reset blindness: never sense or score the first \~2 steps after a world
   reset (the world model settles; `LocalDreamEnv` flags them
   `sensor_valid=0`). The physics exam has no such window (it senses from
   tick 0), so train a policy that works without depending on blindness.
3. Policy format: certify either a 9-float controller (`genome9`) or
   [your own policy](/train/own-policy) as a sandboxed Python module
   implementing the same `reset`/`act` contract the local gym uses.

## Certify a locally-trained champion

Exam-only certification runs through the same jobs API: `train.gens = 0` with
your genome as `train.parent` skips training and runs the frozen exam on your
champion directly.

```json theme={null}
{"job_id": "my-cert-001",
 "train": {"pop": 0, "gens": 0, "T": 0, "seed": 0,
           "parent": {"genome6": [/* your 6 floats */]}},
 "exam": {"episodes": 20}}
```

<Note>
  For step-level training against hosted worlds (robot/epuck, SNN observation
  contract) use the live [simulation gym](/train/snn-guide) at
  `/v1/sim/sessions`. A step-level gym against the *doom dream* specifically
  exists as a design spec but is not live; for the doom world, local training
  on the public weights is the supported fast path today.
</Note>
