https://github.com/tom-draper/maze-generator
Creates and displays a randomly generated maze.
https://github.com/tom-draper/maze-generator
pathfinding prims-algorithm
Last synced: 9 months ago
JSON representation
Creates and displays a randomly generated maze.
- Host: GitHub
- URL: https://github.com/tom-draper/maze-generator
- Owner: tom-draper
- Created: 2019-09-14T15:40:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-22T11:26:55.000Z (over 5 years ago)
- Last Synced: 2025-05-24T17:40:54.142Z (10 months ago)
- Topics: pathfinding, prims-algorithm
- Language: Python
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maze-Generator
This project generates a random maze of a selected size and visualises the process. I started this project to graps some of the algorithms used for maze generation and visualise the steps an algorithm takes. Currently only Prim's Algorithm is implemented.
### Demo - Prim's Algorithm (20x20)
[](https://www.youtube.com/watch?v=lCfpZhXvS_Q)
#### Project Aims:
- Understand and implement a maze generation
- Expand Python GUI skills
#### What I Learned:
- General background of maze generation
- Details and method of Prim's Algorithm
In future, I aim to increase the number of algorithms in this implementation as alternatives to Prim's Algorithm. For a future project I could extend this program to implement a playable maze game. I will need to revist the implementationa to improve efficiency as currently walls are removed by drawing over a wall with a line of the background colour. Using an alternative to Python's Turtle module could allow for more control over placing and removing walls and subsequently allow for a variable animation playback speed. As this project centred around the visualisation aspect, the effeciency of the display wasn't top priority.
-------------------------------------------------------
## Getting Started
Run mazeGenerator.py to begin maze generation.
#### Optional command line arguments:
- Size (-s int_value) - integer length of one side of the maze. Size defaults to 50 (50x50 maze).
- Display details (-d true/false) - If true, details of generation prints to console. If false, progress bar displayed in console instead. Display details defaults to false.