This python program was made to fulfill the third small task (Tucil 3) for IF2211 Strategi Algoritma. The src folder consists of two files, fifteenPuzzleSolver.py ( The solver for the 15-Puzzle) and main.py (main program).
NIM | NAME |
---|---|
13520141 | Yoseph Alexander Siregar |
15-Puzzle
├── src # includes source code
│ ├── fifteenPuzzleSolver # Program consisting of breach and bound algorithm to solve 15-Puzzle
│ ├── main # Main Program
├── test # Includes test cases
├── doc # Include task report
Requirement to run the Program
- Python Environment
- Numpy Package
- Clone this repository :
https://github.com/yosalx/15-Puzzle
- Install all the package in the requirement :
pip/pip3 install <package_name>
- Open the terminal and change the path to folder src :
cd 15-Puzzle/src
at the terminal or justcd src
if the terminal is already at the folder this repo was cloned - Run
py main.py
orpython main.py
orpython3 main.py
at the terminal - The program is now running
- P.S. If method 2 for the puzzle initial state (randomize matrix) take too long to finish, either kill the terminal and try again or use the first method