Ejemplo n.º 1
0
 def create_environment() -> gym.Env:
     """Factory method for environment initialization in Dopmamine."""
     env = wrappers.ImageObservation(raw_env, OBSERVATION_SHAPE)
     if FLAGS.verbose:
         env = terminal_logging.wrap_environment(env, log_every=True)  # pytype: disable=wrong-arg-types
     env = gym_wrapper.GymFromDMEnv(env)
     env.game_over = False  # Dopamine looks for this
     return env
Ejemplo n.º 2
0
 def create_environment() -> gym.Env:
     """Factory method for environment initialization in Dopmamine."""
     env = bsuite.load_and_record(
         bsuite_id=bsuite_id,
         save_path=FLAGS.save_path,
         logging_mode=FLAGS.logging_mode,
         overwrite=FLAGS.overwrite,
     )
     env = wrappers.ImageObservation(env, OBSERVATION_SHAPE)
     if FLAGS.verbose:
         env = terminal_logging.wrap_environment(env, log_every=True)
     env = gym_wrapper.GymWrapper(env)
     env.game_over = False  # Dopamine looks for this
     return env
Ejemplo n.º 3
0
 def make_object_under_test(self):
     env = catch.Catch()
     return wrappers.ImageObservation(env, (84, 84, 4))