View on GitHub

MazeSolver

A Java program that generates and solves three dimensional mazes.

Download this project as a .zip file Download this project as a tar.gz file

About the Project

MazeSolver is a Java application written as my final project for ICS 4UI at Sir John A. Macdonald Secondary School. It uses a modified version of Prim's algorithm to generate 3 dimensional mazes. It then solves those mazes using either a recursive backtracker algorithm or the A* Pathfinding algorithm.

Use

After launching the program you can select the size of the maze to generate using the spinners on the right hand side. You may also choose to animate the generation process by selecting the box and selecting the animation speed using the slider. Once the maze has finished generating, it will be displayed in the main window. The green square represents the start point of the maze, the majenta point represents the end point, an up arrow represents that there is a passage to the level above the current layer, a down arrow represents a passge to the layer below, and a multi-directional arrow represents a passage to the layers both above and bellow. You can switch between layers of the maze using the scroll wheel. To change the start point to a given square left click the square, similarly to change the end point, right click. To solve maze select one of the two solving algorithms using the dropdown menu. In the same methid as the generation you may animate the solving process. After the maze has been solved it will display stats about the solution in the bottom right corner. You can use these to compare the two algorithms.

Download

You may download the executable JAR file here.


Screenshots