Skip to content

A bunch of path searching and maze algorithms visualized

Notifications You must be signed in to change notification settings

kvietcong/path-traverse-visual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

path-traverse-visual

This project is basically a bunch of path searching algorithms visualized. So far you can make paths (place/destroy walls), move the goal/start, generate mazes, and do the searches. The searching algorithms that I have implemented is A*, Dijkstra, Breadth First, Depth First, and Greedy First Searches. The maze algorithms so far is recursive/iterative backtracking and Hunt and Kill.

Setting Up

You must have a python environment with PyGame and the NumPy modules.

This install line should do the trick: pip install pygame numpy

After that you can just run the main.py file and get started

Controls

Placing walls - Left Mouse Click

Destroying walls - Right Mouse Click

Moving start - Ctrl+Left Mouse Click

Moving goal - Alt+Left Mouse Click

Changing Algorithms - Right/Left arrow Keys for different search algorithms. Up/Down arrow keys for different maze algorithms (You can look at the window name to see what algorithms you are using.)

Reset Grid - F5

Generate Maze - m

Fast Step (No sleep timer between steps) - s

Start Algorithm - Return or Enter

Problems

  • When there is no path, the program auto closes
  • Sometimes PyGame doesn't update so the program will "freeze." Just let it run and the algorithm will finish up and update it at the end

Future Goals

  • Add Play/Pausing (Probably not going to happen atm b/c requires complete rewrite)
  • More maze algorithms
  • Fix the bugs

Built With

Authors

  • Vel0ciTy - Main Author

Acknowledgments

  • StackOverflow 😀
  • Medium
  • Stanford CS
  • Julian Smolka - Huge help with maze generation. Our systems for a grid a pretty different but this resource/repository helped give me a lead to develop my maze algorithms
  • Jamis Buck
  • Wikipedia
  • A bunch of other sites

About

A bunch of path searching and maze algorithms visualized

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages