Maze_Solver
This project is a hands-on exploration of fundamental pathfinding algorithms: Breadth-First Search (BFS), Depth-First Search (DFS), and A Search*, brought to life through Pygame visualizations. The implementation is designed to demonstrate how these algorithms traverse a maze to find the optimal path from a starting point to a goal.
This repository serves as a compilation of case studies on pathfinding, illustrating how these algorithms operate in real-world scenarios that are crucial in fields like robotics and AI navigation.
- Visual Maze Solver: The algorithms are visualized using Pygame, showing the traversal process in real time.
- Multiple Algorithms: Users can explore BFS, DFS, and A* Search, understanding the strengths and weaknesses of each.
- Interactive Experience: Users can easily run the project and experiment with different maze configurations.
- Getting Started
- Installation
- Usage Instructions
- Algorithm Explanations
- File Descriptions
- Future Improvements
- Contributing
- License
- Acknowledgments
This section will guide you through setting up the Maze Solver project on your local machine to get it running.
To run this project, ensure Python and Pygame are installed on your system. Follow these steps:
- Clone the Repository:
- git clone https://github.com/SaladinIART/Maze_Solver.git
- cd Maze_Solver
- Install Dependencies: Use pip to install Pygame:
- pip install pygame All dependencies will be installed automatically.
Once the dependencies are installed, the project can be run using the following steps:
Open a Terminal: Navigate to the project directory. Run the Main Script:
- python Maze_Solver_v1.31.py
- Keyboard Controls:
- Press B to run Breadth-First Search (BFS).
- Press D to run Depth-First Search (DFS).
- Press A to run A Search*.
- Maze Visualization: The maze will be displayed, and the selected algorithm will begin solving it, visualizing the traversal in real time.
-
Breadth-First Search (BFS):
- Description: BFS explores the maze level by level, ensuring that the shortest path is found. It uses a queue to manage the nodes.
- Strengths: Guarantees the shortest path in an unweighted maze.
- Weaknesses: Can be memory-intensive for large mazes.
-
Depth-First Search (DFS):
- Description: DFS dives deep into paths before backtracking, using a stack structure.
- Strengths: Memory-efficient compared to BFS.
- Weaknesses: Does not guarantee the shortest path; may explore inefficient routes.
-
A* Search:
- Description: A* uses a heuristic (such as the Manhattan distance) to guide the search, balancing efficiency and accuracy.
- Strengths: Efficient for finding the shortest path in a weighted maze.
- Weaknesses: Heuristic choice can impact performance.
- Basic_map.py: Contains basic maze configurations.
- Maze_Solver_v1.31.py: Main script for running the maze-solving algorithms.
- Maze_Reconfigure.py: Script for experimenting with different maze setups.
- map_generator.py: Utility for generating random maze maps.
- README.md: This file, detailing the project.
- Enhanced Heuristics: Experimenting with different heuristics to improve A* performance.
- More Algorithms: Adding Dijkstra's algorithm and bidirectional search.
- Interactive GUI: Developing a graphical user interface for easier configuration and experimentation.
Contributions are welcome! Please follow these steps if you'd like to contribute:
- Fork the Repository
- Create a Branch for your feature or bug fix:
- git checkout -b feature-name
- Commiyt your changes:
- git commit -m "Describe your feature or fix"
- Push to your branch:
- git push origin feature-name
- Open a Pull Request on the main repository.
This project is licensed under the Apache-2.0 License. See the LICENSE file for more details.
- Pygame Community: For providing extensive resources and support.
- Open-Source Contributors: To everyone who contributes to making coding projects more accessible and innovative.
This documentation is designed to be beginner-friendly and accessible. Feedback is always welcome to improve clarity and usability. Happy coding!