我按照这个链接到文档来创建我自己的环境。
但是当我运行这个
from mlagents_envs.environment import UnityEnvironment
env = UnityEnvironment(file_name="v1-ball-cube-game.x86_64")
env.reset()
behavior_names = env.behavior_spec.keys()
print(behavior_names)
弹出游戏窗口,然后终端显示错误提示
Traceback (most recent call last):
File "index.py", line 6, in <module>
behavior_names = env.behavior_spec.keys()
AttributeError: 'UnityEnvironment' object has no attribute 'behavior_spec'
尽管这是文档中显示的确切片段。
我按照这个(它没有大脑)创建了环境,并且我能够通过 .conf 文件训练模型。现在我想连接到 python API。