BFS Animation

Create an animation of the BFS algorithm.

An animation of BFS shows the notes that are undiscovered, discovered, and processed in different colors. Processing a new node is one time step.

For simplicity, our animation will work on a rectangular grid, so it will only work for rectangular graphs (“mazes”). Suggestion: remember the width and height of the rectangular grid, then number vertices 0 up to width*height.

Searching a maze

Producing a maze

Where should you get the maze from?

Suggestions:

  1. Initially, make a small maze by hand.

  2. After the basic version works, modify your maze maker so that it starts with a full grid and remove walls as you drag your move around, so that you are drawing passageways instead of walls.

Last modified September 25, 2025: Graph assignments. (f7c785c)