惰性 A* 实现
我正在开发一款玩具 RTS 游戏,对于路径查找,我依赖于 A*,问题是很多单位正在移动,导致计算的路径变得无效,从而导致 CPU 周期浪费,我必须重新计算这些代理的路径。
所以我想为什么不懒惰地计算路径而不是计算整个路径,我一边走一边不断计算它。谷歌搜索没有出现太多是否有惰性 A* 或任何其他图搜索算法的实现?
I am working on a toy RTS game, for path finding I am relying on A*, problem is alot of units are moving around causing calculated paths to become invalid which is causing wasted CPU cycles, I have to recalculate paths for those agents.
So I thought why not calculate the path lazily instead of calculating the whole path, I keep calculating it as I go along. A google search did not turned up much are there any implementations of lazy A* or any other graph search algorithm?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用D* 算法。实际上,它对于这个目的效果更好。
You could use the D* algorithm. It actually works better for this purpose.