Skip to content

Commit

Permalink
Document 2obj version of ant and hopper
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasAlegre committed Oct 28, 2024
1 parent 88d0de5 commit 24f66b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mo_gymnasium/envs/mujoco/ant_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ class MOAntEnv(AntEnv, EzPickle):
If the cost_objective flag is set to False, the reward is 2-dimensional, and the cost is added to other objectives.
A healthy reward and a cost for contact forces is added to all objectives.
A 2-objective version (without the cost objective as a separate objective) can be instantiated via:
env = mo_gym.make('mo-ant-2obj-v5')
## Version History
- v5: Now includes contact forces in the reward and observation.
The 2-objective version has now id 'mo-ant-2obj-v5', instead of 'mo-ant-2d-v4'.
See https://gymnasium.farama.org/environments/mujoco/ant/#version-history
"""

Expand Down
7 changes: 7 additions & 0 deletions mo_gymnasium/envs/mujoco/hopper_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ class MOHopperEnv(HopperEnv, EzPickle):
- 1: Reward for jumping high on the z-axis
- 2: Control cost of the action
If the cost_objective flag is set to False, the reward is 2-dimensional, and the cost is added to other objectives.
A 2-objective version (without the cost objective as a separate objective) can be instantiated via:
env = mo_gym.make('mo-hopper-2obj-v5')
## Version History
- v5: The 2-objective version has now id 'mo-hopper-2obj-v5', instead of 'mo-hopper-2d-v4'.
See https://gymnasium.farama.org/environments/mujoco/hopper/#version-history
"""

def __init__(self, cost_objective=True, **kwargs):
Expand Down

0 comments on commit 24f66b1

Please sign in to comment.