All Projects → MarekKowalski → MazeSolver

MarekKowalski / MazeSolver

Licence: MIT License
An app that can solve a maze based on its image.

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to MazeSolver

mazes
A comprehensive library of algorithms for creating perfect mazes.
Stars: ✭ 64 (+255.56%)
Mutual labels:  maze, maze-solver
F-a-maze-ing
Create aesthetic mazes of different shapes, tiles, sizes and more using a CLI tool. A website is also available at https://mazes.apixelinspace.com
Stars: ✭ 78 (+333.33%)
Mutual labels:  maze, maze-solver
maze4d
First person four-dimensional maze game
Stars: ✭ 30 (+66.67%)
Mutual labels:  maze
mazes-for-programmers-js
Javascript porting of the original source code(Ruby) of the book <Mazes For Programmers>, Jamis Buck. Not Official.
Stars: ✭ 26 (+44.44%)
Mutual labels:  maze
maze
A maze command written in Go
Stars: ✭ 110 (+511.11%)
Mutual labels:  maze
WolfieMouse
IEEE Reion 1 Micromouse competition.
Stars: ✭ 29 (+61.11%)
Mutual labels:  maze
astar-gridmap-2d
A* algorithms for 2D gridmaps. The fastest one, until you prove me wrong
Stars: ✭ 43 (+138.89%)
Mutual labels:  maze-solver
three-maze
♟️ Creation of random 3D mazes with three.js and tween.js.
Stars: ✭ 44 (+144.44%)
Mutual labels:  maze
maze
Create and solve mazes in Python.
Stars: ✭ 36 (+100%)
Mutual labels:  maze
maze generator
A work-in-progress Javascript maze generator module, compatible with both Deno and Node. 🌽
Stars: ✭ 35 (+94.44%)
Mutual labels:  maze
MetaGym
Collection of Reinforcement Learning / Meta Reinforcement Learning Environments.
Stars: ✭ 222 (+1133.33%)
Mutual labels:  maze
mazeGenerator
Recursive Backtracker Maze Generation Algorithm with C++ using ncurses
Stars: ✭ 24 (+33.33%)
Mutual labels:  maze
pathfinding-visualizer
Website built using React Framework for visualizing Pathfinding and Maze Generation Algorithms.
Stars: ✭ 33 (+83.33%)
Mutual labels:  maze
ScreenMazer
A macOS screensaver that procedurally generates a maze and then solves it
Stars: ✭ 87 (+383.33%)
Mutual labels:  maze
maze-generator
A real-time JavaScript maze generator using the depth-first search algorithm
Stars: ✭ 13 (-27.78%)
Mutual labels:  maze

MazeSolver

MazeSolver solves mazes, which are automatically read and interpreted from jpg images. As input it takes a jpg image and the coordinates of the beginning and end of the maze. It outputs a file called "output.jpg" with the path through the maze drawn on top of the input maze image.

The maze images need to fulfill some conditions:

  • the walls need to be black or at least darker than the background,
  • there cen be no "tunnels" or "overpassess" in the maze.

If you do not want to compile the app yourself, you can download the Windows binaries from my website:
http://home.elka.pw.edu.pl/~mkowals6/

Examples

There are three example mazes included in the project. All are distributed under the creative commons license, the original images are available here:
maze1.jpg: https://en.wikipedia.org/wiki/Maze#/media/File:Circularmazeexample.jpg
maze2.jpg: https://upload.wikimedia.org/wikipedia/commons/3/32/MAZE_2000x2000_DFS.png
maze3.jpg: https://en.wikipedia.org/wiki/User:Dllu/Maze#/media/File:MAZE_40x20_DFS_no_deadends.png

Below you can see the maze3.jpg example file along with its solution.
maze3.jpg
maze3_solved.jpg

How to run it

MazeSolver is a console application, to run it you need to open the console and browse to the location of the app.
The program can be ran with the following command:

MazeSolver.exe IMAGE_FILE_NAME.jpg START_X START_Y END_X END_Y [SAVE_COST_MAP]

Where:
IMAGE_FILE_NAME.jpg is the name of the image file with the maze.
START_X/Y are the pixel coordinates of the maze entrance.
END_X/Y are the pixel coordinates of the maze exit.
[SAVE_COST_MAP] is an additional paramter, if added the program saves the maze cost map instead of the path through the maze.

So to run the app with one of the example mazes you need to write: MazeSolver.exe ../maze1.jpg 224 177 633 620
or for another example:
MazeSolver.exe ../maze2.jpg 1 1 4000 3999

Licensing

All of the code except the jpg compression/decompression is licensed under the MIT license. The jpgd library which is used for reading and writing jpg images is in the public domain, more info here: https://code.google.com/p/jpeg-compressor/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].