Train and sim-test your first policy on Lucen Biped
Train a policy for Lucen Biped on your own computer, then read how it did in simulation. About 15 minutes.
Prompt for your AI
Read https://mousemouse.ai/docs/first-policy.md first. Walk me through training and sim-testing my first policy on Lucen Biped. Run the terminal steps for me, and tell me what to click in the browser. Ask me before anything that costs money or moves a robot.Prompt for your AI
Read https://mousemouse.ai/docs/first-policy.md first. Walk me through training and sim-testing my first policy on Lucen Biped. Run the terminal steps for me, and tell me what to click in the browser. Ask me before anything that costs money or moves a robot.You will train a policy for Lucen Biped, the 12-joint biped build of the Lucen kit, on your own computer. Then you will read how it did in simulation. A first run learns to stand. It takes about 15 minutes, and it costs nothing.
Every command here is tested. Where a command names this hub, it shows this hub's address: https://api.mousemouse.ai.
Before you start
- An account on this hub. Sign up with the button at the top right, and
choose your handle, your name in every address. This page writes it as
you. - A Mac or Linux computer with a terminal. The installer uses
uvwhen you have it, else Python 3.12 or later. - About 15 minutes. Installing takes a minute, and a first run trains in about three.
What you'll learn
- How to start a training run from the form.
- How a runner on your computer trains it, for free.
- How to follow a run's curves and checkpoints.
- How to read a sim test: which tests pass, and why the others fail.
1 · Start a run
Open Train a policy. The page is the training form, set to your newest robot, or Lucen Biped; other robots are one link below it.
Would you rather an agent trained it?
The agent works in the MouseMouse app. Say what the robot should learn there. It plans the run, says how long it takes and what it costs, and asks before anything costs money.
Just signed up? The welcome screen's Start with a Lucen robot
The welcome screen after sign-up offers Start with a Lucen robot. It copies Lucen Biped, its real logs and a trained walking policy into your account. Then Run sim test scores that policy in simulation, free on Lucen cloud where this hub offers it. That tests a policy someone else trained. This tutorial trains your own, from Lucen Biped's page.
Keep Walk at the speed you command, the trainer that comes with the hub. You don't choose how long it trains. The task decides, and the summary says it in one sentence. Under Where it runs, choose My machine. Leave Test every checkpoint in simulation ticked. The hub skips a checkpoint whose reward did not improve, and tests every one once a checkpoint passes. To end the run there, open Test settings and tick Stop when every test passes. Then press Start training.

You'll see the run's page. It says Queued and Waiting for a runner, with four lines to paste.
If the form offers Lucen cloud CPU
Some hubs offer Lucen cloud CPU under Where it runs. Choose it to train without installing anything. It is free within a monthly allowance. The summary says how long it should take and the most it can cost. Then skip to step 5 once the run says Succeeded.
2 · Install the CLI
A runner is a program on your computer that trains your queued runs. It comes
with the lucen CLI. Open a terminal and run:
uv tool install "lucen-cli[rl]"
export PATH="$HOME/.local/bin:$PATH"
You'll see uv finish with:
Resolved 36 packages in 4ms
Installed 36 packages in 77ms
Installed 1 executable: lucen
The second line puts lucen on your PATH for this terminal. Add it to your
shell's profile to keep it.

What the install line does
uv tool install fetches the lucen CLI from PyPI into an environment of its
own. The rl extra adds MuJoCo and ONNX Runtime for training and sim tests.
The package is lucen-cli; the PyPI project named lucen is unrelated. uv
cannot change the PATH of the shell that ran it, which is why the second line
is there.
3 · Sign in with a key
The runner needs a key to act for you. Open API keys, name the key, choose the train scope and press Create key. Copy the key now: the page shows it once.

