制作地图和寻路人工智能
我想从谷歌地球追溯地图,然后这些地图将用于计算从 A 到 B 的最快路线以及由某些因素定义的位置概率。我该如何去做这些事情呢?我的第一个想法是 pygame 并使用一些已经制作的游戏或使用它们作为模板。
I want to retrace maps from google earth these maps would then be used for calculating fastest route from A to B as well as location probability defined by some factors. How would i go about doing these? My first thought is pygame and using some already made ones or using them as a template.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在路由应用程序上工作了一段时间。最常见的算法是从两端(起点和终点)开始并向彼此移动,遍历所有可能的行进方法。中间相交的树枝将是你理想的道路。
您可以通过在代码中设置检查以每个时间步仅移动 x 距离来适当地权衡某些因素,例如速度限制。
这些应该对你有用:
良好的图遍历算法
链接
http://en.wikipedia.org/wiki/A*_search_algorithm/
地图路由,像 Google 地图一样吗?
I've worked on a routing application for a while. The most common algorithm for this is to start on both ends (start and finish) and move towards each other, traversing all possible methods of travel. The branches that meet in the middle will be your ideal path.
You can weight things appropriately, like speed limit, by setting checks in the code to only move x distance every time step.
These should do you:
Good graph traversal algorithm
Link
http://en.wikipedia.org/wiki/A*_search_algorithm/
Map Routing, a la Google Maps?
您是否看过 Google 地图而不是 Google 地球?它有道路和路由引擎。
Have you looked at Google Maps, rather than Google Earth? This has roads and a routing engine.