Other
This ia a 8 puzzle implementation using a star search algorithm with Manhattan Distance heuristic model.
It consists of a board with 8 numbers on it, the goal is to put these numbers in order by awapping them in between the blank tile. if the final state can not be reached because of the ordering then it gives an error saying that Final State Can not be reached.
Search algorithm used is A* search, which is really similar to Dijsktra. 8 Puzzle is a standard artificial intelligence problem.
For more information on 8 Puzzle problem visit this link: http://en.wikipedia.org/wiki/15_puzzle
Once you put your initial state , it will find the shortest path to final state and then print that path.
Things to know : queue,stack,lists,dynamic arrays,a* algorithm
java
实现
PuzzleJava
No comment