From 14cc600a78b31da7bb9200293d0936fe497cf208 Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Sun, 23 Jun 2024 21:53:28 -0400 Subject: [PATCH] fix event agent stats --- pokemonred_puffer/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index b871477..722c350 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -1113,7 +1113,7 @@ def agent_stats(self, action): "pokecenter": np.sum(self.pokecenters), } | {f"badge_{i+1}": bool(badges & (1 << i)) for i in range(8)}, - "events": {self.events.get_event(event) for event in REQUIRED_EVENTS} + "events": {event: self.events.get_event(event) for event in REQUIRED_EVENTS} | {"rival3": int(self.read_m(0xD665) == 4)}, "reward": self.get_game_state_reward(), "reward/reward_sum": sum(self.get_game_state_reward().values()),