diff --git a/CHANGES.md b/CHANGES.md index e2afeb36b..e7a8659d5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## 0.7.1 + +* fix discrete and multi-discrete action space filtering + ## 0.7.0 * move some buggy games from the `stable` integrations folder to `experimental` diff --git a/retro/retro_env.py b/retro/retro_env.py index bb74a0e50..a5de20a5e 100644 --- a/retro/retro_env.py +++ b/retro/retro_env.py @@ -91,7 +91,6 @@ def __init__(self, game, state=retro.State.DEFAULT, scenario=None, info=None, us core = retro.get_system_info(self.system) self.buttons = core['buttons'] self.num_buttons = len(self.buttons) - self.button_combos = self.data.valid_actions() try: assert self.data.load(info_path, scenario_path), 'Failed to load info (%s) or scenario (%s)' % (info_path, scenario_path) @@ -99,6 +98,7 @@ def __init__(self, game, state=retro.State.DEFAULT, scenario=None, info=None, us del self.em raise + self.button_combos = self.data.valid_actions() if use_restricted_actions == retro.Actions.DISCRETE: combos = 1 for combo in self.button_combos: