Skip to content
Java-based Open Source CLI tool designed to solve mazes
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
javadoc
mazes
src/com/srgmc/mazelight
.classpath
.gitignore
.project
LICENSE
README.md
logo.png
logo.xcf
mazelight.jar

README.md

Mazelight logo
Language: en

Mazelight

Java-based Open Source CLI tool designed to solve mazes.

Table of contents

About Mazelight

Mazelight is a Java-based Open Source CLI tool that can solve mazes. It uses a custom made algorithm to find nodes and paths in the maze that are later added to a graph that can be used to solve the maze with shortest path finding algorithm like Dijkstra's algorithm.

Get started

Prerequisites

Mazelight currently supports images up to 512x512px in black and white (although the solved image contains color for the solution).
Mazes must be surrounded by a wall and only contain one start point and one exit point.
Maze paths must have 1px of width. Maze walls can be wider. Example mazes are provided in the mazes/ folder.

Instructions

To get started first make sure you have at least Java 1.8 and follow the next instructions:

  1. Download the latest release.
  2. Open
  • Linux: Terminal
  • macOS: Terminal (Launchpad > Utilities > Terminal)
  • Windows: cmd (Win + R > cmd)
  1. Navigate to the path where the dowloaded release is contained.
  2. Run the program with:
    java -jar mazelight.jar path/to/image path/to/output/image

Note: A* is currently the only implemented solving method

Program arguments

Required

  • mazelight.jar: The program itself.
  • path/to/image: The path to the maze image in black and white (as .png, .jpg or .bmp).
  • path/to/output/image: The output image path. Will export as .png

TODO

  • Implement Dijkstra's algorithm.
  • Implement Dijkstra's algorithm.
  • Optimize Graph.java: There's no need to add the edge reversed again.
  • Implement command line arguments.
  • Expand documentation.
  • Finish README.md.
  • Create API.

How it works

Mazelight works by analyzing an image of a maze and then converting it into a graph, so it can run algorithms to find the best solution to the problem. Some pseudocode can be found here

Documentation

All docs can be found in the wiki, and a javadoc is provided.

Contribute

Feel free to create issues and pull requests to solve bugs or create new features. Please check the license file in the link below

License

You can’t perform that action at this time.