gxm.wrappers#

gxm.wrappers.Wrapper(wrapped[, unwrap])

Base class for wrappers in gxm, over either bare Dynamics or an Environment.

gxm.wrappers.EnvironmentWrapper(wrapped[, ...])

Base class for wrappers that only operate on Environments (need reward/terminated/truncated).

gxm.wrappers.AutoReset(wrapped[, unwrap])

Wrapper that automatically resets an environment on episode end.

gxm.wrappers.ClipReward(wrapped[, unwrap, ...])

Wrapper that clips the reward to a specified range.

gxm.wrappers.Discretize(wrapped, actions[, ...])

Wrapper that discretizes a continuous action space.

gxm.wrappers.EpisodeCounter(wrapped[, unwrap])

A wrapper that counts the number of episodes completed in the environment.

gxm.wrappers.EpisodicLife(wrapped)

A wrapper that makes losing a life in an environment (like Atari games) count as the end of an episode.

gxm.wrappers.Evaluate(wrapped[, unwrap])

gxm.wrappers.FlattenObservation(wrapped[, ...])

Wrapper that adds a rollout method to the environment.

gxm.wrappers.IgnoreTruncation(wrapped)

A wrapper that treats truncation as termination.

gxm.wrappers.RecordEpisodeStatistics(wrapped)

A wrapper that records the episode length \(T\) , episodic return \(J(\tau) = \sum_{t=0}^{T} r_t\) , and discounted episodic return \(G(\tau) = \sum_{t=0}^{T} \gamma^t r_t\) at the end of each episode.

gxm.wrappers.StackObservations(wrapped, n_stack)

Wrapper that stacks the observation along a new axis.

gxm.wrappers.StepCounter(wrapped[, unwrap])

A wrapper that counts the number of steps taken in the environment.

gxm.wrappers.StickyAction(wrapped[, unwrap, ...])

A wrapper that makes actions sticky with a given probability.

gxm.wrappers.TimeLimit(wrapped[, unwrap, ...])

Wrapper that terminates an episode after a fixed number of steps.