https://github.com/rafifiaan/q2-daa-mazegeneratorsolver-py
A simple maze generator program with MST and DSF Algorithms
https://github.com/rafifiaan/q2-daa-mazegeneratorsolver-py
algorithms maze-algorithms maze-generator maze-solver
Last synced: 8 months ago
JSON representation
A simple maze generator program with MST and DSF Algorithms
- Host: GitHub
- URL: https://github.com/rafifiaan/q2-daa-mazegeneratorsolver-py
- Owner: rafifiaan
- Created: 2023-05-17T06:51:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-17T18:47:04.000Z (over 2 years ago)
- Last Synced: 2025-02-25T20:18:25.601Z (8 months ago)
- Topics: algorithms, maze-algorithms, maze-generator, maze-solver
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **Quiz 2 (DAA) - Maze Generator & Solver**
Repository for Design & Analysis of Algorithms Secondary Quiz.
## **Group Members**
| Name | Student ID | Class |
| ----------------------------------|------------|:------:|
| Akmal Ariq Romadhon | 5025211046 | DAA G |
| Sandyatama Fransisna Nugraha | 5025211196 | DAA H |
| Rafi Aliefian Putra Ramadhani | 5025211234 | DAA H |
# **Question**
You are free to make any computer program for your group project (e.g., game, start-up,
etc.). However, you have to implement any algorithms (e.g., DFS, BFS, DAG, Prim-Jarnik,
Kruskal, etc.) that have been taught in our lectures. For instance, a game that determines
the closest distance, a minesweeper game or a web application that examines the
minimum distance for sending the goods from one point to another point.
# **Answer**
The following is the result of our work based on the questions above.
## **Main Topic Problem**
Using Prim's (Minimum Spanning Trees) and Depth First Search algorithms to create a maze generator program, and then solving it using the Depth First Search Algorithm.
## **Maze Problem Preview**
Here is the visualization for Maze Problem:

## **Maze Description**
Maze is a puzzle-like structure composed of interconnected passages or paths that challenges navigational skills. It serves various purposes such as entertainment, education, and research. Mazes can be created in different shapes and sizes and can be two-dimensional or three-dimensional. The objective is usually to find a path from a starting point to a finishing point while navigating through complex twists and turns, which can include obstacles like dead ends, false paths, and traps. Mazes have a long history and have been used for spiritual, entertainment, and educational purposes. Today, they are commonly used in theme parks and video games. Mazes can be created using various methods and require careful planning and consideration of factors such as the purpose, level of difficulty, and target audience.
## **Implementation**
The following is a brief explanation of the algorithm used. To see a more complete explanation, you can visit [this page](https://docs.google.com/document/d/1rBJiJ0srbW19zWIxvrYbQuQJzs4kif04ugv55M70GMg/edit?usp=sharing) or via the following link:
https://its.id/m/DAA-Quiz-Report
- **Maze Generator (Prim's MST and DFS Algorithm)**
To create a maze, combine Prim's algorithm and DFS. Prim's algorithm starts with a grid where all cells are walls. It randomly selects a starting cell, adds it to visited cells, and adds neighboring cells to the unvisited list. The algorithm selects the cell with the minimum weight, removes it from the unvisited list, and marks walls as passages. This continues until all cells are visited, resulting in a connected maze. DFS adds complexity to the generated maze. It starts at a random cell and explores neighboring cells recursively. It removes walls, creates passages, and continues exploring until reaching a dead end. The algorithm backtracks and explores other unvisited neighboring cells. DFS ensures all cells are interconnected, creating a challenging maze.
- **Maze Solver (Depth First Search Algorithm)**
DFS is a widely used algorithm for maze problem solving. It explores the maze by going as deep as possible along each branch before backtracking. To apply DFS to a maze, we start at the entrance and mark it as visited. Then, we recursively explore neighboring cells that haven't been visited. If we encounter a dead end, we backtrack to the previous cell and explore other paths. DFS uses a stack to keep track of the current path and allows us to search for alternative routes. Although DFS doesn't guarantee the shortest path, it efficiently solves mazes by systematically exploring interconnected cells until finding a path from entrance to exit.
## **Preview**
- **Home**

- **Maze-Making Process**

- **Solved with DFS**

# **Contribution List**
The following is the division of tasks and the percentage contribution of each member in working on Quiz 2.
## **Percentage**
| Name | Student ID | Work Contribution |
| ----------------------------------|:----------:|:------------------:|
| Akmal Ariq Romadhon | 5025211046 | 33.33% |
| Sandyatama Fransisna Nugraha | 5025211196 | 33.33% |
| Rafi Aliefian Putra Ramadhani | 5025211234 | 33.33% |
## **Work Structural**
**Akmal Ariq Romadhon:**
- Make problem Analysis
- Compiling reports
- Help develop generator program ideas (structural and completion solutions)
- Edit and help complete the README.md
**Sandyatama Fransisna Nugraha:**
- Create Design Problems
- Develop a conclusion, concept, or idea
- Completing the program (main)
- Edit and help compile README.md
**Rafi Aliefian Putra Ramadhani:**
- Arranging Implementation Problems
- Making Conclusions, finish reports
- Develop the program structure and complete the generator program
- Compile and complete README.md.