diff --git a/agents/saved_models/A0 b/agents/saved_models/A0 index 10fba3e..c61c8f1 100644 Binary files a/agents/saved_models/A0 and b/agents/saved_models/A0 differ diff --git a/agents/saved_models/C0 b/agents/saved_models/C0 index d04935b..eb5f400 100644 Binary files a/agents/saved_models/C0 and b/agents/saved_models/C0 differ diff --git a/entities/player.py b/entities/player.py index cbb1051..a003a36 100644 --- a/entities/player.py +++ b/entities/player.py @@ -63,6 +63,7 @@ class Player(pygame.sprite.Sprite): no_load=False): self.get_current_state() + self.num_features == self.agent = Agent( input_dims=len(self.state_features), n_actions=len(self._input.possible_actions), @@ -173,7 +174,7 @@ class Player(pygame.sprite.Sprite): enemy_states = [] - for distance, direction, enemy in sorted_distances[:5]: + for distance, direction, enemy in self.distance_direction_from_enemy: enemy_states.extend([ np.exp(-distance), direction[0], diff --git a/figures/actor_loss.png b/figures/actor_loss.png index f1a07df..afce6b8 100644 Binary files a/figures/actor_loss.png and b/figures/actor_loss.png differ diff --git a/figures/critic_loss.png b/figures/critic_loss.png index d3cae22..7e11664 100644 Binary files a/figures/critic_loss.png and b/figures/critic_loss.png differ diff --git a/figures/score.png b/figures/score.png index fcc8638..a235e71 100644 Binary files a/figures/score.png and b/figures/score.png differ diff --git a/figures/total_loss.png b/figures/total_loss.png index 199003c..8ade31a 100644 Binary files a/figures/total_loss.png and b/figures/total_loss.png differ diff --git a/pneuma.py b/pneuma.py index 2efa964..9b6af0c 100644 --- a/pneuma.py +++ b/pneuma.py @@ -223,6 +223,8 @@ if __name__ == "__main__": print(f"\nScore this round for player {player.player_id}:\ {player.stats.exp}") + + # End of training session print("End of episodes.\ \nExiting game...")