google-deepmind / google-deepmind/dm_control

Reward is always 0 in Hopper

Open
#411 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.7k
Forks
764
PR merge metrics
No merged PRs in 30d

Description

In Hopper, reward is always 0 independent of the action. The problem is that this code which is used in reward calculation in hopper.py get_reward(self, physics) function, always return 0 as the value of standing:
`standing = rewards.tolerance(physics.height(), (_STAND_HEIGHT, 2))`

When I check `env._physics.height()` after environment reset, I saw that the height is initialized as a negative value always. Therefore it is impossible for this code fragment `rewards.tolerance(physics.height(), (_STAND_HEIGHT, 2))` to return 1, since _STAND_HEIGHT is defined as 0.6 for Hopper.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.