Code Monkey home page Code Monkey logo

n-puzzle-solver's Introduction

N-Puzzle Solver

Program to solve the n-puzzle (8 puzzle) problem using search algorithm techniques BFS and DFS

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

What things you need to run the program

Python 3.2 or greater

Running the program

Explaination on how to run the program from the command prompt

Copy files into local repository

Type the following example in the prompt to run the program

python driver_3.py BFS 123450678
python driver_3.py ALG initialState

Prompt Syntax

driver_3.py (main executable)
ALG (algorithm to be used (BFS, DFS, A*(coming soon))
initialState (initial puzzle state to be used by the program)

Output

cost_of_path: [moves on board to solve puzzle]
nodes_expanded: [number of nodes expanded from frontier]
search_depth: [depth of search tree where solution was found]
max_search_depth: [maximium depth explored by the search algorithm]
running_time: [time taken for program to execute]
max_ram_usage:[amount of memory used to run program(coming soon)]

File content

driver_3.py [main executable]
createNode [class to create node object and attributes]
search_3.py [file containing search algorithm functions]
expandNode_3.py [file containing script to expand node and add children nodes]
stats_3.py [collects search metrics and formulates an output]
output.txt [file containing search metrics]

n-puzzle-solver's People

Contributors

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