src.plangym.videogames.retro#
Implement the plangym API for retro environments.
Classes#
Wrap a gym-retro environment and make it use discrete actions for the Sonic game. |
|
Environment for playing |
Module Contents#
- class src.plangym.videogames.retro.ActionDiscretizer(env, actions=None)[source]#
Bases:
gymnasium.ActionWrapperWrap a gym-retro environment and make it use discrete actions for the Sonic game.
- buttons = ['B', 'A', 'MODE', 'START', 'UP', 'DOWN', 'LEFT', 'RIGHT', 'C', 'Y', 'X', 'Z']#
- actions#
- _actions = []#
- action_space#
Return the
Envaction_spaceunless overwritten then the wrapperaction_spaceis used.
- class src.plangym.videogames.retro.RetroEnv(name, frameskip=5, episodic_life=False, autoreset=True, delay_setup=False, remove_time_limit=True, obs_type='rgb', render_mode=None, wrappers=None, **kwargs)[source]#
Bases:
plangym.videogames.env.VideogameEnvEnvironment for playing
gym-retrogames.- Parameters:
name (str)
frameskip (int)
episodic_life (bool)
autoreset (bool)
delay_setup (bool)
remove_time_limit (bool)
obs_type (str)
render_mode (str | None)
wrappers (Iterable[plangym.core.wrap_callable] | None)
- AVAILABLE_OBS_TYPES#
- SINGLETON = True#
- static get_win_condition(info)[source]#
Get win condition for games that have the end of the screen available.
- Parameters:
info (dict[str, Any])
- Return type:
bool