Skip to content

Rawgreen/From-Labyrinths-to-Solutions

Repository files navigation

From-Labyrinths-to-Solutions

INTRODUCTION

Mazes have always been a source of intrigue, captivating individuals with their maze solving and generation. The Unity game engine provides an excellent platform to explore the art of creating and solving mazes. This project aims to dive into realm of maze generation algorithms and implemented AI-based solving techniques to create an engaging and interactive gaming experience. By harnessing the capabilities of Unity and incorporating diverse algorithms, the project seeks to craft mesmerizing mazes and challenge players with their intricate puzzles.

Problem Definition

The goal of this project is to develop a comprehensive maze generation and solving system using the Unity game engine. The problem at hand involves the creation of mazes with varying sizes, utilizing algorithms such as Binary Tree Maze, Kruskal, Prim, Random Walls, Recursive Backtracking, and Recursive Division. The challenge lies in visually representing these mazes in an appealing manner within the Unity environment. Additionally, the project aims to incorporate AI-based solving algorithms, including A*,Breadth First Search (BFS), and Depth First Search (DFS) to efficiently solve the generated mazes. By providing a means for users to compare the performance of these algorithms, such as displaying the number of steps taken and the length of the shortest path, the system enhances the interactive experience.

Solution Approach

The project leverages the Unity game engine as a versatile platform for game development. To generate diverse and visually captivating mazes, a variety of algorithms including Binary Tree Maze, Kruskal, Prim, Random Walls, Recursive Backtracking, and Recursive Division are implemented. These algorithms are carefully chosen to ensure the creation of engaging mazes in different sizes, providing users with a range of challenges and experiences.

In terms of maze solving, AI-based algorithms such as A*, Breadth First Search (BFS), and Depth First Search (DFS) are employed. These algorithms analyze the structure of the maze and intelligently search for the optimal or near-optimal path from the maze’s starting point to its endpoint. By considering factors such as distance, cost, and heuristic estimations, these algorithms determine the most efficient path. The system measures the performance of each algorithm by recording the number of steps taken and the length of the shortes path. This information is then presented in a table within the game, allowing users to compare and evaluate the effectiveness of the different solving algorithms.

By combining the capabilities of Unity, diverse maze generation algorithms, and AI-based solving techniques, the project provides an immersive and interactive gaming experience where users can explore and solve mazes of varying complexities and sizes.