Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';UnityEnvironment&x27;对象没有属性';行为规范&x27;_Python_Unity3d_Machine Learning_Reinforcement Learning_Ml Agent - Fatal编程技术网

Python ';UnityEnvironment&x27;对象没有属性';行为规范&x27;

Python ';UnityEnvironment&x27;对象没有属性';行为规范&x27;,python,unity3d,machine-learning,reinforcement-learning,ml-agent,Python,Unity3d,Machine Learning,Reinforcement Learning,Ml Agent,我遵循这一点来创造自己的环境 但是当我运行这个 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 (mo

我遵循这一点来创造自己的环境

但是当我运行这个

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'
回溯(最近一次呼叫最后一次):
文件“index.py”,第6行,在
行为\名称=环境行为\规范键()
AttributeError:“UnityEnvironment”对象没有属性“behavior\u spec”
尽管事实上这正是如图所示的片段


我通过以下方式创建了环境(它没有大脑),并且我能够通过.conf文件训练模型。现在我想连接到python API

您需要使用稳定的文档和稳定的回购(发行标签)来实现稳定的结果。UnityML代理每隔几个月更改一次它的语法,所以如果您遵循主分支,这就是问题所在

env.get_behavior_spec(behavior_name: str)
应该能解决你的问题


行为\u name:str
给出了一些语法错误。我需要用什么东西替换它吗?就像我在.yaml文件中使用
行为:RollerBall: