Fixed bugged compass Observable
This commit is contained in:
parent
6425a4f829
commit
0a458b863d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user