gxm.wrappers.Wrapper#
- class Wrapper(wrapped, unwrap=True)#
Bases:
Generic[TWrapperState,TStep],Dynamics[TWrapperState,TStep]Base class for wrappers in gxm, over either bare Dynamics or an Environment.
- __init__(wrapped, unwrap=True)#
Methods
__init__(wrapped[, unwrap])get_wrapper(wrapper_type)Retrieve the first wrapper of a specific type from the dynamics.
has_wrapper(wrapper_type)Check if the dynamics or any of its wrappers is of a specific type.
init(key)Initialize the dynamics and return the initial state.
reset(key, state)Reset the dynamics to an initial state.
step(key, state, action)Advance the dynamics by one step given an action.
Attributes
Retrieve the base dynamics by unwrapping all wrappers.
The unique identifier of the dynamics.
The action space of the dynamics.
The observation space of the dynamics.
- action_space: Space#
The action space of the dynamics.
- get_wrapper(wrapper_type)#
Retrieve the first wrapper of a specific type from the dynamics.
- has_wrapper(wrapper_type)#
Check if the dynamics or any of its wrappers is of a specific type.
- Parameters:
wrapper_type (
type[Dynamics]) – The type to check for.- Return type:
bool- Returns:
True if the dynamics or any of its wrappers is of the specified type, False otherwise.
- id: str#
The unique identifier of the dynamics.
- observation_space: Space#
The observation space of the dynamics.
-
unwrap:
bool= True#