This is a fun little app that is more educational than anything else, unless you love to solve mazes.
It has random maze creation, maze solving and pathfinding, and more, all while taking the time to show you exactly
how it is doing it.
Features
- Generates random solvable mazes using the Drunkard's Walk algorithm.
- Solves the mazes using either: iterative A*, iterative backtracking, or recursive backtracking.
- Allows you to specify the pause between animations, thereby giving you the option of watching the algorithms in action.
- Can create mazes of absolutely any size, although 500 x 500 is about the maximum size that can actually be discerned.
- Open source - go in and take a look at the code that makes up the algorithms.
- Fast enough that (in non-ridiculous mazes) paths to your mouse position can be drawn instantly.
- Multi-threaded, so if you accidentally start iterative backtracking on a 1000 x 1000 maze, you can easily quit the program.
Usage
There's not much to do aside from playing around with the buttons on the interface, and the function of those buttons is more
than self explanatory. However, "BT" stands for Back Tracking, the yellow squares are ones the AI visited, and the orange squares
are ones that make up the actual path. There is only ever one path to the goal. The more yellow squares there are, the "worse"
the algorithm did. However, some mazes are simply unfair for a certain algorithm. A* tends to perform better on large mazes or
very small mazes, whereas BT is better for the in-betweens. BT is also random whereas A* will always give the exact same result each maze.
Future
I'm probably going to make a 3D maze in the near future, which is an incredibly easy adaptation aside from the fact that I've got to
convert the project to LWJGL or Java3D. In addition, I'm trying to come up some way of turning this into a game that would be fun. It
could evolve into some sort of insanely difficult Pac-Man, or something similar.
Look at that complex maze! You can make even more complicated mazes, if you like.