Shortest Path
Add the road costs to find the cheapest route to the goal. This original road network is a simplified educational model.
Cost 0
How to play
Tap connected vertices to travel from S to G. Tap your current vertex to undo; Tab and Enter also work. Road numbers are costs. Breadth-first search minimizes the number of roads; Dijkstra minimizes their total cost. Replays start at S. Dashed rings mark explored vertices; checks mark the final route.