From 669b7e1b438f2427f3aeb458f937055c9e7de00b Mon Sep 17 00:00:00 2001 From: NM512 Date: Thu, 26 Sep 2024 23:05:30 +0900 Subject: [PATCH] fixed observation space for minecraft --- envs/minecraft_base.py | 6 +++--- envs/setup_scripts/minecraft.sh | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/envs/minecraft_base.py b/envs/minecraft_base.py index d6d18dd..1352d70 100644 --- a/envs/minecraft_base.py +++ b/envs/minecraft_base.py @@ -77,9 +77,9 @@ class MinecraftBase(gym.Env): "health": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.float32), "hunger": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.float32), "breath": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.float32), - "is_first": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.uint8), - "is_last": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.uint8), - "is_terminal": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.uint8), + "is_first": gym.spaces.Box(0, 1, (1,), dtype=np.uint8), + "is_last": gym.spaces.Box(0, 1, (1,), dtype=np.uint8), + "is_terminal": gym.spaces.Box(0, 1, (1,), dtype=np.uint8), **{ f"log_{k}": gym.spaces.Box(-np.inf, np.inf, (1,), dtype=np.int64) for k in self._inv_keys diff --git a/envs/setup_scripts/minecraft.sh b/envs/setup_scripts/minecraft.sh index 4462354..0bae014 100644 --- a/envs/setup_scripts/minecraft.sh +++ b/envs/setup_scripts/minecraft.sh @@ -9,8 +9,4 @@ # $ conda install -c conda-forge openjdk=8 pip3 install https://github.com/NM512/minerl/releases/download/v0.4.4-patched/minerl_mirror-0.4.4-cp311-cp311-linux_x86_64.whl -# Downgrade to install old gym -pip3 install setuptools==60.0.0 -pip3 install pip==22.0 -pip3 install gym==0.19.0 -pip3 install cloudpickle==2.2.1 +pip3 install cloudpickle==3.0.0