Skip to content

Commit

Permalink
Fixing termination (Farama-Foundation#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
reginald-mclean committed Jul 28, 2023
1 parent b4341e6 commit 844d76d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metaworld/envs/mujoco/sawyer_xyz/sawyer_xyz_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,11 @@ def step(self, action):
dtype=np.float64,
)
reward, info = self.evaluate_state(self._last_stable_obs, action)
done = True if int(info["success"]) == 1 else False
# step will never return a terminal if there is a success
return (
np.array(self._last_stable_obs, dtype=np.float64),
reward,
done,
False,
False,
info,
)
Expand Down

0 comments on commit 844d76d

Please sign in to comment.