Skip to content

Technisiums/BestFirstSearch-for-8Puzzle-Game-in-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Hello There !!

Description:-
--------------

Its an Algorithm of Best First Search for 8 - Puzzle Game, in which the start state is provided to the algorithm which creates
childs of start states and safe the childs in a list and then selects a child which has minimum hiruestic value and match it with
the goal if it matches a message "Success !!" will print out other wise it again perfrom same procedure untill goal state is acheieved.

Data Structure:-
----------------

The data structure used in this algorithm is nested list in which two variable are stored one is the hiruestic value and other is a 2d list
which is actually our puzzle box.

For Example:-
-------------

Puzzle box is implemented as 2d list and Open is implemented as nested list, open list is list where the childs in running states are saved.
 

Puzzle Box = |2 5 8 |
             |1 3 -1|
             |4 7 6 |

Open = [6 , |2 5 8 | ]
            |1 3 -1| 
            |4 7 6 |

That's all i think its much for your understanding about algorithm.

Note:-
-------
Thanks a lot.

Regards:-

Ali Haider
Developer @Technisiums

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages