fly-in disc

fly-in

Python project · graphs, pygame

Drone fleet routing: Dijkstra pathfinding, turn-based scheduling and a pygame replay.

Open it in the console View the code on GitHub Play it in the browser Resume (PDF) LinkedIn

The problem

Move a fleet of drones from a start hub to an end hub in as few turns as possible, through zones with capacity limits, slow restricted zones and blocked ones.

What I built

The hard part

My first engine was too generous. A drone could land in a restricted zone and leave it in the same turn, and a slot there was only taken on arrival, so two drones could claim it at once: that is how impossible dream came out at 39 turns. With one action per drone per turn and the slot reserved at departure, the honest count is 44 (reference 45), and circular loop went from 9 to 15, exactly its target. The lanes won turns back: every split of the fleet is dry-run and kept only if it finishes sooner, which took simple fork from 6 to 4.

Built with

More projects