A weighted graph: step through how weights change the goal, see why the cheapest route isn't the fewest hops, watch Dijkstra grow a frontier, or build your own in free play.
Weighted · edges carry a costvertexcurrentsettledcheapest path
Path cost
—
Step 0 / 0
Press Play. Each edge now carries a cost, so the cheapest route is not always the one with the fewest hops.
Speed
Click two vertices to toggle an edge. Click an edge to cycle its weight (1→2→3→5→9→1). Drag a vertex to move it.