implementing a star a to solve n puzzle insight into