popgym.wrappers.discrete_action

Module Contents

Classes

DiscreteAction

Wrapper that converts a MultiDiscrete into a single Discrete action.

Attributes

PREV_ACTION

popgym.wrappers.discrete_action.PREV_ACTION = 'prev_action'
class popgym.wrappers.discrete_action.DiscreteAction(env: popgym.core.env.POPGymEnv)

Bases: popgym.core.wrapper.POPGymWrapper

Wrapper that converts a MultiDiscrete into a single Discrete action.

Args:

env: The environment

Returns:

A gym environment

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.