RouteWise

A* Algorithm — Live Playback

Watch A* find the optimal delivery route from Ikeja to Ajah — step by step.

Speed:
Step 0 of 27

Lagos Delivery Network Graph

7km6km5km8km8km4km4km8km5km7km6km5km9km8km8km7km3km8km10km10km7kmIkejaAgegeOjotaMarylandGbagadaOshodiMushinYabaSurulereApapaIkoyiVictoriaLekkiAjahStartGoalPathOpenClosed

How A* Works

① f(n) = g(n) + h(n)

Every node gets a score. g(n) = real distance so far. h(n) = estimated distance to goal. Always picks lowest f(n) next.

② Open & Closed Sets

Green = Open Set (to explore). Blue = Closed Set (already evaluated). Prevents revisiting and guarantees optimality.

③ Why It Beats Greedy

Greedy only looks one step ahead — O(n²). A* uses heuristic to find shorter routes in O(n log n). That's the RouteWise advantage.