diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index abcf0f6..62f948c 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -655,7 +655,9 @@ def step(self, action): state = io.BytesIO() self.pyboy.save_state(state) state.seek(0) - info["state"] = {tuple(required_events): state.read()} + info["state"] = { + tuple(sorted(list(required_events) + list(required_items))): state.read() + } info["required_count"] = len(required_events) + len(required_items) info["env_id"] = self.env_id info = info | self.agent_stats(action)