Can anyone show me how to solve the 8 puzzles either using the heuristic search thank you. if u can , u may attach the sourcecode too. thank u :cheesy:
Watch this animation of the 15 puzzle solve itself. You will notice there is an exact pattern to solve it that works every time.
If you're still stuck for ideas after watching that (you shouldn't be)
Why not refer to http://8-puzzle.blogspot.com/
Implementation include various concepts in search techniques.
Sample program available for download and test at: AI 8-puzzle (8 Puzzle) solver
Quote from site:
The methods explored and implemented are: Blind Breath-First Search, h=Sum(step tiles from origin), h=Num. of Title not in place, Manhattan Distance Heuristic and A* Searching Algo (A Star Algorithm). Blind search is actually the worse algoritm in this scenario while the A* algorithm is the best. You may test it using this system by observing the time unit that the computer use, the exposed solutions and the solution steps obtained by different algo.
Hope this help :)