Fix: StateObservable sometimes having wrong low-bound

This commit is contained in:
Dominik Moritz Roth 2022-12-13 19:50:57 +01:00
parent f421c92f83
commit 35864d4b38

View File

@ -250,7 +250,7 @@ class StateObservable(Observable):
self.reset() self.reset()
num = len(self.entities)*2+len(self._timeoutEntities) + \ num = len(self.entities)*2+len(self._timeoutEntities) + \
self.speedAgent*2 + self.include_rand self.speedAgent*2 + self.include_rand
return spaces.Box(low=0-1*self.coordsRelativeToAgent, high=1, return spaces.Box(low=0-1*(self.coordsRelativeToAgent or self.speedAgent), high=1,
shape=(num,), dtype=np.float64) shape=(num,), dtype=np.float64)
def get_observation(self): def get_observation(self):