if __name__ == "__main__": game = Snake(width=64, height=64) logging.basicConfig(level=logging.INFO) # --- Parse parameters --- parameters = process_args(sys.argv[1:], Defaults) if parameters.deterministic: rng = np.random.RandomState(123456) else: rng = np.random.RandomState() # --- Instantiate environment --- env = PLE_env(rng, game=game, frame_skip=parameters.frame_skip, ple_options={ "display_screen": True, "force_fps": True, "fps": 30 }) # --- Instantiate qnetwork --- qnetwork = MyQNetwork(env, parameters.rms_decay, parameters.rms_epsilon, parameters.momentum, parameters.clip_delta, parameters.freeze_interval, parameters.batch_size, parameters.network_type, parameters.update_rule, parameters.batch_accumulator, rng) # --- Instantiate agent --- agent = ALEAgent( env, qnetwork, parameters.replay_memory_size, max(env.inputDimensions()[i][0]
if __name__ == "__main__": test = False game = flappy.FlappyClone(black=True) # game = Catcher(width=64, height=64) logging.basicConfig(level=logging.INFO) # --- Parse parameters --- parameters = process_args(sys.argv[1:], Defaults) if parameters.deterministic: rng = np.random.RandomState(523456) else: rng = np.random.RandomState() # --- Instantiate environment --- env = PLE_env(rng, game=game, frame_skip=parameters.frame_skip, ple_options={"display_screen": True, "force_fps":not test, "fps":30, "rng":rng}) # --- Instantiate qnetwork --- qnetwork = MyQNetwork( env, parameters.rms_decay, parameters.rms_epsilon, parameters.momentum, parameters.clip_delta, parameters.freeze_interval, parameters.batch_size, parameters.update_rule, rng, neural_network=myNN)
if __name__ == "__main__": game = Snake(width=64, height=64) logging.basicConfig(level=logging.INFO) # --- Parse parameters --- parameters = process_args(sys.argv[1:], Defaults) if parameters.deterministic: rng = np.random.RandomState(123456) else: rng = np.random.RandomState() # --- Instantiate environment --- env = PLE_env(rng, game=game, frame_skip=parameters.frame_skip, ple_options={"display_screen": True, "force_fps":True, "fps":30}) # --- Instantiate qnetwork --- qnetwork = MyQNetwork( env, parameters.rms_decay, parameters.rms_epsilon, parameters.momentum, parameters.clip_delta, parameters.freeze_interval, parameters.batch_size, parameters.network_type, parameters.update_rule, parameters.batch_accumulator, rng)
if __name__ == "__main__": game = Snake(width=64, height=64) logging.basicConfig(level=logging.INFO) # --- Parse parameters --- parameters = process_args(sys.argv[1:], Defaults) if parameters.deterministic: rng = np.random.RandomState(123456) else: rng = np.random.RandomState() # --- Instantiate environment --- env = PLE_env( rng, game=game, frame_skip=parameters.frame_skip, ple_options={"display_screen": True, "force_fps": True, "fps": 30}, ) # --- Instantiate qnetwork --- qnetwork = MyQNetwork( env, parameters.rms_decay, parameters.rms_epsilon, parameters.momentum, parameters.clip_delta, parameters.freeze_interval, parameters.batch_size, parameters.network_type, parameters.update_rule, parameters.batch_accumulator,