r/gamedev • • Oct 19 '19

Article New pathfinding algorithm | Factorio

https://factorio.com/blog/post/fff-317
369 Upvotes

33 comments sorted by

View all comments

3

u/SouthOceanJr Oct 19 '19

A* guarantees the shortest path, but when you layer a simplified path finding on top of it, the solution might not be optimal.

11

u/dragbone @dragbone Oct 19 '19 edited Oct 19 '19

That depends if the heuristic is admissible. For more information see https://en.m.wikipedia.org/wiki/Admissible_heuristic

Edit: optimal solutions are overrated anyways (at least in gamedev)

1

u/SouthOceanJr Oct 19 '19

Yes, the hierarchical path finding will be optimal if the simplified path finding uses true weights from the original A*. According to the article, it looks like the the base A* applies a weight of 1 between simplified tiles.