popgym.wrappers.flatten

Classes

Flatten

Wrapper that flattens the observation and action spaces

Module Contents

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.

need_flatten_action = False
need_flatten_obs = False
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