Sch*_*ton 7 python-3.x openai-gym
我需要一个范围为 [0,inf) 的观察空间
我是 openai 健身房的新手,不确定应该是什么格式
from gym spaces
spaces.Box(np.array(0),np.array(np.inf))
# Box()
spaces.Box(0, np.inf, shape = (1,))
# Box(1,)
Run Code Online (Sandbox Code Playgroud)
小智 5
来自此处第 130 行的 car_racing 环境,这是使用的描述
self.action_space = spaces.Box(np.array([-1, 0, 0]),
np.array([+1, +1, +1]),
dtype=np.float32) # steer, gas, brake
Run Code Online (Sandbox Code Playgroud)
所以我认为坚持这种格式是好的,这将使您的代码
spaces.Box(np.array([0]), np.array([inf]),dtype= yourPreferedType )
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2575 次 |
| 最近记录: |