Afterglowscreensavers

Dijkstra's Shortest Path Screensaver

The Dijkstra's Shortest Path screensaver runs a real live Dijkstra's algorithm on a random weighted graph, showing the expanding wavefront of confirmed shortest distances. It is free, runs in your browser, and ESC exits.

Live preview

Press ESC to leave fullscreen. Settings are saved in your browser only.

How the Dijkstra's Shortest Path screensaver works

The saver generates a real random graph of nodes and weighted edges, then runs Dijkstra's algorithm from a single source node.

Each step pulls the real closest unvisited node from the frontier, locks in its shortest distance, and relaxes its neighbors' distances.

The locked-in shortest-path tree grows outward frame by frame, exactly as the real algorithm computes it, node by node.

Once every reachable node is finalized, the graph fades and a fresh random graph and source node begin.

A worked example

A node just three hops away but behind a costly edge gets its shortest distance locked in later than a farther node reached by cheaper edges, exactly matching real weighted-shortest-path behavior.

Settings & tips

Frequently asked questions

Is this the real Dijkstra's algorithm?
Yes — a real, correct implementation, run live on a randomized weighted graph.
What does the wavefront represent?
The real, growing set of nodes whose shortest distance from the source has been finalized.
Is a key needed?
No — it is a pure local computation.
Is it free?
Yes — free, no download, in your browser.

← All Science & Research screensavers