This is a simple maze creator/solver and solution visualizer using A* algorithm
python[.exe] MazeSolver.py [maze_input_<num>.png]
if required, install required modules with:
pip install -r requirements.txt
- Execute it to generate a random maze
- Click any point in the maze to create a start point
- Click any point in the maze to create a stop point
- Press SPACE button to start the solver by step by step
- Press f button to toggle between quick or step-by-step solution
- Once started a step-by-step solution is not possible to press f, you have to wait
- So, press f and then SPACE to have quick solution
- If you regenerate the maze, there is no need to re-press f
- Press s to save the maze (once solved)
- it will create 3 images:
- maze_.png = the maze with start and end point
- maze_sol_.png = the maze with the solution on it
- maze_input_.png = a 100x100 image that can be pass to the MazeSolver as argument to load again this maze
- it will create 3 images:
- Press g to regenerate a new random maze
- Press c to clear the window and have an empty board where you can put point manually
- First click will place the start point
- Second click will place the end point
- All other click will place a wall
- Right click on any placed point will delete it
- You can Right click to delete some wall and then press SPACE again to recalculate the solution