Then sign in, and paste the key when it asks. The address is this hub's API; the CLI has no built-in one:
lucen auth login --url https://api.mousemouse.ai
You'll see:
API key:
Signed in as you (scopes: read, write, train) at https://api.mousemouse.ai
Saved to /Users/you/.config/lucen/credentials (mode 0600)
Why a key, and what it can do
Only a signed-in person can create a key, so a key that leaks cannot create another. A train key can start runs and sim tests and spend money on Lucen cloud. It cannot approve a policy onto a robot: only a signed-in person can. The CLI keeps the key in a file only you can read. API keys and scopes lists what each scope allows.
4 · Start the runner
lucen worker run
The runner finds your queued run, trains it, and tests its checkpoints in simulation as they are saved. Leave it running.
You'll see something like this, from a 60-iteration run, shortened:
lucen worker `mac`: templates ppo_mujoco, smolvla_lora; looping
Claimed run_01M4SJBJCEJ1J8T2A68NBFRGJH (ppo_mujoco) as mac
| [lucen-ppo-mujoco] 1024 envs x 24 steps x 60 iterations on 12 thread(s); dt 0.002 s x 10 = 50 Hz
| [lucen-ppo-mujoco] harness conditions in training: action delay 2 control step(s) = 40 ms (harness); bridge slew on; pushes up to 0.4 m/s every 6-10 s; mirror symmetry off (off by hyperparams.mirror_symmetry)
| [lucen-ppo-mujoco] terrain curriculum: levels 0-5, the flat floor up to 8 degree slopes and 4 cm steps, 2 m tiles; every robot starts on the floor (level 0)
| [lucen-ppo-mujoco] initial exploration 0.25 rad per joint (log_std -0.693, init_action_noise_rad)
| iter 1/60 return -0.510 reward/step -0.01607 std 1.004 23,993 steps/s terrain 0.00
| iter 60/60 return -2.429 reward/step 0.00931 std 0.674 20,391 steps/s terrain 0.00
| [lucen-ppo-mujoco] done: 1,474,560 env steps in 66.0 s; episode return -0.5097038764607732 -> -2.428927462479867
| [lucen-ppo-mujoco] terrain: mean level 0.00 of 5; 0 promotion(s), 0 demotion(s)
run_01M4SJBJCEJ1J8T2A68NBFRGJH: published you/ppo-mujoco-8nbfrgjh
run_01M4SJBJCEJ1J8T2A68NBFRGJH: sim test of step_60: 1 of 5 tests pass in 7.726 s (rollout_01M4SJDN8Q8SP5MS22CWVWGNQD)
The run's page follows along. It says Running, draws the training curves, and adds each checkpoint to its strip as it is saved.

When the page says Succeeded, press Ctrl-C to stop the runner.
If the run does not start, or the runner stops
- The runner takes only the runs of the account whose key it holds. If it says nothing after "looping", check that you signed in as the account that started the run.
- If the runner stops mid-run, the hub queues the run again after five minutes without a heartbeat. Start the runner again and it picks the run back up.
- Training on your own machine is free. It uses your CPU, and a first run takes about three minutes on a laptop.
5 · Read the sim test
On the run's page, each tested checkpoint shows how many tests it passed. Press 1 of 5 tests pass (yours may differ) to open the sim test.

You'll see the result, then one row per test. A walking robot passes a test when every seed stays upright and tracks its command within 15%. After a first run, expect Stand still to pass and the moving tests to fail. A few hundred iterations is not enough to learn to walk.
It trains the way the hub tests. The policy learns under the same 40 ms command
delay, target rate limit and pushes that the sim tests apply. The log's
harness conditions in training line lists them. Every robot starts on flat
ground, and moves on to slopes and steps once it walks far enough. The
terrain curriculum line says how far they go.
The stricter Stand and push suite runs 20 seeds and judges posture too. A 60-iteration run stands with under 3° of tilt. One leg still carries more weight than the other: 4–7° of left/right asymmetry, against that suite's 2° bar. So a short run does not pass it yet. A 1,000-iteration run passes the suite's Stand still test on its best checkpoints, at about 2° of tilt and under 2° of asymmetry. It still fails the sideways pushes. The run page marks the best checkpoint for you.
Why the moving tests fail, and how to make them pass
Each test commands a speed, such as forward at 0.30 m/s, and measures what Lucen Biped does. A measured value near 0% means it barely moved. Train for longer to change it. 1,000 iterations take about 22 minutes on a laptop.
With this template's current settings, a 1,000-iteration run stands but does not walk. Its sideways tracking reads 12–22% of the command. It trains under the same command delay and pushes that the tests apply. An earlier version trained without them and tracked a sideways command at 1,000 iterations. The sim test page also lets you try other thresholds without running anything again.
Next steps
- Let an agent take it from here. In the MouseMouse app, say what Lucen Biped should learn next. It reads this run and proposes the next one.
- Fine-tune it. On the run's page, Fine-tune starts the next round from a checkpoint that passed, with one thing changed.
- Ask the Coach. The Training Coach reads a run and suggests the next experiment.
- Put it on a robot. Deploy a policy to your robot, and read how approvals keep your robot safe.
- Bring your own robot. Add your robot, then train for it the same way.
- Run more jobs here. Train on your own machine covers the other runners and what each job costs.