I created this program to learn more about algorithms and how to implement them, specifically maze-generation and pathfinding algorithms.

Download

Version: 1.0.0 / 16.07.22

Demo

Maze-generation algorithms

For generating mazes, four unique algorithms are available.

All the algorithms produce perfect mazes, which means there are no loops and all mazes are solvable. Most of these algorithms are based on spanning tree-algorithms used in graph theory.

Random DFS algorithm can be implemented both recursively and iteratively. I’ve chosen an iterative approach for my implementation.

Randomized Kruskal

Randomized Prim

Recurisve Division

Source: Wikipedia: Maze generation algorithm

Pathfinding algorithms

There are two available pathfinding algorithms.

1. Dijkstra

2. A*

A* is an extended algorithm of Dijkstra’s. It adds a heuristic value that helps to determine the optimal next cell to visit, often resulting in major performance improvements.