An AI algorithm to efficiently solve the 8puzzle with the least amount of moves