简体   繁体   English

从 Map 数据创建 OpenAI Gym 环境

[英]Creating OpenAI Gym Environment from Map Data

I am just starting out with reinforcement learning and trying to create a custom environment with OpenAI gym.我刚开始使用强化学习并尝试使用 OpenAI 健身房创建自定义环境。 However, I am stumped with trying to create an environment (with roads and intersections) from map data, say Google Maps.然而,我很难用谷歌地图等 map 数据创建一个环境(有道路和十字路口)。

Would appreciate any help I can get.将不胜感激我能得到的任何帮助。

The best way that I have found would be to use osmnx to have your map data ready in a graph format.我发现最好的方法是使用osmnx以图形格式准备好 map 数据。 It allows easy access of nodes that make up a street map in a graph or geopandas form.它允许以图形或 geopandas 形式轻松访问构成街道 map 的节点。 This data can then be used to drive the game logic.然后可以使用此数据来驱动游戏逻辑。 With regards to rendering, external rendering tools like PyGame can then be used.关于渲染,可以使用 PyGame 等外部渲染工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM