remove minor attributes from BP

This commit is contained in:
Onur
2022-07-13 09:52:51 +02:00
parent 14ee580473
commit ce00996782
6 changed files with 21 additions and 24 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ class TimeAwareObservation(gym.ObservationWrapper):
super().__init__(env)
assert isinstance(env.observation_space, Box)
low = np.append(self.observation_space.low, 0.0)
high = np.append(self.observation_space.high, np.inf)
high = np.append(self.observation_space.high, 1.0)
self.observation_space = Box(low, high, dtype=self.observation_space.dtype)
self.t = 0
@@ -51,7 +51,7 @@ class TimeAwareObservation(gym.ObservationWrapper):
Returns:
The observation with the time step appended to
"""
return np.append(observation, self.t)
return np.append(observation, self.t/self.env.spec.max_episode_steps)
def step(self, action):
"""Steps through the environment, incrementing the time step.