Templates
simulo create NAME writes a new training app you can run straight away. It
needs no network and no sign-in, and it writes six files into a new folder
called NAME:
| File | What it holds |
|---|---|
task.py |
The app and a Cartpole task, the part you replace with your own robot and reward. |
preview.py |
One preview job that checks the robot inside the task and makes no policy. |
train.py |
One training job that trains the task with PPO. |
eval.py |
One evaluation job with the rule that decides whether each episode succeeded. |
play.py |
One play job that runs a trained checkpoint back to watch or record it. |
.simuloignore |
Files to leave out when simulo run packages the folder. |
simulo create mybotCreated app in mybot/ (eval.py + play.py + preview.py + task.py + train.py + .simuloignore).Next steps: cd mybot simulo run preview.py simulo run train.py simulo run eval.py --policy policy_<job>:best # evaluate the trained policy simulo run play.py --policy policy_<job>:best # after trainingRun the app in the order the command prints. The preview checks the Cartpole
task before the training job trains it briefly and creates a policy with
best and latest checkpoints. Then eval.py measures that checkpoint and
play.py runs it back once you name it with --policy. See
Preview for the checks, findings, exit codes, and
recording.
NAME becomes both the folder name and the app name in simulo.App("NAME").
It must start with a letter or an underscore, may contain only letters, digits,
underscores, and hyphens, and can be at most 64 characters long.
Options
Section titled “Options”--dir PATHcreates the folder insidePATHinstead of the current directory.--forcewrites into an existing folder that already has files in it, replacing any files with the same names. Without it,simulo createrefuses a folder that isn’t empty. An empty folder needs no--force.
The starter has one template. Read the training template
walkthrough for what each file does and what to change first, or
Play a policy and record it for what
play.py checks before it runs. For bigger starting points, copy one of the
Examples.