Skip to content

This Python project generates a random maze and solves it quickly and efficiently.

Notifications You must be signed in to change notification settings

ErwanDavidCode/Labyrinth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Presentation

This Python project generates a random maze and solves it very quickly and efficiently.

Installation

  • Install Python libraries
pip install -r requirements.txt

Algorithm configuration

The internal values used for the algorithm can be modified in the labyrinthe_resolution.py file.

carte = labyrinthe(
    largeur=101,
    hauteur=101, 
    ligne_entree="auto", 
    colonne_entree="auto", 
    ligne_sortie="auto", 
    colonne_sortie="auto", 
    pas=2, 
    pad_width=1)
argument type description
largeur int Maze width in number of squares
hauteur int Maze height in number of squares
ligne_entree int xentry
colonne_entree int yentry
ligne_sortie int xexit
colonne_sortie int yexit
pas int The step size of the maze generation random walk
pad_width str The size of the outer contour of the labyrinth

Notes: All values must be modified with full knowledge of the facts. Values are not checked for consistency. For example: the values ligne_entree, colonne_entree, ligne_sortie, colonne_sortie must be smaller than the size of the maze.

Examples

Here's an image of a maze, with its solution, generated with this code in less than a second: Screenshot of a labyrinth

About

This Python project generates a random maze and solves it quickly and efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages