Is A* the best pathfinding algorithm?

前端 未结 4 1916
春和景丽
春和景丽 2020-12-22 17:40

It is generally said that A* is the best algorithm to solve pathfinding problems.

Is there any situation when A* is not the best algorithm

4条回答
  •  难免孤独
    2020-12-22 18:12

    I see question is old but probably this practical solution will be useful for someone. Recently I found very nice open source code written in python

    code contains next pathfinding algorithms:

    • A*
    • Dijkstra
    • Best-First
    • Bi-directional A*
    • Breadth First Search (BFS)
    • Iterative Deeping A* (IDA*)

    changing the matrix size and values allows to feel difference between different path finding algorithms. As it is mentioned on Wikipedia: "A* is complete and will always find a solution if one exists"

提交回复
热议问题