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

Posted by Sean on Stack Overflow See other posts from Stack Overflow or by Sean
Published on 2008-09-18T17:56:20Z Indexed on 2010/05/22 22:10 UTC
Read the original article Hit count: 424

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".

Can anyone give me some pointers on how I would reduce the 15-puzzle to a graph of nodes and edges so that I could apply one of these algorithms?

If I were to treat each node in the graph as a game state then wouldn't that tree become quite large? Or is that just the way to do it?

© Stack Overflow or respective owner

Related posts about homework

Related posts about artificial-intelligence