lit_sb3.wrappers.atari.clip_reward
source module lit_sb3.wrappers.atari.clip_reward
Classes
-
ClipRewardEnv — Clip the reward to {+1, 0, -1} by its sign.
source class ClipRewardEnv(env: gym.Env)
Bases : gym.RewardWrapper
Clip the reward to {+1, 0, -1} by its sign.
Parameters
-
env : gym.Env — Environment to wrap
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. -
observation_space : spaces.Space[ObsType] | spaces.Space[WrapperObsType] — attr:
Env:attr:observation_spaceunless overwritten then the wrapper :attr:observation_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
-
reward — Bin reward to {+1, 0, -1} by its sign.
source method ClipRewardEnv.reward(reward: SupportsFloat) → float
Bin reward to {+1, 0, -1} by its sign.
Parameters
-
reward : SupportsFloat
-
reward : SupportsFloat — The reward to process.