Trace-driven pathfinding studio

See how algorithms
find their way.

Run real graph searches step by step. Inspect every decision. Compare what each algorithm explores—and what it misses.

07real algorithms
12deterministic scenarios
06language implementations
timeline control
Scroll to trace the idea
01 / Representation

A map is a graph
wearing street names.

Intersections become nodes. Roads become directed edges. Distance, time, tolls, and safety become costs the algorithm can reason about.

  • node intersection
  • edge road segment
  • weight cost to traverse

Intersections become nodes; roads become connections.

02 / Cost models

“Best” is a
design decision.

The shortest route may not be the fastest. Change the objective and the same graph tells a different story.

SGlocal · 30 km/harterial · 70 km/h
Optimizing for time9 min

A longer arterial avoids slow blocks.

03 / Search strategy

Same destination.
Different instincts.

Dijkstra knows cost. A* adds direction. Greedy follows its intuition. Watch their frontiers diverge on the exact same graph.

Open synchronized Compare Mode
Same graph · same endpointsRace frame 0 / 6

Dijkstra

g
Expanded
0
Optimal
Guaranteed

A*

g + h
Expanded
0
Optimal
Guaranteed*

Greedy best-first

h
Expanded
0
Optimal
Not guaranteed
04 / Source synchronization

One invariant.
Six languages.

Each semantic trace event maps to the meaningful source lines—without pretending every language works the same way.

dijkstra.tsedge relaxation
12const frontier = new MinHeap([start]);13while (!frontier.isEmpty()) {14  const current = frontier.pop()!;15  for (const edge of graph.outgoing(current.id)) {16    const candidate = distances[current.id] + edge.weight;17    if (candidate < distances[edge.toId]) relax(edge, candidate);
relaxEdgeThe syntax changes; the invariant does not: only keep a route when its candidate cost improves the best known distance.
05 / Scenario library

Change the world.
Change the search.

Every scenario is deterministic, purpose-built, and replayable. Closures, one-way streets, negative edges, and unreachable goals expose different guarantees.

SCN-01seed 42

Uniform city grid

Equal weights · many ties

06 / Built for inspection

The animation is a replay—not the algorithm.

Algorithms emit deterministic semantic events. The interface replays them forward, backward, or at any point in time.

01

Deterministic traces

Same graph and seed, same event stream—every time.

02

Correctness fixtures

Known paths, costs, negative cycles, and edge cases are tested.

03

Safe custom data

Strict schemas, finite limits, and plain-text labels. No executable input.

04

Accessible by design

Keyboard playback, live descriptions, reduced motion, and tabular graph data.

Your turn

Pick a graph.
Trace a route.

Pause at any decision, inspect the frontier, then rewind and try another algorithm on the same world.

Launch RouteLab