Skip to content

Blazingly fast maze solver and generator implementing the A* and BFS algorithms for solving and creation, respectively.

Notifications You must be signed in to change notification settings

Jabolol/labyrinthia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

labyrinthia

Labyrinthia Logo

Welcome to labyrinthia, a labyrinth generator and solver using the A* algorithm. This project aims to provide a fast and efficient way to generate and solve labyrinths of various sizes.

  • Implements the A* algorithm for efficient solving
  • Fast and efficient labyrinth generation
  • Includes a visualizer in TypeScript and a generator in Ruby as bonuses
  • Main code is written in C for optimal performance

getting started

Clone the repo:

git clone git@github.com:Jabolol/labyrinthia.git .

Compile the C code:

make

To generate a labyrinth, use the following command:

./generator/generator <width> <height> [perfect] > /path/to/output.txt

Solvable mazes are not a square, and do not contain a \n at the end

To solve a labyrinth, use the following command:

./solver/solver /path/to/maze.txt > solution.txt

bonuses

To generate a labyrinth with Ruby run:

ruby misc/generator.rb <width> <height> > maze.txt

To visualize a labyrinth with TypeScript in the terminal run:

deno run --allow-read=/path/to/maze.txt misc/solver.ts /path/to/maze.txt

About

Blazingly fast maze solver and generator implementing the A* and BFS algorithms for solving and creation, respectively.

Topics

Resources

Stars

Watchers

Forks