First of all, sorry for not responding earlier. This post dropped off my radar and I forgot to follow it up.
You should only be removing items from the open list when you traverse them. That is, at the very top of the processing loop you search the open list for the node with the lowest cost. Once you find it, you remove it from the open list, then test to see if that node is in the closed list. If it is, then you loop back to the start and find the next node. Otherwise, you add the node to the closed list, and proceed with the rest of the processing using that node. You should never remove nodes from the closed list, as this represents nodes that you've already visited.
Show differencesHistory of post edits
#1Postie
Posted 18 March 2012 - 05:03 AM
<p> </p>
<div>First of all, sorry for not responding earlier. This post dropped off my radar and I forgot to follow it up.</div>
<div> </div>
<div>You should only be removing items from the open list when you traverse them. That is, at the very top of the processing loop you search the open list for the node with the lowest cost. Once you find it, you remove it from the open list, then test to see if that node is in the closed list. If it is, then you loop back to the start and find the next node. Otherwise, you add the node to the closed list, and proceed with the rest of the processing using that node. You should never remove nodes from the closed list, as this represents nodes that you've already visited.</div>
<div> </div>
<div>First of all, sorry for not responding earlier. This post dropped off my radar and I forgot to follow it up.</div>
<div> </div>
<div>You should only be removing items from the open list when you traverse them. That is, at the very top of the processing loop you search the open list for the node with the lowest cost. Once you find it, you remove it from the open list, then test to see if that node is in the closed list. If it is, then you loop back to the start and find the next node. Otherwise, you add the node to the closed list, and proceed with the rest of the processing using that node. You should never remove nodes from the closed list, as this represents nodes that you've already visited.</div>
<div> </div>