How do you solve the 15-puzzle with A-Star or Dijkstra's Algorithm?

后端 未结 9 936
春和景丽
春和景丽 2021-02-02 15:35

I\'ve read in one of my AI books that popular algorithms (A-Star, Dijkstra) for path-finding in simulation or games is also used to solve the well-known \"15-puzzle\".

C

9条回答
  •  不知归路
    2021-02-02 15:37

    For my current experience, on how to solve an 8 puzzle. it is required to create nodes. keep track of each step taken and get the manhattan distance from each following steps, taking/going to the one with the shortest distance. update the nodes, and continue until reaches the goal

提交回复
热议问题