Population Based Training
What PBT Does
-
Trains N policies in parallel (a “population”) on the same task.
-
Every
interval_steps:- Save each policy’s checkpoint and objective.
- Score the population and identify leaders and underperformers.
- For underperformers, replace weights from a random leader and mutate selected hyperparameters.
- Restart that process with the new weights/params automatically.
Leader / Underperformer Selection
Let o_i be each initialized policy’s objective, with mean μ and std σ.
Upper and lower performance cuts are:
- Leaders:
o_i > upper_cut - Underperformers:
o_i < lower_cut
The “Natural-Selection” rules:
- Only underperformers are acted on (mutated or replaced).
- If leaders exist, replace an underperformer with a random leader; otherwise, self-mutate.
Mutation (Hyperparameters)
- Each param has a mutation function (e.g.,
mutate_float,mutate_discount, etc.). - A param is mutated with probability
mutation_rate. - When mutated, its value is perturbed within
change_range = (min, max). - Only whitelisted keys (from the PBT config) are considered.
Example Config
objective: episode.Curriculum/difficulty_level is the dotted expression that uses
infos["episode"]["Curriculum/difficulty_level"] as the scalar to rank policies (higher is better).
With num_policies: 8, launch eight processes sharing the same workspace and unique policy_idx (0-7).
Launching PBT
You must start one process per policy and point them to the same workspace. Set a unique
policy_idx for each process and the common num_policies.
Minimal flags you need:
agent.pbt.enabled=Trueagent.pbt.directory=<path/to/shared_folder>agent.pbt.policy_idx=<0..num_policies-1>
All processes must use the same agent.pbt.workspace so they can see each other’s checkpoints.
PBT is currently supported only with the rl_games library. Other RL libraries are not supported yet.
Tips
- Keep checkpoints reasonable: reduce
interval_stepsonly if you really need tighter PBT cadence. - Use larger
threshold_stdandthreshold_absfor greater population diversity. - It is recommended to run 6+ workers to see benefit of pbt.
Training Example
We provide a reference PPO config here for task: Isaac-Dexsuite-Kuka-Allegro-Lift-v0. For the best logging experience, we recommend using wandb for the logging in the script.
Launch N workers, where n indicates each worker index:
References
This PBT implementation reimplements and is inspired by Dexpbt: Scaling up dexterous manipulation for hand-arm systems with population based training (Petrenko et al., 2023).