Exemplo n.º 1
0
 def __init__(self, device: TorchDevice) -> None:
     env_raw = make_atari("BreakoutNoFrameskip-v4")
     self.__env_train = wrap_deepmind(env_raw, episode_life=True)
     env_raw = make_atari("BreakoutNoFrameskip-v4")
     self.__env_eval = wrap_deepmind(env_raw, episode_life=True)
     self.__env = self.__env_train
     self.__device = device
Exemplo n.º 2
0
 def __init__(self, device: TorchDevice) -> None:
     env_raw = make_atari("BreakoutNoFrameskip-v4")  # 加载预有的breakout模型
     self.__env_train = wrap_deepmind(env_raw, episode_life=True)  # 训练环境
     env_raw = make_atari("BreakoutNoFrameskip-v4")  # 加载预有的breakout模型
     self.__env_eval = wrap_deepmind(env_raw, episode_life=True)  # 测试环境
     self.__env = self.__env_train  # 默认为训练环境
     self.__device = device