Skip to content

Examples

Each example is a complete training app you can copy and run. An app is a folder with one train.py job file, plus a task.py when the job imports its task from one. Every page shows the files to save, the command to run, and what a finished run gives you.

Example Files What it trains
Hello hello/task.py, hello/train.py Cartpole for two iterations, to check your setup end to end.
Cartpole cartpole/task.py, cartpole/train.py, cartpole/play.py A cart that learns to keep a pole upright.
Cartpole Anomaly cartpole_anomaly/train.py Cartpole with a deliberate bad reward, caught in a debug recording.
Humanoid humanoid/train.py A 21-joint biped learning to stay upright and move forward.
JetBot jetbot/train.py A two-wheel robot learning to drive in a commanded direction.
Franka manipulation franka_reach/train.py, franka_lift/train.py An arm that reaches for a target, then one that picks up a block.

Start with Hello. It runs in minutes and proves that you can sign in, submit a job, watch its logs, and get a policy back.

Sign in once with simulo login, then submit the job file by its path:

Terminal window
simulo run cartpole/train.py

simulo run packages the folder that holds the job file, submits the job, and follows its logs until it finishes. Add --detach to return as soon as the job is submitted, then run simulo logs --follow to watch your most recent job you submitted (train, play, preview or eval).

The job function’s parameters become flags. In every example, --num-envs sets how many environments train in parallel and --max-iterations sets how many training iterations run. To list a job’s flags, run the file with --help:

Terminal window
simulo run cartpole/train.py --help

Every example is a training job, so a finished run creates a policy named after the job, with a best and a latest checkpoint. You don’t add any code for this. When the run succeeds, simulo run prints the checkpoints and the next commands to try:

Checkpoints: best (iteration <n>) latest (iteration <n>)
Next: simulo policy get policy_brisk-heron-4f8k2m:best
simulo run cartpole/eval.py --policy policy_brisk-heron-4f8k2m:best
simulo run cartpole/train.py --max-iterations <2 x latest iteration> --from policy_brisk-heron-4f8k2m:best
simulo export policy_brisk-heron-4f8k2m:best

The first command downloads the checkpoint file. The second starts a new training job from it, with --max-iterations as the new total, including what the checkpoint already has. The third turns it into an ONNX bundle you can run outside Simulo. Cartpole also ships a play.py: run simulo run cartpole/play.py --policy policy_brisk-heron-4f8k2m:best to watch the checkpoint or record it, as the Cartpole page shows.

To start your own app instead of copying one, run simulo create NAME. See Templates for what it writes.