/Maze_Pathfinding

Group project for AI course

Primary LanguagePython

Maze Pathfinding algorithms

Artificial Intelligence team project

Implementing path finding algotirthms visualization on a grid using "pygame" library

Requirments

pip install pygame
pip install termcolor

Algorithms used

  1. BFS
  2. DFS
  3. A*
  4. UCS
  5. GBFS

Running the code

main.py

  1. Left mouse click on the grid to set start and end
  2. Every click after setting start and end will create a wall
  3. Right click to clear the node spot
  4. To choose the algorithm simply press it's respective intial letter on the keyboard

i.e

  • B → BFS
  • D → DFS
  • A → A*
  • U → UCS
  • G → GBFS
  • R → Reset the grid while keeping start, end and walls
  • C → Clear the grid
  • 1 → Load preset 1
  • 2 → Load preset 2
  • 3 → Load preset 3
  • 4 → Save preset 1
  • 5 → Save preset 2
  • 6 → Save preset 3

5. The time taken for each algorithm will be displayed in the terminal after it finishes