GithubHelp home page GithubHelp logo

itakurah / 15-puzzle-solver Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.51 MB

Solving the 15-Puzzle sliding game with informed search algorithms and various heuristics.

License: MIT License

Java 100.00%
15-puzzle 15-puzzle-solver astar-algorithm hamming-distance heuristic-search-algorithms heuristics idastar-algorithm informed-search linear-conflict manhattan-distance

15-puzzle-solver's Introduction

15-Puzzle-Solver

This software project involves solving the 15-Puzzle sliding game using both the A* and IDA* algorithms. The Manhattan-Heuristic, Hamming-Distance, and Linear-Conflict Heuristics are used to determine the cost of each move and guide the search for the optimal solution. The A* algorithm guarantees finding the optimal solution while IDA* is the optimized version of the A* algorithm which uses less memory. The heuristics used in this project are well-known and widely used in the field of artificial intelligence, providing a high level of accuracy in finding the solution to the 15-Puzzle game.

Usage

In the Application.java file, you can either auto-generate a random puzzle using the Utils.getRandomPuzzle() method or create your own by calling Utils.convertStringTo2DIntArray(e.g. "5, 11, 0, 2, 6, 10, 1, 4 13, 12, 3, 7 14, 9, 15, 8"). Then you need to select the solving algorithm AStar or IDAStar and set the parameters using e.g.: AStar.solve(board, new ManhattanDistance() OR new HammingDistance() OR new LinearConflictWithMD(), TimeUnit.= MS or NS, DebugMode.=ON or OFF);

About

This project, created by Niklas Hoefflin, is a submission for the Intelligent Systems module at the Hamburg University of Applied Sciences under the supervision of Prof. Dr. Peer Stelldinger. It is shared on GitHub for educational and reference purposes only and can be used for commercial or any other non-academic purposes without the author's permission.

License

This project is licensed under the MIT License. Please see the LICENSE.md file for details.

15-puzzle-solver's People

Contributors

itakurah avatar

Watchers

 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.