Skip to content

This repository is made to fulfill Tugas Kecil 3 Strategi Algoritma 2022

Notifications You must be signed in to change notification settings

IloveNooodles/15-puzzle-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

15-puzzle-solver

This repository is made to fulfill Tugas Kecil 3 Strategi Algoritma 2022. 15 Puzzle Solver made using python and using the principles of branch and bounds algorithm.

Screenshots

image image

Technologies used

  1. Python (3.8+)
  2. Numpy

Feature

This programs will output least amount move possilbe to solve the puzzle using branch and bounds algorithm. (BEWARE that some puzzle will take time to compute so please wait :))

Setup

  1. Install requirement from the technologies section
  2. Clone the repository using git clone https://github.com/IloveNooodles/15-puzzle-solver.git
  3. Open the folder and move to src using cd src
  4. Make sure you are in the src directory otherwise it won't work
  5. Run the file using python main.py

Input

  1. Input is unique number from 1 to 15
  2. Use 0 for empty space
  3. template for text file
1 2 3 4
5 6 7 8
9 0 10 11
12 13 14 15

Usage

  1. You can choose either input from txt file, input line by line or generate random puzzle
  2. Make sure your input is correct
  3. Ta-da! program will output move and steps by steps

Room for improvement

  1. Make GUI for program to better visualization
  2. Better approach in the algorithm for faster runtime

Folder structure

├── README.md
├── doc
│   └── Tucil3_13520029.pdf       
├── src
│   ├── library.py
│   ├── main.py
│   └── solver.py
└── test
    ├── correct1.txt
    ├── correct2.txt
    ├── correct3.txt
    ├── correct4.txt
    ├── correct5.txt
    ├── false1.txt
    └── false2.txt

Made with ❤ by IloveNooodles

About

This repository is made to fulfill Tugas Kecil 3 Strategi Algoritma 2022

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages