Courier in Megapolis: Dijkstra Route Planning Through City Traffic (2D)
A genuine Dijkstra shortest-path search steers a courier across a city grid whose street congestion fluctuates in real time, replanning the route as jams form and clear — live readouts track deliveries completed, distance traveled and route efficiency.
This 2D companion replaces the 3D version's scripted reward-curve telemetry with an actual routing algorithm: the city is a real grid graph of intersections and streets whose congestion fluctuates continuously from overlaid sine waves, and a genuine Dijkstra shortest-path search — weighted by live travel time rather than raw distance — plans the courier's route to each delivery. An adaptive-routing toggle lets you compare a courier that replans at every intersection as jams shift against one that commits to its original route regardless, while live readouts track deliveries completed, distance traveled, average speed and route efficiency (actual blocks traveled versus straight-line distance to the target).
2D courier routing simulator running Dijkstra's shortest-path algorithm over a city grid graph with live, fluctuating street congestion, with an adaptive-vs-fixed routing toggle.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install
It runs Dijkstra's shortest-path algorithm over the city grid graph, weighted by current travel time on each street (which rises with congestion), not by raw distance — so the route reflects which streets are jammed right now.
With adaptive routing on, the route is recomputed every time the courier reaches an intersection, reacting to newly-formed jams. With it off, the route chosen at pickup is kept for the whole delivery even if congestion shifts elsewhere afterward.
The 3D version renders a shared reinforcement-learning telemetry template (reward and loss curves that decay on a fixed schedule, unconnected to any real routing decision). This 2D companion runs an actual Dijkstra search over a live-congestion city graph instead.