Skip to content

[Bug Report] Humanoid-v4 does not have contact_cost #504

Closed

Description

@Kallinteris-Andreas

Describe the bug

https://gymnasium.farama.org/main/environments/mujoco/humanoid/#rewards

reward = rewards - ctrl_cost

costs = ctrl_cost + contact_cost

the docs still have contact_cost_weight argument

@rodrigodelazcano is it the same reason at the ant contact forces but without the use_contact_forces argument? (#214)

Code example

No response

System info

No response

Additional context

Humanoid Standup is not affected

Checklist

  • I have checked that there is no similar issue in the repo

Activity

  1. rodrigodelazcano commented on May 14, 2023

    @rodrigodelazcano
    Contributor

    At the time I removed it because this reward was almost 0 due to the cost weight. However, I probably missed adding it back. Can you re-add this argument and additional reward so that the user has access to it? Thanks

  2. Kallinteris-Andreas commented on May 14, 2023

    @Kallinteris-Andreas
    CollaboratorAuthor

    I will add it to the change list for v5

  3. Kallinteris-Andreas commented on May 24, 2023

    @Kallinteris-Andreas
    CollaboratorAuthor

    I run a test to verify @rodrigodelazcano's claim that the contact_cost is insignificant:

    Expiation:
    v4 (blue): the v4 as it here, was used for training and evaluation
    v4 (fixed reward) (orange): the v4 with the inclusion of contact_cost, used for training and evaluation
    v4 (fixed reward on eval only) (green): the v4 was used during training, but the v4 with contact_cost was used for evaluation

    Analysis:
    first: comparing (blue) and (orange), we can clearly see that removing contact_cost results in a (similar but) measurably different training trajectory.
    second: comparing (blue) and (green), we can see that the contact_cost is not insignificant, and clearly it is different across different policies.

    Conclusion:
    contact_cost should be included in the v5 release

  4. pseudo-rnd-thoughts commented on May 25, 2023

    @pseudo-rnd-thoughts
    Member

    I agree that including the contact_cost is not equivalent but the performance difference is minimal so I'm not sure if it is worth including the parameter when there is little impact on the environment / agent

  5. Kallinteris-Andreas commented on May 25, 2023

    @Kallinteris-Andreas
    CollaboratorAuthor

    @pseudo-rnd-thoughts That original implementation included contact_cost, and it is an important part of robotic systems. (Note: the user could set contact_cost_weight=0 if they wanted to disable it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions