Skip to content

Commit

Permalink
Fix newer Gym support
Browse files Browse the repository at this point in the history
  • Loading branch information
Miffyli committed Aug 23, 2023
1 parent 60e0d07 commit 40a9e35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class _IsAliveObservation(LifeStatsObservation):
def __init__(self):
keys = ['is_alive']
super().__init__(hero_keys=keys, univ_keys=keys,
space=spaces.Box(low=False, high=True, shape=(), dtype=bool),
default_if_missing=True)
space=spaces.Box(low=0, high=1, shape=(), dtype=bool),
default_if_missing=1)


class _LifeObservation(LifeStatsObservation):
Expand Down
1 change: 0 additions & 1 deletion minerl/herobraine/hero/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ class Discrete(gym.spaces.Discrete, MineRLSpace):
def __init__(self, *args, **kwargs):
super(Discrete, self).__init__(*args, **kwargs)
self.eye = np.eye(self.n, dtype=np.float32)
self.shape = ()

def no_op(self, batch_shape=()):
if len(batch_shape) == 0:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gym @ git+https://github.com/minerllabs/gym@minerl-fix
gym>=0.19.0,<=0.23.1
opencv-python>=4.1.0.25
setuptools>=49.2.0
tqdm>=4.32.2
Expand Down

0 comments on commit 40a9e35

Please sign in to comment.