From 2f42af629b464da42ab78303cee203299b85f636 Mon Sep 17 00:00:00 2001 From: Kallinteris Andreas <30759571+Kallinteris-Andreas@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:18:16 +0200 Subject: [PATCH] `MuJoCo/Ant` clarify the lack of `use_contact_forces` on v3 (and older) (#342) --- gymnasium/envs/mujoco/ant_v4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gymnasium/envs/mujoco/ant_v4.py b/gymnasium/envs/mujoco/ant_v4.py index bfb2290e5..8c0c5676b 100644 --- a/gymnasium/envs/mujoco/ant_v4.py +++ b/gymnasium/envs/mujoco/ant_v4.py @@ -84,7 +84,7 @@ class AntEnv(MujocoEnv, utils.EzPickle): | 26 |angular velocity of the angle between back right links | -Inf | Inf | ankle_4 (right_back_leg) | hinge | angle (rad) | - If `use_contact_forces` is `True` then the observation space is extended by 14*6 = 84 elements, which are contact forces + If version < `v4` or `use_contact_forces` is `True` then the observation space is extended by 14*6 = 84 elements, which are contact forces (external forces - force x, y, z and torque x, y, z) applied to the center of mass of each of the links. The 14 links are: the ground link, the torso link, and 3 links for each leg (1 + 1 + 12) with the 6 external forces. @@ -116,7 +116,7 @@ class AntEnv(MujocoEnv, utils.EzPickle): The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost*. - But if `use_contact_forces=True` + But if `use_contact_forces=True` or version < `v4` The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost - contact_cost*. In either case `info` will also contain the individual reward terms.