Giter Club home page Giter Club logo

solvebysearch-tilepuzzle's Introduction

About

Solving a tile puzzle problem the size of NxM with up to 2 empty spaces using various search algorithms:

  • BFS
  • DFID
  • A*
  • IDA*
  • DFBnB

Minimizing the following cost:
Single move - 5
Vertical double move - 6
Horizontal double move - 7

Double moves are allowed only into 2 empty spaces.

Setting up:

Input

Create a file "input.txt" in the directory
With the following format:
Line 1: BFS / DFID / A* / IDA* / DFBnB - Choose algorithm
Line 2: with time / no time - Out put running time
Line 3: with open / no open - Displaying the open list during run time
Line 4: NxM - Board size
Next N lines: Starting state
Next line: "Goal state:"
Next N lines: Goal state

Input example

A*
with time
no open
3x3
1,2,3
4,7,_
5,6,_
Goal state:
1,2,3
4,5,6
7,_,_

Output

The output will be written in a file named "output.txt"
In the following format:
Line 1: Steps of the solution
Line 2: Number of nodes generated
Line 3: Cost of the solution
Line 4: (Optional) Running time of the program

Turning "with open" will display the open list in the console.

Output example

6R-7D-6U-7R-5R-5U-7L-7L
Num: 328
Cost: 40
0.048 seconds

solvebysearch-tilepuzzle's People

Contributors

andrey-ba 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.