Skip to content

Commit

Permalink
Scale window rewards between 0 and 10 (Farama-Foundation#340)
Browse files Browse the repository at this point in the history
* Scale window rewards between 0 and 10

* Fix scaling on dial-turn env
  • Loading branch information
haydenshively committed Apr 2, 2021
1 parent 48f6f68 commit 1ce1848
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_dial_turn_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def compute_reward(self, action, obs):
tcp_opened = 0
object_grasped = reach

reward = reward_utils.hamacher_product(reach, in_place)
reward = 10 * reward_utils.hamacher_product(reach, in_place)

return (reward,
tcp_to_obj,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def compute_reward(self, actions, obs):
tcp_opened = 0
object_grasped = reach

reward = reward_utils.hamacher_product(reach, in_place)
reward = 10 * reward_utils.hamacher_product(reach, in_place)

return (reward,
tcp_to_obj,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def compute_reward(self, actions, obs):
tcp_opened = 0
object_grasped = reach

reward = reward_utils.hamacher_product(reach, in_place)
reward = 10 * reward_utils.hamacher_product(reach, in_place)
return (reward,
tcp_to_obj,
tcp_opened,
Expand Down

0 comments on commit 1ce1848

Please sign in to comment.