def __init__(self, env, gym_core_id=None):
super(GymCoreObservation, self).__init__(env)
if gym_core_id is None:
# self.spec is None while inside of the make, so we need
# to pass gym_core_id in explicitly there. This case will
# be hit when instantiating by hand.
gym_core_id = self.spec._kwargs['gym_core_id']
self._reward_n = None
self._done_n = None
self._info_n = None
self._gym_core_env = gym.spec(gym_core_id).make()
评论列表
文章目录