Rename benchmark variables and add h1 to notebooks

This commit is contained in:
Marek Wolan
2024-06-10 12:58:07 +01:00
parent 2a6a16b222
commit c538aee022
8 changed files with 18 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ class PrimaiteGymEnv(gymnasium.Env):
"""Name of the RL agent. Since there should only be one RL agent we can just pull the first and only key."""
self.episode_counter: int = 0
"""Current episode number."""
self.average_reward_per_episode: Dict[int, float] = {}
self.total_reward_per_episode: Dict[int, float] = {}
"""Average rewards of agents per episode."""
@property
@@ -91,7 +91,7 @@ class PrimaiteGymEnv(gymnasium.Env):
f"Resetting environment, episode {self.episode_counter}, "
f"avg. reward: {self.agent.reward_function.total_reward}"
)
self.average_reward_per_episode[self.episode_counter] = self.agent.reward_function.total_reward
self.total_reward_per_episode[self.episode_counter] = self.agent.reward_function.total_reward
if self.io.settings.save_agent_actions:
all_agent_actions = {name: agent.history for name, agent in self.game.agents.items()}