From 29b0e990323f16b752e61d15656a98f3fb68b10b Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:19:46 -0400 Subject: [PATCH] when in the maze slider, give some points to the seen coords --- pokemonred_puffer/environment.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index a10010c..ca8abc4 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -1180,13 +1180,14 @@ def get_game_coords(self): return (self.read_m(0xD362), self.read_m(0xD361), self.read_m(0xD35E)) def update_seen_coords(self): - if not (self.read_m("wd736") & 0b1000_0000): - x_pos, y_pos, map_n = self.get_game_coords() - self.seen_coords[(x_pos, y_pos, map_n)] = 1 - # TODO: Turn into a wrapper? - self.explore_map[local_to_global(y_pos, x_pos, map_n)] = 1 - # self.seen_global_coords[local_to_global(y_pos, x_pos, map_n)] = 1 - self.seen_map_ids[map_n] = 1 + inc = 0.25 if (self.read_m("wd736") & 0b1000_0000) else 1 + + x_pos, y_pos, map_n = self.get_game_coords() + self.seen_coords[(x_pos, y_pos, map_n)] = inc + # TODO: Turn into a wrapper? + self.explore_map[local_to_global(y_pos, x_pos, map_n)] = inc + # self.seen_global_coords[local_to_global(y_pos, x_pos, map_n)] = 1 + self.seen_map_ids[map_n] = 1 def get_explore_map(self): explore_map = np.zeros(GLOBAL_MAP_SHAPE)