popgym.wrappers.antialias

Module Contents

Classes

Antialias

Wrapper that undoes aliasing produces by the PreviousAction wrapper

Attributes

IS_T0

popgym.wrappers.antialias.IS_T0 = 'is_t0'
class popgym.wrappers.antialias.Antialias(env: popgym.core.env.POPGymEnv)

Bases: popgym.core.wrapper.POPGymWrapper

Wrapper that undoes aliasing produces by the PreviousAction wrapper

Outputs a boolean flag denoting whether the observation was taken at the first timestep.

Args:

env: The environment

Returns:

A gym environment with a Discrete(2) appended to the observation space

static antialias_obs_space(observation_space: gymnasium.spaces.Space) gymnasium.spaces.Space
static antialias_obs(observation_space: gymnasium.spaces.Space, obs: gymnasium.core.ObsType, is_t0: bool) gymnasium.core.ObsType
step(action: gymnasium.core.ActType) Tuple[gymnasium.core.ObsType, float, bool, bool, dict]

Uses the step() of the env that can be overwritten to change the returned data.

reset(**kwargs)

Uses the reset() of the env that can be overwritten to change the returned data.