A Python program that visualizes the process of solving a maze by skeletonizing an image and finding the optimal path between two points.
- Clone the Repository:
git clone https://github.com/luc1d-ed/Pixela-Maze.git
cd Pixela-Maze
Alternatively, download the ZIP file and extract it.
- Install Dependencies: Ensure you have Python installed, then install the required packages using:
pip install -r requirements.txt
It's recommended to use Jupyter Notebook, especially for marking the start and end points.
-
Choose Your Maze:
Obtain a maze image you want to solve (e.g., from Maze Toys)
-
Place the Image in the Appropriate Directory:
Pixela-Maze/
├── Mazes/
│ ├── Maze.toys/
│ │ └── {image_file}
│ ├── Examples/
├── Breadth-first.ipynb
├── Breadth-first.py
├── Depth-first.ipynb
├── Depth-first.py
├── requirements.txt
Or change the directory in the notebook.
-
Update the Image Path:
In the Jupyter Notebook, update the filename in the second code block (or on line 11):
-
Set Start and End Points:
-
Run the Notebook:
Execute the cells one by one to solve your maze.
Channel: Odlogo
YouTube: How to Solve a Maze - Live Coding - Python - Image Analysis
GitHub: How to solve a maze
This repository is basically a copy of the above mentioned video. I plan to add a GUI for making this easier to use.
Feel free to open issues or submit pull requests for any improvements.