-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtered Actions #245
Comments
A better question might be "What does filtering actually do?" I think if I understood the goal up front, it might make sense and I can figure out the more "correct" solution. |
The point of filtering actions is to prevent your agent from attempting key presses or combinations that aren't useful in the game, to reduce the search space. For example, in Super Mario Bros, unfiltered actions will include the Start button, which pauses the game, but filtered actions won't. |
@endrift is there somewhere you can (or rather are supposed to) edit the filtered actions per game? For Super Metroid for example it's important you can access the start screen during the game, so you can turn on and off different upgrades occasionally. (or refill health as that is one operation that is useful). |
Yes, they can be overridden per game in the scenario.json, see https://github.com/openai/retro/blob/98fe0d328e1568836a46e5fce55a607f47a0c332/retro/data/stable/KidChameleon-Genesis/scenario.json for an example. Each top-level is a set of buttons that can be pressed independently of each other one, so you can press up, down or none × left, right or none × all of the variants in the bottom row. |
Issue summary
I am having issues with the start and select keys being operational for SNES.
in retro_env.py printing "action" prior to filtering, shows a value for select and start, however if you print action after filtering it will show 0.
action = self.data.filter_action(action)
While most games may not require start or select, the game Super Metroid requires both, (one for selecting weapons, and the other for menuing to turn items on and off).
commenting out the filter_action seems to work, but I'm not sure what the larger implications are.
The text was updated successfully, but these errors were encountered: