Skip to content

Different approaches to solve 8 puzzle problem (Part of ENPM661 - Planning for Autonomous Robots)

Notifications You must be signed in to change notification settings

arp95/path_planning_8puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

8 Puzzle Problem

Author

Arpit Aggarwal

Instructions for running the code

To run the code for solving the puzzle, follow the following commands:

python bfs.py 'puzzle'

where, puzzle is the input state to be solved. For example, running the python file on my local setup was:

python bfs.py 123456780

Also, puzzle taken as input is in column order. It means that for the above input state '123456780', matrix would look like: matrix[0th row][0th col] = 1
matrix[1st row][0th col] = 2
matrix[2nd row][0th col] = 3
matrix[0th row][1st col] = 4
matrix[1st row][1st col] = 5
matrix[2nd row][1st col] = 6
matrix[0th row][2nd col] = 7
matrix[1st row][2nd col] = 8
matrix[2nd row][2nd col] = 0

Software Required

To run the .py files, use Python 3. Standard Python 3 libraries like numpy is used.

About

Different approaches to solve 8 puzzle problem (Part of ENPM661 - Planning for Autonomous Robots)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages