diff --git a/mo_gymnasium/envs/deep_sea_treasure/deep_sea_treasure.py b/mo_gymnasium/envs/deep_sea_treasure/deep_sea_treasure.py index 374c15a0..479a880b 100644 --- a/mo_gymnasium/envs/deep_sea_treasure/deep_sea_treasure.py +++ b/mo_gymnasium/envs/deep_sea_treasure/deep_sea_treasure.py @@ -212,10 +212,16 @@ def _get_map_value(self, pos): return self.sea_map[pos[0]][pos[1]] def _is_valid_state(self, state): - if state[0] >= 0 and state[0] <= 10 and state[1] >= 0 and state[1] <= 10: - if self._get_map_value(state) != -10: - return True - return False + if self.map_name == "mirrored": + if state[0] >= 0 and state[0] <= 10 and state[1] >= 0 and state[1] <= 19: + if self._get_map_value(state) != -10: + return True + return False + else: + if state[0] >= 0 and state[0] <= 10 and state[1] >= 0 and state[1] <= 10: + if self._get_map_value(state) != -10: + return True + return False def render(self): if self.render_mode is None: