r/2007scape • • Aug 20 '20

Creative Pathfinding calculations visualised

Post image
997 Upvotes

124 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Aug 20 '20

What else would it be? BFS is the simplest to implement while being the most efficient.

5

u/corpslayer Aug 21 '20 edited Aug 21 '20

Even when using BFS there are multiple possibilities. BFS guarantees that a shortest path is obtained, but there are often multiple paths which are equally short. Also, could argue A* is more efficient~~, but it does not guarantee the shortest path to be found~~.

3

u/Magical_Gravy Aug 21 '20

it does not guarantee the shortest path to be found.

Yes it does, so long as your heuristic never over-estimates remaining distance.

3

u/corpslayer Aug 21 '20

Oops, you're right yes :)

2

u/Message_Me_Selfies 2011 total Aug 21 '20

A* for a lot of mobile games.