This is a small release for MaMuJoCo, mainly updates to Gymnasium/MuJoCo-v5, along with fixing some bugs and cleaning up the code, optimizing the performance of some components, and taking this opportunity to strengthen the unit test cases.
When factorizatoion=None, the env.gent_action_partitions.dummy_node now contains action_id (it used to be None).
Added map_local_observations_to_global_state & optimized runtime performance of map_global_state_to_local_observations.
Added gym_env argument, which can be used to load third-party Gymansium.MujocoEnv environments.
Ant
Now observes local_categories of cfrc_ext by default (same as Gymnasium/MuJoCo-v5/Ant).
Renamed global node torso → root.
Humanoid(-Standup)
No longer observes qfrc_actuator of root & cinert, cvel, qfrc_actuator, cfrc_ext of worldbody (same as Gymnasium/MuJoCo-v5/Humanoid(-Standup)).
Walker2d
Fixed bug: global nodes are now [root_x, root_z, root_y] (used to be [root_x, root_x, root_z]).
ManySegmentAnt
frame_skip default set to 5 (same as Gymnasium/Ant).
option.timestep set to 0.01 (same as Gymnasium/Ant).
Now uses the same reward function as Gymnasium/Ant.
Now observes cfrc_ext by default, (same as Gymnasium/MuJoCo-v5).
ManySegmentSwimmer
Now uses the same option.timestep as Gymansum/Swimmer (0.01).
Updated model to work with mujoco>=3.0.0.
Implementation details (not relevant for the end user)
Removed obsk._observation_structure(), it now uses MujocoEnv.observation_structure.
Cleaned up the generation of local & global categories.
Removed the ManySegmentAnt and ManySegmentSwimmer classes (instead the xml_file argument is used with Gymnasium/MuJoCo/Ant-v5 and Gymnasium/MuJoCo/Swimmer-v5 frameworks).
Cleaned up the _generate_local_categories code and removed _generate_global_categories().
Removed the seed() function.
Refactored & cleaned up MultiAgentMujocoEnv.__init__().
More unit tests & extended tests!
Now relies on gynmansium==1.0.0 API (breaks with gymnasium<1.0.0)
Jinja2 library requirement is now optional
Note only map_global_state_to_local_observations has been reworked
Other
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update
Checklist:
[X] I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
Description
This is a small release for
MaMuJoCo
, mainly updates toGymnasium/MuJoCo-v5
, along with fixing some bugs and cleaning up the code, optimizing the performance of some components, and taking this opportunity to strengthen the unit test cases.MaMuJoCo-V1
Gymnasium/MuJoCo-v5
instead ofGymnasium/MuJoCo-v4
(https://github.com/Farama-Foundation/Gymnasium/pull/572).factorizatoion=None
, theenv.gent_action_partitions.dummy_node
now containsaction_id
(it used to beNone
).map_local_observations_to_global_state
& optimized runtime performance ofmap_global_state_to_local_observations
.gym_env
argument, which can be used to load third-partyGymansium.MujocoEnv
environments.Ant
local_categories
ofcfrc_ext
by default (same asGymnasium/MuJoCo-v5/Ant
).torso
→root
.Humanoid(-Standup)
qfrc_actuator
ofroot
&cinert
,cvel
,qfrc_actuator
,cfrc_ext
ofworldbody
(same asGymnasium/MuJoCo-v5/Humanoid(-Standup)
).Walker2d
[root_x, root_z, root_y]
(used to be[root_x, root_x, root_z]
).ManySegmentAnt
frame_skip
default set to5
(same asGymnasium/Ant
).option.timestep
set to0.01
(same asGymnasium/Ant
).Gymnasium/Ant
.cfrc_ext
by default, (same as Gymnasium/MuJoCo-v5).ManySegmentSwimmer
option.timestep
asGymansum/Swimmer
(0.01).mujoco>=3.0.0
.Implementation details (not relevant for the end user)
obsk._observation_structure()
, it now usesMujocoEnv.observation_structure
.ManySegmentAnt
andManySegmentSwimmer
classes (instead thexml_file
argument is used withGymnasium/MuJoCo/Ant-v5
andGymnasium/MuJoCo/Swimmer-v5
frameworks)._generate_local_categories
code and removed_generate_global_categories()
.seed()
function.MultiAgentMujocoEnv.__init__()
.gynmansium==1.0.0
API (breaks withgymnasium<1.0.0
)Jinja2
library requirement is now optionalNote only
map_global_state_to_local_observations
has been reworkedOther
Type of change
Please delete options that are not relevant.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)