gpt4 book ai didi

python-3.x - openai健身房包厢空间配置

转载 作者:行者123 更新时间:2023-12-03 09:28:39 25 4
gpt4 key购买 nike

我需要一个范围从 [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,)

最佳答案

来自第 130 行的 car_racing 环境 here ,这是使用的描述

self.action_space = spaces.Box(np.array([-1, 0, 0]),
np.array([+1, +1, +1]),
dtype=np.float32) # steer, gas, brake

所以我认为坚持这种格式是好的,这将使您的代码
spaces.Box(np.array([0]), np.array([inf]),dtype= yourPreferedType ) 

关于python-3.x - openai健身房包厢空间配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55787460/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com