Skip to content

Commit

Permalink
Add env infos for custom hopper and walker env
Browse files Browse the repository at this point in the history
  • Loading branch information
hartikainen committed Jan 1, 2019
1 parent c2419b6 commit 94f7809
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion softlearning/environments/gym/mujoco/hopper_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def step(self, action):
observation = self._get_obs()
reward = rewards - costs
done = self.done
info = {}
info = {
'x_position': x_position_after,
'x_velocity': x_velocity,
}

return observation, reward, done, info

Expand Down
5 changes: 4 additions & 1 deletion softlearning/environments/gym/mujoco/walker2d_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ def step(self, action):
observation = self._get_obs()
reward = rewards - costs
done = self.done
info = {}
info = {
'x_position': x_position_after,
'x_velocity': x_velocity,
}

return observation, reward, done, info

Expand Down

0 comments on commit 94f7809

Please sign in to comment.