Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 993 Bytes

README.md

File metadata and controls

22 lines (13 loc) · 993 Bytes

DFS_Maze_Generation_Visualizer

Visualizes the Depth First Search algorithm for maze generation. Visualizer was fully coded in python using pygame. The cover page and interaction with buttons/sliders was coded using pygame GUI.

Interactions

Press Visualize button to start visualization.

Press Quit button to quit the application.

Utilize the slider to adjust speed of visualization.

Game Demo

dfs.game.demo.mp4

Basic Algorithm Logic

The algorithm starts at a given cell and marks it as visited. It selects a random neighboring cell that hasn't been visited yet and makes that one the current cell, marks it as visited and removes the wall between the two cells. The current cell is then the next cell, and so on. The current cell is added to the stack, which is then popped to return when no neighbouring cells are unvisited, this allows the algorithm to visit all the cells.