Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Reinforcement Learning Workflow

1. Train your 1st RL Agent

Reference: srb agent train — Train Agent

Train online with srb agent train; offline algorithms use separate workflows.

Watch SBX PPO on landing; omit --headless:

srb agent train --algo sbx_ppo --env landing env.num_envs=512 --hide_ui

Check terminal progress; checkpoints save regularly. Usually stop with Ctrl+C.

2. Evaluate your Agent

Reference: srb agent eval — Evaluate Agent

srb agent eval --algo sbx_ppo --env landing env.num_envs=16
srb agent eval --algo sbx_ppo --env landing env.num_envs=16 --model logs/landing/sbx_ppo/${TIMESTAMP}/ckpt/${CHECKPOINT}

Note: SB3/SBX .zip checkpoints live in ckpt/.

3. Try a Different Algorithm

TypeFramework algorithms
Model-basedDreamerV3: dreamer; TD-MPC2: tdmpc2
On-policyStable-Baselines3 (SB3): sb3_a2c, sb3_ppo, sb3_ppo_lstm, sb3_trpo; SBX: sbx_ppo; RSL-RL: rsl_rl_ppo; skrl: skrl_a2c, skrl_ppo, skrl_ppo_rnn, skrl_rpo, skrl_trpo
Off-policySB3: sb3_ddpg, sb3_td3, sb3_sac, sb3_crossq, sb3_tqc; SBX: sbx_ddpg, sbx_td3, sbx_sac, sbx_crossq, sbx_tqc; skrl: skrl_ddpg, skrl_td3, skrl_sac
EvolutionarySB3: sb3_ars

skrl: Hyperparameter profiles are untuned starting points.

srb agent train --headless --algo <ALGO> --env landing env.num_envs=1024

Hint: --headless and more parallel environments can speed training.

4. Monitor Training Progress

Compare runs with TensorBoard; local artifacts and TensorBoard are on by default. W&B is opt-in:

tensorboard --logdir ./logs --bind_all
  • DreamerV3: srb agent train ... 'agent.logger.outputs=[tensorboard,wandb]'
  • SB3 & SBX: srb agent train ... +agent.wandb=true
  • skrl: srb agent train ... agent.agent.experiment.wandb=true

Note: W&B logging requires an account and API key.

Each run records its provenance and metrics; see Run records.

5. Configure Hyperparameters

Reference: Agent Configuration

srb agent train --algo dreamer      agent.run.train_ratio=128  ...
srb agent train --algo sb3_ppo      agent.gamma=0.99           ...
srb agent train --algo sbx_sac      agent.learning_rate=0.0002 ...
srb agent train --algo skrl_ppo     agent.models.separate=True ...

Next: Hyperparameter Tuning