Skip to content

Commit

Permalink
Fix observation space lower bound
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre committed Sep 7, 2024
1 parent 207da54 commit 2c87eb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mo_gymnasium/envs/fishwood/fishwood.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ def __init__(self, render_mode: Optional[str] = None, fishproba=0.1, woodproba=0

self.action_space = spaces.Discrete(2) # 2 actions, go fish and go wood
# 2 states, fishing and in the woods
self.observation_space = spaces.Box(low=1, high=1, shape=(1,), dtype=np.int32)
self.observation_space = spaces.Box(low=0, high=1, shape=(1,), dtype=np.int32)
# 2 objectives, amount of fish and amount of wood
self.reward_space = spaces.Box(low=np.array([0, 0]), high=np.array([1.0, 1.0]), dtype=np.float32)
self.reward_dim = 2

self._state = self.WOOD
self._state = self.WOOD.copy()

def reset(self, seed=None, **kwargs):
super().reset(seed=seed)

self._state = self.WOOD
self._state = self.WOOD.copy()
self._timestep = 0
if self.render_mode == "human":
self.render()
Expand Down

0 comments on commit 2c87eb5

Please sign in to comment.