genpranav / Recursive-Backtracking-of-DFS-for-Mazes

The implementation of balanced and efficient maze generation and solving algorithms. Stochastic DFS based recursive backtracking to be specific.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stochastic Depth First Search-based Recursive backtracking for Maze Generation and Solving

Maze Generation and Solving is an exciting problem and countless approaches are out there for the same. The novice greedy method for solving the maze is the DFS approach, for intuition consider traveling down the path that has been already explored to the furthest, and continuing our exploration down the same path would be a rational decision to reach the destination. At the same time randomly initializing the search paths several times will allow the algorithm to be efficient overall.

This project was aimed at achieving the following goals,

  • To implement a maze generator
  • To implement a maze solver

A more significant challenge was attempting to code the tasks in a less familiar programming language (java). To add, the results of the projects must also be appealing.

The following are the results of the project,

Maze Generator

Maze generator

Maze Solver

Maze solver

The light blue color depicts the solution to the maze whereas the dark blue depicts the paths from which the program backtracked before reaching the solution

Documentation

The documentation of this project can be found here

Run locally

The code files of the Maze generator can be found here

The code file of the Maze solver can be found here

Socials plug

B.E.Pranav Kumaar Student ID @Amrita Vishwa Vidyapeetham - CB.EN.U4AIE20052

🔥 twitter

LinkedIn

❄️ Github

About

The implementation of balanced and efficient maze generation and solving algorithms. Stochastic DFS based recursive backtracking to be specific.


Languages

Language:Java 100.0%