Training
How bots learn to play in RocketSim, and what they've learned.
2 min read
Bots learn by reinforcement learning: they play thousands of RocketSim games at once, get rewarded for good outcomes, and slowly improve. New to the ideas? Start with the ML primer.
The training code has three layers:
crates/rlenv: the environment, in Rust. It runs many RocketSim arenas side by side. Every episode is fully determined by its task file, seed and actions, and any episode can be exported as a scenario and replayed exactly.crates/rlenv-py: Python bindings for it (physlab_rl.BatchEnv).python/physlab_rl: the PyTorch learner (PPO), with self-play, evaluation, ratings and run records.
What a bot trains on is set by a task file in tasks/: starting states, rewards, what counts as
success or failure, episode length, and held-out evaluation seeds.
Single-agent curriculum
done Touch a ball on the ground, then in the air. The final stage succeeds on 246 of 256 held-out aerial touches (0.961) after 500 M steps in 27 minutes.
1v1 self-play
1v1 done; 2v2 untrained 1.024 B steps in 90 minutes. The final bot beats the scripted ball chaser 241–15 and its own 105 M-step checkpoint 0.949.
Mechanics curricula
not started Flip resets, air dribbles, wall dashes and defence are planned (Capabilities).
These numbers come from one machine (i7-14700K, RTX 4070 shared with a running Rocket League) and mostly one seed per configuration.
Quick start#
uv sync # free-threaded Python 3.15t, torch, and builds the Rust extension
just train tasks/ground-touch-v1.json # first stage of the single-agent curriculum (~1 min)
just train-match # 1v1 self-play, 600 M steps (~25–30 min)
just eval-match runs/selfplay/<id>/final.ptWatch runs live in the Command Center (just web-dev). Training
needs the collision meshes. Every flag:
Training environment → Python learner.
Pages in this group#
Results are on Evaluation and charts on Training progress.