Skip to content

Commit

Permalink
Fix state type to int32
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre committed Sep 7, 2024
1 parent 2c87eb5 commit e46204b
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 @@ -42,8 +42,8 @@ class FishWood(gym.Env, EzPickle):
"""

metadata = {"render_modes": ["human"]}
FISH = np.array([0])
WOOD = np.array([1])
FISH = np.array([0], dtype=np.int32)
WOOD = np.array([1], dtype=np.int32)
MAX_TS = 200

def __init__(self, render_mode: Optional[str] = None, fishproba=0.1, woodproba=0.9):
Expand Down Expand Up @@ -89,7 +89,7 @@ def step(self, action):
rewards[self.FISH] = 1.0

# Execute the action
self._state = np.array([action])
self._state = np.array([action], dtype=np.int32)
self._timestep += 1

if self.render_mode == "human":
Expand Down

0 comments on commit e46204b

Please sign in to comment.