Skip to content

Algorithm Strategies Course Project: Treasure Hunt Maze with DFS and BFS

License

Notifications You must be signed in to change notification settings

AlifioDitya/Treasure-Hunt-Maze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Strategies Course Project

Treasure Hunt Maze Searching with BFS and DFS

image

Opening Monologue

早上好中国
现在我有冰淇淋
我很喜欢冰淇淋
但是 《速度与激情9》
比冰淇淋
速度与激情—《速度与激情9》
我最喜欢
所以... 现在是音乐时间
准备 不要忘记 不要错过
记得去电影院看《速度与激情9》
因为非常好电影
动作非常好
差不多一样冰淇淋
再见

Description

This repository contains a project for an Algorithm Strategies Course Project, which focuses on the implementation of the Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms for solving a treasure hunt maze searching problem.

Getting Started

To use this program, you need to have the following installed on your system:

  1. C# Programming Language
  2. .NET Framework
  3. Visual Studio 2022
  4. .NET MAUI

How to Run

To run the program, follow these steps:

  1. Install the prerequisites
  2. Clone or download the repository to your local machine
  3. Open the solution file BingChilling.sln located in the src folder with Visual Studio
  4. Select BingChillingGUI as the target project
  5. Select an emulator and click the play button on the top navigation bar as shown below

image

  1. The program will be built and the application page should automatically pop up as follows

image

Usage

To use the program, you will need to load the maze text file from a selected source. Make sure it is in a correct format specified on the document in the doc folder.

To run the program, select an algorithm (BFS or DFS) and select on whether or not the solution contains the Travelling Salesman Problem (TSP) bonus that traverses the nodes back to the starting point after all treasures have been found by ticking the boxes. Click visualize to show the paths taken and a slider is available to speed up the animation process. To reset the searching process, you can click the reset button.

Project Structure

The project is structured as follows:

  1. src folder contains the C# source code files.
  2. test folder contains the test cases for the program
  3. doc folder contains the report document for this project

Implementation Details

The program uses two algorithms, BFS and DFS, to solve a treasure hunt maze searching problem. The program reads a maze data file and represents the maze as a graph. Then, it applies BFS or DFS to search for the treasure location in the maze.

The program outputs the shortest path to the treasure location, the total number of nodes explored, and the time taken by the algorithm to find the treasure.

Author

Made With

.NET
C#

About

Algorithm Strategies Course Project: Treasure Hunt Maze with DFS and BFS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages