Wrappers for altering the behavior of gym environments.
A wrapper to define a much smaller action space. The initializer takes an environment and a list of button lists:
from nes_py.wrappers import JoypadSpace env = JoypadSpace(env, [ ['NOP'], ['right', 'A'], ['left', 'A'], ['A'], ])
Each button list should contain at least one of:
It is recommended for custom environments to use this wrapper by default. If there are multiple mappings, the package should provide each list and either register a different environment for each, or make note in the documentation for end users. See gym-super-mario-bros for an example of multiple button lists in the actions.py module.