Giter Club home page Giter Club logo

15-puzzle-solver's Introduction

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

15-puzzle-solver's People

Contributors

ilovenooodles avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.