# Drone racing with reinforcement learning: a recipe that works

Original title: A recipe for drone racing with reinforcement learning

> Hacker News story 49319745 · language: en · submitted 2026-08-16
> Web version: https://zeli.app/story/49319745
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 27 · by [daww](<https://news.ycombinator.com/user?id=daww>) · 💬 4
[original](<https://mrandri19.github.io/2026/07/19/drone-racing-with-reinforcement-learning.html>) · [HN discussion](<https://news.ycombinator.com/item?id=49319745>)

## Summary

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.

## Key quote

> 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.

---

## Cite

- Page: https://zeli.app/story/49319745
- Date: 2026-08-16
- Source: mrandri19.github.io (https://mrandri19.github.io/2026/07/19/drone-racing-with-reinforcement-learning.html)
- Hacker News: https://news.ycombinator.com/item?id=49319745

## Other languages

- zh: https://zeli.app/zh/story/49319745 · markdown: https://zeli.app/zh/story/49319745.md
- es: https://zeli.app/es/story/49319745 · markdown: https://zeli.app/es/story/49319745.md
