Skip to content

debbyalmadea/Maze-Treasure-Hunt-Solver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BFS-DFS Maze Solver Application

Preview

This is a project for building a simple GUI application that implements BFS and DFS algorithms to find the route for obtaining all the treasures in a maze. The program can read the maze input from a text file, which is expected to have the following specifications:

  • K: Krusty Krab (Starting point)
  • T: Treasure
  • R: Grid that can be accessed or a path
  • X: Obstacle grid that cannot be accessed

The program is built in C# using .NET 6.0 framework.

Prerequisites

Before you can build and run this program, you will need to have the following tools installed on your system:

  • Windows 10 or later
  • .NET 6.0 SDK
  • Visual Studio or any other IDE that supports .NET development.

Build Instructions

  1. Clone the project repository to your local machine.
  2. Open the command prompt or terminal and navigate to the project's root directory.
  3. Run the following command to build the program:
dotnet build src/src.csproj
  1. If the build is successful, the application executable will be generated in the bin/net6.0-windows directory.

How to Use the Program

  1. Navigate to the bin/net6.0-windows directory
  2. Launch the application by running the following command:
dotnet TreasureHuntSolver.dll
  1. Or you can double click on the TreasureHuntSolver.exe file
  2. Click the "Input File" button to select the maze text file
  3. Select the search algorithm (BFS, DFS, TSP, Shortest Path, or Shortest Path (TSP)) from the control menu.
  4. Click the "Search" button to find the route to all treasures.
  5. The solution path will be displayed in the control menu
  6. Set the time delay for each progress with "Time in between" slider
  7. Click the "Visualize" button to visualize the searching process and the final path to all treasures

Here's an explanation for the path's color

  • yellow: the path has been accessed
  • blue: the path is being accessed
  • green: the final path to all treasures

the opacity of the path indicates how often the path accessed by the algorithm/program (kobo)

Troubleshooting

  1. If the build failed because of duplicate assembly code, remove all obj folder in src/Driver then rebuild using the build instructions command
  2. If the build failed and said "Please restore and try again", run the following command
dotnet restore src/src.csproj
  1. If you keep getting "Invalid file format" error, make sure the maze text file have the correct format, you can see example text file in the test folder

Author

NIM Name
13521114 Farhan Nabil Suryono
13521120 Febryan Arota Hia
13521153 Made Debby Almadea Putri

Kobo in Krusty Krab

Kobo in krusty krab

Credits

About

C# GUI application to solve maze treasure hunt puzzle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%