Skip to content
All projects

Algorithms2024

PathFinder

An interactive visualizer for Dijkstra, A*, BFS and DFS that shows step by step how search algorithms explore a graph.

Overview

PathFinder turns graph search into something you can watch. Draw walls on a grid, pick a start and an end, choose an algorithm and see every node it visits, in order, until it finds the shortest path.

Why I built it

As a teaching assistant I noticed that students could recite how Dijkstra's algorithm works but struggled to picture it. Watching the frontier grow makes the difference between A* and breadth-first search obvious in seconds.

Features

  • Dijkstra, A*, breadth-first search, depth-first search and greedy best-first search.
  • Weighted cells, diagonal moves and three heuristics for A*.
  • Maze generation with recursive backtracking and recursive division.
  • Playback controls to pause, step forward and change the speed.

Results

The visualizer has been used by more than 2,000 students, and two lecturers now open it in class when teaching shortest paths.