Drone Delivery Route
A delivery drone finds a short tour through ten random stops on a 2D map. The GA evolves the visit order.
Go to the live page Open the Drone Delivery demoThe Drone Delivery demo drops a depot and ten delivery stops onto a 2D map and asks the genetic algorithm to find a short tour that visits every stop and returns to the depot. It is a small Travelling Salesman Problem rendered as a fleet of fifteen drones flying their candidate tours at the same time.
The problem¶
A tour is just an order. With ten stops there are about three and a half million possible orders, which is small enough that a smart person with paper could solve it, and large enough that picking one at random is almost never good. The cost of any tour is its total flight distance, depot to first stop to second stop to last stop back to the depot.
How a run looks¶
Click Start. Fifteen drones launch at the same time from the depot, each following its own candidate tour. The leader, the one with the shortest tour found in this generation, is highlighted; the other fourteen drag fainter tracks behind them. A generation ends when every drone has returned to the depot.
The platform then evolves the population. Four elites carry over unchanged. The other eleven children come from tournament-of-three winners crossed at a single point, with the duplicate-fixing logic baked into the GA so every child is still a valid permutation. Per-gene swap mutation runs at ten percent by default. The next round arrives a moment later and the drones launch again.
Within roughly ten generations on a typical map, the leader's tour stops crossing itself and looks like a real delivery route. The history strip under the canvas keeps the best tour from every generation so you can scroll back and watch the shape converge.
What the achievement rewards¶
The first time a best-of-generation tour is at least twenty-five percent shorter than the average random tour on the current map, the Drone routes mastered achievement unlocks for signed-in users. The bar is computed per-seed at session start, so harder layouts make the badge a little harder to earn.
For more on how the demos catalog works, see What the demos do.