Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在相当大的图中找到最短路径可能需要一段时间。在某些情况下甚至会持续很长时间。根据我对算法的了解,无法准确判断 A* 需要访问多少个节点才能找到最短路径,但也许至少有一种方法可以估计它?
这将至少为用户提供一个近似的进度,但我想很难以一种好的方式做到这一点。
使用迄今为止看到的最小EstimatedDistanceToEnd(即h(x))将是一个估计,但不一定是一个好的估计。
EstimatedDistanceToEnd
h(x)
也许您应该研究加速算法的方法,或者研究使用更快和/或近似的算法?