Skip to content

Commit

Permalink
refactor(hopper_v4): add forward/health reward and ctrl cost to step …
Browse files Browse the repository at this point in the history
…info

This commit adds the 'reward_forward', 'reward_ctrl' and 'reward_survive' to the
info dict that the `step` method returns. This was done to
improve consistency with the other environments.
  • Loading branch information
rickstaa committed Jul 12, 2023
1 parent ee067c7 commit 62a134a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gymnasium/envs/mujoco/hopper_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ def step(self, action):
reward = rewards - costs
terminated = self.terminated
info = {
"reward_forward": forward_reward,
"reward_ctrl": -ctrl_cost,
"reward_survive": healthy_reward,
"x_position": x_position_after,
"x_velocity": x_velocity,
}
Expand Down

0 comments on commit 62a134a

Please sign in to comment.