alex-alra-arteaga / Dante

Growing tree and recursive backtracking algorithm, 2D maze generator and solver.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maze-Generator-Solver

The goal of this project is to generate mazes (in a reasonable amount of time), solve them (in a reasonable amount of time), and print the solution.

The actual algorithm I figured out is a mix of DPS (Depth-First-Search), Growing Tree and Recursive Backtracking Algorithm. I use a Li-Fo stack which stores the correct path, cell by cell. My solution approaches a O(n * log(n)) time complexity.

image

image

Compilation and binary execution

'Make re' at root

Generator: For a perfect generator, specify it with the word. Ignore the third argument, or put 'imperfect' for an imperfect generation.

image

Solver:

image

Hint: Remember to access the folder/generator folder to execute the binary.

About

Growing tree and recursive backtracking algorithm, 2D maze generator and solver.


Languages

Language:C 96.6%Language:Makefile 3.4%