From 62a134ac798f3ed0d5fb4daf1c63b55e154a10fe Mon Sep 17 00:00:00 2001 From: rickstaa Date: Wed, 12 Jul 2023 13:18:49 +0200 Subject: [PATCH] refactor(hopper_v4): add forward/health reward and ctrl cost to step 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. --- gymnasium/envs/mujoco/hopper_v4.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gymnasium/envs/mujoco/hopper_v4.py b/gymnasium/envs/mujoco/hopper_v4.py index 17430c9a2..34651074a 100644 --- a/gymnasium/envs/mujoco/hopper_v4.py +++ b/gymnasium/envs/mujoco/hopper_v4.py @@ -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, }