| 16 | |
| 17 | |
| 18 | class MapState(gym.ObservationWrapper): |
| 19 | def __init__(self, env, map_func): |
| 20 | gym.ObservationWrapper.__init__(self, env) |
| 21 | self._func = map_func |
| 22 | |
| 23 | def observation(self, obs): |
| 24 | return self._func(obs) |
| 25 | |
| 26 | |
| 27 | class FrameStack(gym.Wrapper): |