题意:在OpenAI Gym环境中配置一个“Box”空间
问题背景:
I need an observation space ranging from [0,inf)
我需要一个观察空间,其范围是从 [0, +∞)(0到正无穷大)
I'm new to openai gym, and not sure what the format should be
我是OpenAI Gym的新手,不确定应该使用什么格式。
-
from gym spaces
-
-
((0),())
-
# Box()
-
-
(0, , shape = (1,))
-
# Box(1,)
问题解决:
from the car_racing environment at line 130 here, this is the description used
从这里的第130行关于car_racing
环境的描述来看,这是该环境所使用的描述:
-
self.action_space = (([-1, 0, 0]),
-
([+1, +1, +1]),
-
dtype=np.float32) # steer, gas, brake
so I think it is good to stick to this format , which will make your code
所以我认为坚持这种格式是一个好选择,这会让你的代码...
(([0]), ([inf]),dtype= yourPreferedType )