Esempio n. 1
0
 def __init__(self, dataset_url=None, ref_max_score=None, ref_min_score=None, **kwargs):
     self.tasks_to_complete = set(self.TASK_ELEMENTS)
     super(KitchenBase, self).__init__(**kwargs)
     OfflineEnv.__init__(
         self,
         dataset_url=dataset_url,
         ref_max_score=ref_max_score,
         ref_min_score=ref_min_score)
Esempio n. 2
0
    def __init__(self, env, **kwargs):
        gym.Wrapper.__init__(self, env)
        OfflineEnv.__init__(self, dataset_url=env.dataset_url, ref_max_score=env.ref_max_score,
                            ref_min_score=env.ref_min_score, **kwargs)

        self.pseudo_action_space = gym.spaces.Discrete(9)  # up, up-right, right, down-right, down, down-left,
                                                           # left, up-left, no-op
        self.disc2cont_actions = {
            0: np.array([0.0, 1.0]),
            1: np.array([1.0, 1.0]),
            2: np.array([1.0, 0.0]),
            3: np.array([1.0, -1.0]),
            4: np.array([0.0, -1.0]),
            5: np.array([-1.0, -1.0]),
            6: np.array([-1.0, 0.0]),
            7: np.array([-1.0, 1.0]),
            8: np.array([0.0, 0.0])
        }
        self._scalar = 0.5  # constant