Conversation
|
|
||
|
|
||
| @gin.configurable | ||
| def reward_function_for_pendulum(obs, action): |
There was a problem hiding this comment.
There is already a reward function for pendulum? It seems you are trying to organizing all mbrl reward functions in a single file here.
|
|
||
| @gin.configurable | ||
| def reward_function_for_halfcheetah(obs, action): | ||
| """Function for computing reward for gym CartPole environment. It takes |
There was a problem hiding this comment.
CartPole -> halfcheetah
|
|
||
| @gin.configurable | ||
| def reward_function_for_pusher(obs, action): | ||
| """Function for computing reward for gym CartPole environment. It takes |
|
|
||
| @gin.configurable | ||
| def reward_function_for_reacher(obs, action): | ||
| """Function for computing reward for gym CartPole environment. It takes |
|
|
||
|
|
||
| @gin.configurable | ||
| def reward_function_for_cartpole(obs, action): |
There was a problem hiding this comment.
About the reward functions, sometimes its association with the corresponding env/task is clear, such as pendulum, as that is a standard task from Gym.
Sometimes it might be necessary to make the association more explicit. For example,
The cartpole reward here is not for CartPole-v0 from Gym, which also a cartpole task but with discrete actions.
Similarly for others such the halfcheetah reward etc.
| new_rot_axis, new_rot_perp_axis, cur_end + length * new_rot_axis | ||
|
|
||
| cost = torch.sum( | ||
| torch.square(cur_end - common.get_gym_env_attr('goal')), dim=-1) |
There was a problem hiding this comment.
Will this way of retrieving the goal information still correct if we have multiple parallel environment?
It seems we are using
gym_env = _env.envs[0].gym in get_gym_env_attr in this case?
| @@ -0,0 +1,95 @@ | |||
| <!-- Cheetah Model | |||
|
|
|||
| The state space is populated with joints in the order that they are | |||
There was a problem hiding this comment.
For the xml files, not sure whether should check gym/mujoco license as well apart from reference to pets, if to include them.
Another possible way might be to provide pointers/scripts to download them?
|
|
||
| from __future__ import division | ||
| from __future__ import print_function | ||
| from __future__ import absolute_import |
There was a problem hiding this comment.
future imports here and in other files can be removed
| new_rot_axis, new_rot_perp_axis, cur_end + length * new_rot_axis | ||
|
|
||
| cost = torch.sum( | ||
| torch.square(cur_end - common.get_gym_env_attr('goal')), dim=-1) |
| from gym.envs.mujoco import mujoco_env | ||
|
|
||
|
|
||
| class CartpoleEnv(mujoco_env.MujocoEnv, utils.EzPickle): |
There was a problem hiding this comment.
need descriptions for all these new environments.
No description provided.