Fixed bugged compass Observable

This commit is contained in:
Dominik Moritz Roth 2022-08-27 21:07:31 +02:00
parent 6425a4f829
commit 0a458b863d

View File

@ -301,11 +301,14 @@ class CompassObservable(Observable):
return self._entities
def get_observation_space(self):
self.env.reset()
self.reset()
num = len(self.entities)*2
return spaces.Box(low=-1, high=1,
shape=(num,), dtype=np.float32)
def reset(self):
self._entities = None
def get_observation(self):
obs = []
for entity in self.entities: