The Lab← portfolio

  Live · an instrument that marks your work

Describe a problem.
Watch it think.
Then call the next move.

Type anything with a shape to it — a route, an order of operations, a network of people. A model turns your sentence into a graph; then a real algorithm walks it, one settled step at a time, with the frontier glowing ahead of itself.

The steps are hand-written rather than generated, which means the engine cannot be wrong — and an engine that cannot be wrong can stop showing you the next step and ask you for it instead. Get it wrong and it names the misconception, by name, in the language of that particular algorithm.

0/4000 · ⌘/ctrl + enter to run

Or try
Read asworked example

Which sequence of roads gets the van from the Depot to the Harbour Café in the fewest minutes?

Dijkstra's algorithmcheapest total cost

Every road takes a different amount of time, so the answer is about total cost, not the number of turns.

  • Cheapest route
  • undirected
  • weighted · min
  • has target
Run it with
4972683DDepotcost 0MMill RoadBBridgeKMarketQQuaysideHHarbour Café
unseenin frontiervisitingsettledtarget
State ledgerstep 0 / 7
visiting
priority queue
[ D ]
settled
{ empty }

Depot costs 0 to reach. Every other node starts at infinity until we find a way in.

6 nodes · 7 edges

The algorithmline 1 / 9
  1. cost[start] = 0, every other cost = infinity
  2. open = { start }
  3. while open is not empty:
  4. u = the cheapest node in open
  5. settle u — its cost can no longer improve
  6. for each neighbour v of u:
  7. if cost[u] + weight(u, v) < cost[v]:
  8. cost[v] = cost[u] + weight(u, v)
  9. every reachable node sits at its true lowest cost

O(E log V) · pseudocode mirroring the engine — the highlighted line produced this step

space play · ← → step · r reset · drill me hides the next step and marks your call

How this runs: a model reads your sentence and returns structure only — the entities and how they connect. Every step you just watched was generated by the real algorithm executing over that structure, so the traversal is correct by construction even when the model's reading of the problem is arguable.

Which is what makes drill mode possible: an engine that cannot be wrong is an answer key. Hit drill me and it stops showing you the next step and starts asking for it — then names the misconception behind a wrong call rather than marking it with a cross. Share the link and everyone gets the same graph, the same algorithm, the same questions.