Detached2DCartPolev0Env.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:bullet-gym 作者: benelot 项目源码 文件源码
def configureActions(self, discrete_actions):

        # true if action space is discrete; 5 values; no push, left, right, up & down
        # false if action space is continuous; fx, fy both (-action_force, action_force)
        self.discrete_actions = discrete_actions

        # 5 discrete actions: no push, left, right
        # 2 continuous action elements; fx & fy
        if self.discrete_actions:
            self.action_space = spaces.Discrete(5)
        else:
            self.action_space = spaces.Box(-1.0, 1.0, shape=(2,))

        # Our observations can be within this box
        float_max = np.finfo(np.float32).max
        self.observation_space = gym.spaces.Box(-float_max, float_max, self.state_shape)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号