lit_sb3.wrappers.atari.warp_frame
source module lit_sb3.wrappers.atari.warp_frame
Classes
-
WarpFrame — Convert to grayscale and warp frames to 84x84 (default).
source class WarpFrame(env: gym.Env, width: int = 84, height: int = 84)
Bases : gym.ObservationWrapper[np.ndarray, int, np.ndarray]
Convert to grayscale and warp frames to 84x84 (default).
as done in the Nature paper and later work.
Parameters
-
env : gym.Env — Environment to wrap
-
width : int — New frame width
-
height : int — New frame height
Attributes
-
metadata : dict[str, Any] — attr:
Env:attr:metadata. -
render_mode : str | None — attr:
Env:attr:render_mode. -
spec : EnvSpec | None — attr:
Env:attr:specattribute with theWrapperSpecif the wrapper inherits fromEzPickle. -
action_space : spaces.Space[ActType] | spaces.Space[WrapperActType] — attr:
Env:attr:action_spaceunless overwritten then the wrapper :attr:action_spaceis used. -
unwrapped : Env[ObsType, ActType] — Returns the base environment of the wrapper.
-
np_random_seed : int | None — attr:
np_random_seed. -
np_random : np.random.Generator — attr:
Env:attr:np_randomattribute.
Methods
-
observation — Returns the current observation from a frame.
source method WarpFrame.observation(frame: np.ndarray) → np.ndarray
Returns the current observation from a frame.
Parameters
-
frame : np.ndarray — environment frame
Returns
-
np.ndarray — the observation