RouteWiseAlgorithm Playback

A* Algorithm — Live Playback

Watch the A* pathfinding algorithm calculate the optimal delivery route from Ikeja to Ajah — step by step, node by node.

Speed:
Step 0 of 27

Lagos Delivery Network Graph

7km6km5km8km8km4km4km8km5km7km6km5km9km8km8km7km3km8km10km10km7kmIkejaAgegeOjotaMarylandGbagadaOshodiMushinYabaSurulereApapaIkoyiVictoriaLekkiAjahStart (Ikeja)Goal (Ajah)Current / Final PathOpen (to explore)Closed (visited)
Algorithm Status

Press ▶ Start Playback to watch the A* algorithm find the optimal route across Lagos in real time.

How A* Works — What You're Watching

① f(n) = g(n) + h(n)
Every node gets a score. g(n) is the real distance traveled so far. h(n) is the estimated distance to the goal. The algorithm always picks the node with the lowest f(n) score next.
② Open & Closed Sets
Green nodes are in the Open Set — candidates to explore next. Blue nodes are in the Closed Set — already evaluated. This prevents revisiting and guarantees optimality.
③ Why It Beats Greedy
Greedy routing only looks one step ahead — O(n²). A* looks at the full picture using the heuristic, finding shorter routes in O(n log n) time. That's the RouteWise advantage.