This DFS (Depth-First Search) Maze Solver Project is designed to help visualize the process of depth-first search in exploring paths within a given matrix. It highlights the current cell being visited and updates the matrix's state at each step, providing insights into how the DFS algorithm explores all possible paths from each starting cell.
- Visualization of the DFS exploration process in real-time.
- Calculation and display of the maximum path length found by the DFS.
- Ability to input custom matrices via command-line arguments for flexible testing.
Before you begin, ensure you have met the following requirements:
-
Python 3.6 or higher installed on your system.
-
matplotlib
library installed for Python. This can be installed usingpip
:pip install matplotlib
To install the DFS Visualization Script, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/yourusername/dfs-visualization-script.git
- Navigate to the cloned repository:
cd dfs-visualization-script
No additional installation steps are required as the script runs directly with Python.
To use the DFS Visualization Script, run the following command in the terminal:
python dfs_visualization_script.py --matrix "[[0, 1, 0, 0], [1, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]"
Replace the matrix argument with your matrix, keeping the format as shown. The script will visualize the DFS process on the given matrix and print the maximum path length found. Contributing
Contributions to the DFS Visualization Script are welcome. To contribute:
- Fork the repository.
- Create a new branch
git checkout -b feature/AmazingFeature
. - Commit your changes
git commit -m 'Add some AmazingFeature'
. - Push to the branch
git push origin feature/AmazingFeature
. - Open a pull request.
License
This project is licensed under the AGPL-3.0 license - see the LICENSE file for details. Contact
If you have any questions or feedback, please contact me on LinkedIn.