Git Product home page Git Product logo

omkarchittar / bfs_8_puzzle Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 35 KB

Finding all the possible states of the 8-Puzzle starting from the given initial state until the goal node is reached. States being unique. •Using the initial state of the puzzle, performing different moves in all the directions to generate new states. Using BFS to reach the goal. Back tracking for solving the problem

License: MIT License

Python 100.00%
bfs bfs-algorithm bfs-search 8puzzle 8puzzle-game 8puzzle-solver

bfs_8_puzzle's Introduction

BFS 8 Puzzle

File Tree

proj1_omkar_chittar
+-final.py
+-nodePath.txt
+-Nodes.txt
+-NodesInfo.txt
+-plot_path.py
+-README.md

Installation and Running

  1. Download and extract the files.

  2. Run the code final.py using the following command in your terminal python3 main.py

    • Choose a test case from 1 or 2 to run by uncommenting the inputs OR change values for nodeInitial and nodeGoal for a custom test case
  3. To visualize the path taken from the initial_node to the goal_node, run python3 plot_path.py

  4. nodePath.txt : Displays the nodewise path taken to reach the goal_node

  5. Nodes.txt : Displays all the nodes that were visited before finiding the goal_node

  6. NodesInfo.txt : Displays all the nodes visited along with their node_number and their respective parent_node_number format : [node_number, ParentNode, nodeState]

bfs_8_puzzle's People

Contributors

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