diff --git a/game.py b/game.py index 174d5af..bdfa2c8 100644 --- a/game.py +++ b/game.py @@ -12,7 +12,7 @@ class Game: pygame.init() self.screen = pygame.display.set_mode( - (WIDTH, HEIGHT), pygame.HIDDEN) + (WIDTH, HEIGHT)) # , pygame.HIDDEN) pygame.display.set_caption('Pneuma') diff --git a/main.py b/main.py index d0059f8..404a21e 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ np.random.seed(1) T.manual_seed(1) n_episodes = 10000 -game_len = 20000 +game_len = 5000 figure_file = 'plots/score.png' @@ -68,14 +68,14 @@ for i in tqdm(range(n_episodes)): if avg_score[player.player_id] > best_score[player.player_id]: best_score[player.player_id] = avg_score[player.player_id] print(f"Saving models for agent {player.player_id}...") - player.agent.save_models(actr_chkpt = f"player_{player.player_id}_actor", crtc_chkpt = f"player_{player.player_id}_critic") + player.agent.save_models( + actr_chkpt=f"player_{player.player_id}_actor", crtc_chkpt=f"player_{player.player_id}_critic") print("Models saved ...\n") print( f"\nCumulative score for player {player.player_id}: {score_history[0][i]}\nAverage score for player {player.player_id}: {avg_score[player.player_id]}\nBest score for player {player.player_id}: {best_score[player.player_id]}") - plt.plot(score_history[0]) game.quit() diff --git a/tmp/ppo/player_0_actor b/tmp/ppo/player_0_actor deleted file mode 100755 index 3d47cf7..0000000 Binary files a/tmp/ppo/player_0_actor and /dev/null differ diff --git a/tmp/ppo/player_0_critic b/tmp/ppo/player_0_critic deleted file mode 100755 index f11f82b..0000000 Binary files a/tmp/ppo/player_0_critic and /dev/null differ