popgym.wrappers.flatten

Module Contents

Classes

Flatten

Wrapper that flattens the observation and action spaces

class popgym.wrappers.flatten.Flatten(env: popgym.core.env.POPGymEnv, flatten_action: bool = True, flatten_observation: bool = True)

Bases: popgym.core.wrapper.POPGymWrapper

Wrapper that flattens the observation and action spaces to make them compatible with neural networks.

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.

continuous(space: gymnasium.spaces.Space) bool