/Breadth-First-Path-Finding-Algorithm

Implementing FIFO based Breadth First path finding algorithm

Primary LanguagePythonMIT LicenseMIT

Breadth First Path Finding Algorithm

GitHub license


Breadth First Algorithm                              Breadth First Algorithm


Table of Contents

About The Project

  • This Project implements Breadth First path finding algorithm. The algorithm uses FIFO model implemented using queue data structure to find the shortest path. For making the project more fun, and visually appealing I have used pygame python module. You can generate your own maze by just clicking on the box in order to make it behave as an obstacle.
  • Once done with your maze hit Spacebar to run the algorithm.
  • Also you can generate random maze by hitting the delete key.

Built With

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple steps.

Installation

  1. Clone the repo ✔     
git clone https://github.com/AKASHCS50/Breadth-First-Path-Finding-Algorithm
  1. Install pygame ✔
pip install pygame
  1. Install Tkinter ✔
    Tkinter is being used to show pop up message box when no path is found.
  2. Setting up dimentions of maze ✔
    Open main.py code and change screen_width on line number 183 and screen_size on 184 to required value
def main():

    pygame.init()
    screen_size = 500    👈   
    screen_width = 10    👈
    run = True
    lock = 0

You are all ready to go 👍

Usage

Spacebar - Run Algorithm

Delete - Generate random maze (while window is open).

Roadmap

The algorithm being used is quite slow for bigger sized mazes. Hence extending the project on same model (code) to implement more advanced algorithms like A* and Dijkstra.
Contributions are welcomed.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. 🙌🙌

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some Feature')
  4. Push to the Branch (git push origin feature/Feature)
  5. Open a Pull Request

Contact

Akash Sharma: Gmail - Linkedin

Project Link: https://github.com/AKASHCS50/Breadth-First-Path-Finding-Algorithm

License

MIT © Akash Sharma

✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨ ✨