Skip to content

Visualizes the Depth First Search algorithm for maze generation.

License

Notifications You must be signed in to change notification settings

OP-Patel/DFS_Maze_Generation_Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Visualizes the Depth First Search algorithm for maze generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages