Maze generating algorithms in Python

preview_player
Показать описание
Source code:

This video contains six perfect maze generating algorithms in Python. Perfect mazes are mazes without loops and exactly one path from one point to another.

Implemented algorithms:
- Recursive backtracking algorithm
- Hunt and kill algorithm
- Eller's algorithm
- Sidewinder algorithm
- Prim's algorithm
- Kruskal's algorithm
- Depth-first search
- Breadth-first search (not shown in video)

If you want to run the visual examples shown in the video you need to install the maze package and pyprocessing (link in readme). After that you should be able to execute the files in the visual directory.
Рекомендации по теме
Комментарии
Автор

1:15 hunt and kill can be done faster. It does not need to restart all the way back at 0, 0 for each pass. Everything above/behind each pass cannot be incomplete, so just remember the last pass starting position.

DMahalko
Автор

Future reference, use music with a Creative Commons copyright policy... it’s literally free and legal music.

KingDuken
Автор

Is it possible to find a solution to a maze with intersections with four intersections by backtracking? I tried to implement such a solution for a maze generated by the Prima method, but at the moment when the last passage at the intersection should be traversed, it is simply ignored, not getting into the list of cells available for visiting.

joda
Автор

Can l use this, as a Node instead of a line?

ChrisVideosGreek
Автор

Hi, please explain how to open these files.

gugi
Автор

can any of these mazes be solved ? or it is just for the visualization ?

asend
join shbcf.ru