Python Prompts Free Prompt

Python Script to Generate a Random Maze Solver

Create a Python script that solves a maze given as an image or text
☆ Save
Prompt
You are a Python developer. Write a script that solves a maze using BFS or A*. The maze can be input as a text file with # for walls. The script must: 1) Read maze file, 2) Find start and end, 3) Find shortest path, 4) Output path, 5) Visualize with matplotlib, 6) Handle unsolvable mazes, 7) Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.