Skip to content

Bridge and Torch Problem solved by an Artificial Intelligence algorithm, written in Java.

License

Notifications You must be signed in to change notification settings

nevwalkalone/Bridge-and-Torch-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge and Torch Problem

This project was completed for the Artificial Intelligence course of the Department of Computer Science of the Athens University of Economics and Business, during the Fall semester of 2020-2021.

The objective of this assignment was to write a program that implements an AI algorithm (BFS, DFS, A* etc), so that an optimal solution can be found for the Bridge and Torch problem. In this project the A* algorithm with closed set was implemented. Given a number of people that want to cross the bridge, the algorithm must find the optimal solution, meaning the minimum amount of time for all people to pass across.

Useful Reads

For a full overview it is highly suggested that you read:

  • Project Assignment, that contains all the details about the game rules and what exactly was requested.
  • Project Report, that contains all the details about the algorithm implementation and the analysis of the code.

Dependencies

Program Execution

  1. Clone repository

    git clone https://github.com/nevwalkalone/Bridge-and-Torch-Problem.git
    
  2. Change directory to src

    cd Bridge-and-Torch-Problem\src
  3. Compile Main.java

    javac Main.java
  4. Run Main

    java Main

When the program runs, the user is asked to give as an input:

  1. the number of family members that must cross the bridge
  2. the total time limit that must not be exceeded
  3. the amount of time that is required for each member to cross from one side to the other

Program then ends with a fully displayed path from initial to terminal state (with exact moves in each step) if a solution that does not surpass the time limit is found.

Collaborators

Contributions

If you want to contribute, you can always create a pull request or open an issue.

License

MIT

About

Bridge and Torch Problem solved by an Artificial Intelligence algorithm, written in Java.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages