Feature EngineeringΒΆ
To add multiple transformations to the observations of your environment, follow the following steps:
Subclass
hearts_gym.envs.ObsTransform.Implement a
transformmethod with the same signature as given by the superclass.Add the newly implemented class to the list of transformations
obs_transformsinconfiguration.py, for example like this:# Note that we are adding instances of the class. obs_transforms: List[ObsTransform] = [ MyObsTransform(), ]
Adjust the first definition of the
obs_spacevariable in theHeartsEnv.__init__method according to the observation space you receive after running through all transformations. Look through thegym.spacesmodule for help with this step.
The transformations in obs_transforms will be applied in order of
appearing in the list.