def __init__(self):
self.min_action = -1.0
self.max_action = 1.0
self.min_position = -1.2
self.max_position = 0.6
self.max_speed = 0.07
self.goal_position = 0.45 # was 0.5 in gym, 0.45 in Arnaud de Broissia's version
self.power = 0.0015
self.init_red = 0.0025
self.low_state = np.array([self.min_position, -self.max_speed])
self.high_state = np.array([self.max_position, self.max_speed])
self.viewer = None
self.pro_action_space = spaces.Box(self.min_action, self.max_action, shape = (1,))
# Adversarial space is continuous on gravity here
grav_change_abs = np.array([0.0025])
self.adv_action_space = spaces.Box(-grav_change_abs,grav_change_abs)
self.observation_space = spaces.Box(self.low_state, self.high_state)
self._seed()
self.reset()
评论列表
文章目录