Below is a visualization of two route finding algorithms: A* and Dijkstra's. Dijkstra's Algorithm naively searches every possible path emanating outward from the start until it reaches the end. A* is similar, except that it uses a heuristic to intelligently determine which way to head. Click generate and drag the step slider below to watch this behavior.
You can also create and destroy walls or move the start/end by clicking around the grid. You'll notice that A* usually reaches the end in far fewer steps than Dijkstra's Algorithm. Can you construct a degenerate grid for which Dijkstra's does better? How would you improve the algorithm to overcome this limitation?