Skip to content

Edit graph

One search from three angles: the grid, the note the algorithm keeps, and the diff that comes out. Move one and the others follow.

Give it two texts

Old version on the left, new version on the right. Nothing to hand? Take one from the presets.

Before anything is compared the text becomes a list of numbers — one per line, word or character. That choice is what counts as being the same, so it changes the grid, the D, and the diff that comes out. A diff is not one thing: it is the answer to the question you asked.

Watch it search

Press play, or move one step at a time. The search is recorded, so stepping back costs nothing.

The search grid

Each diagonal thread — a small knot when the grid is dense — marks a line that is identical on both sides. Those are the free steps the algorithm will aim for.

A — before →

Nothing has been searched yet. The diagonals already drawn are the lines that are identical on both sides — the free steps, and the search will try to string together as many as it can. Press play below, or step one move at a time, and watch the yellow edge expand: that is every point reachable with d edits.

Legend

  • Match positionthe same line on both sides
  • Explored regiontried and left behind
  • Frontierhow far the search has reached
  • Chosen paththe answer

Read the result

The winning route, written back out as an ordinary diff. Click a line to see the move that produced it.

No differences.