3

I am currently studying pathfinding and I came across A* algorithm from this site https://github.com/qiao/PathFinding.js

I tried to test A* with bi-directional and it is working great.

An a* path

What I wanna do now is increase the path that it can make without adding more nodes in the openlist.

For example is that the algorithm was able to find a path but as you look at the results it can still generate one more path without touching the other path.

two distinct paths

Any ideas?

1 Answer 1

5

For finding

one more path without touching the other path

just remove the squares of the first path (except the start and ending square) from the map and run A* again.

3
  • meaning make it like blockable? though.. if you will run the pathfinder again.. isnt it using too much resources? there is really no other way?
    – Macross
    Mar 13, 2014 at 23:08
  • @Macross: yes, you have to block the squares you want to exclude from your second search. No, I don't think there's a better way, since when squares become blocked, this can change the whole topology of your search graph.
    – Doc Brown
    Mar 14, 2014 at 4:39
  • well, I guess you are right... I tried to apply it and it also gives gives quite some good results. Thank you...
    – Macross
    Mar 14, 2014 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.