Original Post
Firstly if you are unfamiliar with the 8 puzzle problem take a look at http://www.permadi.com/java/puzzle8/ I have decided to go with using the manhattan distance as my heurisitc, is this the best approach? Secondly what should I do if two states come out with the same value for the heuristic? How do should the program decide which path to follow? At the moment my program is always just following the first state, however this does not always lead to the optimal solution.