Correct formulation of the A* algorithm

Posted by Eli Bendersky on Stack Overflow See other posts from Stack Overflow or by Eli Bendersky
Published on 2009-01-03T11:38:39Z Indexed on 2010/05/22 22:20 UTC
Read the original article Hit count: 243

Hello,

I'm looking at definitions of the A* path-finding algorithm, and it seems to be defined somewhat differently in different places.

The difference is in the action performed when going through the successors of a node, and finding that a successor is on the closed list.

  • One approach (suggested by Wikipedia, and this article) says: if the successor is on the closed list, just ignore it
  • Another approach (suggested here and here, for example) says: if the successor is on the closed list, examine its cost. If it's higher than the currently computed score, remove the item from the closed list for future examination.

I'm confused - which method is correct ? Intuitively, the first makes more sense to me, but I wonder about the difference in definition. Is one of the definitions wrong, or are they somehow isomorphic ?

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about artificial-intelligence