Pathfinding - A* with least turns

后端 未结 3 2000
清酒与你
清酒与你 2020-12-03 09:24

Is it possible to modify A* to return the shortest path with the least number of turns?

One complication: Nodes can no longer be distinguished solel

3条回答
  •  旧时难觅i
    2020-12-03 09:39

    Is it possible to modify A* to return the shortest path with the least number of turns?

    It is most likely not possible. The reason being that it is an example of the weight-constrained shortest path problem. It is therefore NP-Complete and cannot be solved efficiently.

    You can find papers that discuss solving this problem e.g. http://web.stanford.edu/~shushman/math15_report.pdf

提交回复
热议问题