Skip to content

Maze generator and solver scripts (solving work in progress) written in Python 3.

Notifications You must be signed in to change notification settings

lrbender01/Maze-Generator-and-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maze Generator and Solver

mazegen.py

This script can be used to generate a maze of any size (in nodes) based on user input. It relies on a modified version of Kruskal's algorithm to randomly add edges to a graph of maze nodes until all nodes are connected. It also supports creating larger images for easier viewing as well as any number of cycles to confuse solvers. I know that it is not nearly as efficient as it could be because Python does not allow direct pointer manipulation for graph-like data structures.

mazesolve.py

This script is a work in progress and can parse an image file like the ones produced by mazegen.py into a list of significant nodes for processing and solving. I intend on adding different solution algorithms for comparison on both cyclic and acyclic mazes from mazegen.py.

Dependencies

Both mazegen.py and mazesolve.py rely on PIL (Python Imaging Library) to create and modify .png files. Neither will work without having PIL installed. Anyone who does not have it installed should reference this site.

Written by Luke Bender (lrbender01@gmail.com) in April 2021.

About

Maze generator and solver scripts (solving work in progress) written in Python 3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages