A Python program that solves mazes using Depth-First Search (DFS) with a stack and Breadth-First Search (BFS) with a queue. It tracks explored states, finds the path from start to goal, and visualizes the solution as a PNG image.
- Solve mazes using DFS (stack) and BFS (queue)
- Counts and displays the number of explored states
- Visualizes the maze and solution path as an image
- Easy to use with a text-based maze input
-
Prepare a maze file (
maze.txt) with:Aas the start pointBas the goal#for walls- Space (
) for open paths
-
Run the solver:
python maze.py maze.txt