Showcases 4 pathfinding algorithms in a visual manner,
- BFS
- DFS
- Best First
- A Star
- Iterative Deepening DFS/BFS
this program uses the following libraries
- pygame 2.5.0
pip install -r requirements.txt
- and then either
python app.py
There are four different programs
- app.py - runs pathfinding on a hex grid
- square_app.py - runs pathfinding on a square grid
- app_double.py - compares Best First and A Star side by side on a hex grid
- square_app_double.py - compares Best First and A Star side by side on a square grid
All programs have the same set of key and mouse controls:
- s - Start/Stop simulation
- a - generate fewer walls
- d - generate more walls
- e - cycles to next algorithm (BFS, DFS, Best First, A Star)
- r - move start and goal position to random position
- v - regenerate map, starting location and goal location
- g - restart run with same map and positions
- b - randomise next starting and goal positions (toggle)
- f - regenerate next map (toggle)
- t - switch algorithm each run (toggle)
- c - show graph overlap (toggle)
- x - activate step by step mode (toggle) (press s to move to next step)
All clicks must be done on a grid cell
- Left Click - switch between wall (impassable) or ground (passable)
- Middle Click - move starting position
- Right Click - move goal position
- Have the agent use the nodes that hex grid and square grid uses instead of it's own node class
- Package all simulation files into one file, allowing one to switch between them
- Write docstrings and comments
- Include option to switch heuristic from straight line distance to manhattan distance
- Rekey keyboard controls to make more sense
- status of toggles in GUI
- Create clickable buttons for all keyboard options