Drone racing with reinforcement learning: a recipe that works
A recipe for drone racing with reinforcement learning
This final post in a quadcopter simulation series shares a practical recipe for training a reinforcement learning policy to race drones. The author breaks the task into three stages: solving inverted pendulum with PPO, building a custom MuJoCo environment with a CTBR action space and P controller, and extending it to an eight-gate racing track. Key tricks include progress-based rewards, random gate resets, and validating hyperparameters on a toy task. The trained policy successfully flies the loop track, with training curves showing crash rates collapsing and gates passed increasing.
Randomize the start gate on every reset, because it turns one long racing task into many short one-gate tasks and forces the policy to actually read the target gate from its observation.