Coder Social home page Coder Social logo

n-puzzle's Introduction

N-puzzle

42 school project requires solving n-puzzle game with A* and similar algorithms, click this link for more info.

Demo

the project includes a web interface to experiment and play with, you can visit it here.

Features

  • solving 3*3 and 4*4 boards with optimal speed.
  • using different algorithms
    • A*
    • IDA*
  • using multiple heuristic functions
    • manhattan distance
    • linear conflict
    • disjoint pattern database
  • web api to visualize and experiment with the program.

theoretically the program can solve any bord size (n-puzzle), but in practice it will be to slow for boards bigger or equal to 5*5.

Requirements

cmake, g++ or clang++

all those programs must be added to your path

Instalation

git clone https://github.com/ZackChOfficial/n-puzzle.git
cd n-puzzle
./utils/configure.sh && ./utils/build.sh

Running web interface localy

Requirements :

node, npm, emscripten

cd web/public/wasm/
./configure.sh && ./build.sh 
cd ../..
npm install
npm start

or you can visit it online at this link.

Usage

the program reads the board from the standard input and prints a bunch of useful data. example :


Type :

./buils/n-puzzle -h # for more info about usage

Contributors

License

MIT

n-puzzle's People

Contributors

zackchofficial avatar ayoubyt avatar

Stargazers

Roman 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.