javascript-astar icon indicating copy to clipboard operation
javascript-astar copied to clipboard

Can't find a path after a few search

Open wallpap3r opened this issue 10 years ago • 3 comments

currentNode.closed = true and didn't make it dirty so that when a new search begins, the function Graph.cleanDirty() may not reset the closed node, and finally it will result in no valid path

do a search and choose a nearby node for new target can easily reproduce it.

I added graph.makeDirty(currentNode) to fix it, but I didn't test it for a full round

wallpap3r avatar Jul 01 '15 09:07 wallpap3r

+1

wibimaster avatar Jul 08 '15 12:07 wibimaster

+1

bibodha avatar Aug 06 '15 03:08 bibodha

I figured out that bug I think. The "closed" nodes aren't getting cleaned properly between searches. Look here for a fix:

https://github.com/bgrins/javascript-astar/issues/52

manthrax avatar Jun 26 '16 10:06 manthrax