def __init__(self, env, actions):
super().__init__(env)
acsp = self.env.action_space
assert isinstance(acsp, Box), "action space not continuous"
self.actions = np.array(actions)
assert self.actions.shape[1:] == acsp.shape, "shape of actions does not match action space"
self.action_space = Discrete(self.actions.shape[0])
评论列表
文章目录