Skip to content

Commit

Permalink
add MaMuJoCo-v1 environments (#196)
Browse files Browse the repository at this point in the history
* (temp) make mamujoco requirement mandatory

* MaMuJoCo Doc update

* add ant2x4 image

* `MaMuJoCo` DOC Update (adding action space PICs)

* more pics

* typo fix

* typo fixes

* fix `shinx` warning

* `MaMuJoCo` DOC update

* minor formating changes

* add `kwargs`

* add `mujuco-v5` (init)

* `pre-commit`

* add hopper_v5

* add walker2d

* add Half Cheetah

* typo fix

* add pusher

* add swimmer

* pre-commit

* typo fix

* `xml_file` arg fixes

* added `InvertedPendulum-v5`

* cleanup

* rename

* fix camera on new models

* add inv_double_pend

* fix `humanoid` `info`

* `humanoid` add include obs arguments

* update reacher DOC

* update obs shape (humanoid)

* `Ant` cleanup and fix `info`

* update `Ant` doc

* re-add to humanoid `contact_cost`

* fix obs shape

* inv_double_pend update doc

* Ant doc update

* reacher add changelogg

* `xml_file` doc fix for hopper and walker

* update humanoid doc

* Ant obs doc fix

* add `__credits__`

* `pre-commit`

* doc update

* doc args cleanup

* fix pusher changelogs

* `reacher` & `pusher` add xml_file argument

* fix typos in `humanoid`

* rename obs args

* ant add `include_cfrc_ext_in_observation`

* register new envs

* fix register

* typo fix

* fix humanoid pickle

* fix humanoid pickle (for real this time)

* add `reset_noise_scale` to double_pend

* add new inv_double_pend args

* inv_double_pend re_order ez pickle init to the start

* add humanoidstandup

* update humanoid standup `info`

* `pre-commit`

* cleanup

* hopper add `info` "z_distance_from_origin"

* fix

* add `frame_skip` argument

* add tendon `info`

* fix exclude refactor

* update doc

* update obs creation

* typo fix

* cleanup

* fixed humanoid arguments docs

* add dynamic obs_size calculation

* add `metadata["observation_structure"]`

* cartpole add args

* typo fix

* added `reacher`&`pusher` reward weights

* cleanup

* cleanup

* cleanup

* `pre-commit`

* add `default_camera_config` argunment

* fix `ant/humanoid` `info["x/y_position"]`

* `ant` add `forward_reward_weight`

* ant doc

* `ant` cleaned up xy pos aquasition

* added `main_body`

* fix `healthy_reward`

* pre-commit

* fix ant velocity

* dict

* update renderer

* add `walker2d` `info[z_distance_from_origon]`

* add `reset_info`

* refactored observation structures to a member variable

* cleanup observation_structure

* Final? documention update

* cleanup

* fix distance_from_origin info

* pre-commit

* Update maze_v4.py

* cleanup

* cleanup

* clean

* cleaup local/global cat generation

* remove `osbk._observation_structure`

* type hint adition

* doc typo fix

* more to `gymnasium/mujoco-v5`

* disable const 0 observation (`Ant`&`Humanoid`)

* port to v5 (missed one)

* `dummy_node`, when `factorizatoion=None` now includes action_id

* update `map_global_state_to_local_observations` for `v5`

* fix `Walker2d` globals from `[root_x, root_x, root_z]` to `[root_x, root_z, root_y]`

* add `ignore_body_fn` in `build_obs`

* enchance observation mapping

* fix map_obs_local2global error msg

* remove `ManySegment` classes

* rename to `v1`

* update docstrings

* cleanup

* add support for loading custom envs

* cleanup

* cleanup

* fixed temp assets not being removed

* fix stupid bug

* update manysegswimmer timestep to match swimmer

* update swimmer to support `mujoco>=3.0.0`

* change manysegmentant timestep

* add test for many segment swimmer

* expand testing to include different obs types

* add a comment

* factorization and cleanup

* `gymnasium==1.0.0` compatibility

* `gymnasium==1.0.0` API

* updated documention

* update single

* make `jinja2` optional and cleanup

* add multiswimmer doc

* Update pyproject.tom

* Update pyproject.toml

* Update __init__.py

* Update __init__.py

* `pre-commit`

* Update index.md

* Update many_segment_swimmer.py

* Update many_segment_ant.py

* Update ma_ant.md

* Update ma_coupled_half_cheetah.md

* Update ma_half_cheetah.md

* Update ma_hopper.md

* Update ma_humanoid.md

* Update ma_humanoid_standup.md

* Update ma_multiagentswimmer.md

* Update ma_pusher.md

* Update ma_reacher.md

* Update ma_single.md

* Update ma_swimmer.md

* Update ma_walker2d.md

* Update README.md
  • Loading branch information
Kallinteris-Andreas authored Feb 19, 2024
1 parent 12a336a commit 8606192
Show file tree
Hide file tree
Showing 25 changed files with 674 additions and 708 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The [D4RL](https://github.com/Farama-Foundation/D4RL) environments are now avail
The different tasks involve hammering a nail, opening a door, twirling a pen, or picking up and moving a ball.
* [Franka Kitchen](https://robotics.farama.org/envs/franka_kitchen/) - Multitask environment in which a 9-DoF Franka robot is placed in a kitchen containing several common household items. The goal of each task is to interact with the items in order to reach a desired goal configuration.

* [MaMuJoCo](https://robotics.farama.org/envs/MaMuJoCo/) - A collection of multi agent factorizations of the [Gymnasium/MuJoCo](https://gymnasium.farama.org/environments/mujoco/) environments and a framework for factorizing robotic environments, uses the [pettingzoo.ParallelEnv](https://pettingzoo.farama.org/api/parallel/) API.

**WIP**: generate new `D4RL` environment datasets with [Minari](https://github.com/Farama-Foundation/Minari).

## Multi-goal API
Expand Down
31 changes: 18 additions & 13 deletions docs/envs/MaMuJoCo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@ Gymansium-Robotics/MaMuJoCo Represents the first, easy to use Framework for rese
MaMuJoCo mainly uses the [PettingZoo.ParallelAPI](https://pettingzoo.farama.org/api/parallel/), but also supports a few extra functions:

```{eval-rst}
.. autofunction:: gymnasium_robotics.mamujoco_v0.parallel_env.map_local_actions_to_global_action
.. autofunction:: gymnasium_robotics.mamujoco_v1.parallel_env.map_local_actions_to_global_action
```

```{eval-rst}
.. autofunction:: gymnasium_robotics.mamujoco_v0.parallel_env.map_global_action_to_local_actions
.. autofunction:: gymnasium_robotics.mamujoco_v1.parallel_env.map_global_action_to_local_actions
```
```{eval-rst}
.. autofunction:: gymnasium_robotics.mamujoco_v0.parallel_env.map_global_state_to_local_observations
.. autofunction:: gymnasium_robotics.mamujoco_v1.parallel_env.map_global_state_to_local_observations
```
```{eval-rst}
.. autofunction:: gymnasium_robotics.mamujoco_v0.parallel_env.map_local_observation_to_global_state
.. autofunction:: gymnasium_robotics.mamujoco_v1.parallel_env.map_local_observations_to_global_state
```
```{eval-rst}
.. autofunction:: gymnasium_robotics.mamujoco_v0.get_parts_and_edges
.. autofunction:: gymnasium_robotics.mamujoco_v1.get_parts_and_edges
```

MaMuJoCo also supports the [PettingZoo.AECAPI](https://pettingzoo.farama.org/api/aec/) but does not expose extra functions.
Expand All @@ -41,19 +40,19 @@ MaMuJoCo also supports the [PettingZoo.AECAPI](https://pettingzoo.farama.org/api

### Arguments
```{eval-rst}
.. autofunction:: gymnasium_robotics.mamujoco_v0.parallel_env.__init__
.. autofunction:: gymnasium_robotics.mamujoco_v1.parallel_env.__init__
```



## How to create new agent factorizations
### example 'Ant-v4', '8x1'
### example 'Ant-v5', '8x1'
In this example, we will create an agent factorization not present in Gymnasium-Robotics/MaMuJoCo the "Ant"/'8x1', where each agent controls a single joint/action (first implemented by [safe-MaMuJoCo](https://github.com/chauncygu/Safe-Multi-Agent-Mujoco)).

first we will load the graph of MaMuJoCo:
```python
>>> from gymnasium_robotics.mamujoco_v0 import get_parts_and_edges
>>> unpartioned_nodes, edges, global_nodes = get_parts_and_edges('Ant-v4', None)
>>> from gymnasium_robotics.mamujoco_v1 import get_parts_and_edges
>>> unpartioned_nodes, edges, global_nodes = get_parts_and_edges('Ant-v5', None)
```
The `unpartioned_nodes` contain the nodes of the MaMuJoCo graph.
The `edges` well, contain the edges of the graph.
Expand All @@ -63,18 +62,23 @@ To create our '8x1' partition we will need to partition the `unpartioned_nodes`:
```python
>>> unpartioned_nodes
[(hip1, ankle1, hip2, ankle2, hip3, ankle3, hip4, ankle4)]
>>> partioned_nodes = [(unpartioned_nodes[0][0],), (unpartioned_nodes[0][1],), (unpartioned_nodes[0][2],), (unpartioned_nodes[0][3],), (unpartioned_nodes[0][4],), (unpartioned_nodes[0][5],), (unpartioned_nodes[0][6],), (unpartioned_nodes[0][7],)]>>> partioned_nodes
>>> partioned_nodes = [(unpartioned_nodes[0][0],), (unpartioned_nodes[0][1],), (unpartioned_nodes[0][2],), (unpartioned_nodes[0][3],), (unpartioned_nodes[0][4],), (unpartioned_nodes[0][5],), (unpartioned_nodes[0][6],), (unpartioned_nodes[0][7],)]
>>> partioned_nodes
[(hip1,), (ankle1,), (hip2,), (ankle2,), (hip3,), (ankle3,), (hip4,), (ankle4,)]
```
Finally package the partitions and create our environment:
```python
>>> my_agent_factorization = {"partition": partioned_nodes, "edges": edges, "globals": global_nodes}
>>> gym_env = mamujoco_v0('Ant', '8x1', agent_factorization=my_agent_factorization)
>>> gym_env = mamujoco_v1('Ant', '8x1', agent_factorization=my_agent_factorization)
```

## Version History
v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of [the original multiagent_mujuco](https://github.com/schroederdewitt/multiagent_mujoco)
* v1:
- Now based on `Gymnasium/MuJoCo-v5` instead of `Gymnasium/MuJoCo-v4` (https://github.com/Farama-Foundation/Gymnasium/pull/572).
- 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.
* v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of [the original multiagent_mujuco](https://github.com/schroederdewitt/multiagent_mujoco)

```{toctree}
:hidden:
Expand All @@ -84,6 +88,7 @@ ma_half_cheetah.md
ma_hopper.md
ma_humanoid_standup.md
ma_humanoid.md
ma_multiagentswimmer.md
ma_reacher.md
ma_swimmer.md
ma_pusher.md
Expand Down
20 changes: 12 additions & 8 deletions docs/envs/MaMuJoCo/ma_ant.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ This Environment is part of [MaMuJoCo](https://robotics.farama.org/envs/MaMuJoCo
The task is [Gymansium's MuJoCo/Ant](https://gymnasium.farama.org/environments/mujoco/ant/).


| Defaults | `env = mamujoco_v0.parallel_env("Ant", None)` |
| Defaults | `env = mamujoco_v1.parallel_env("Ant", None)` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0']` |
| Number of Agents | 1 |
| Action Spaces | `{'agent_0' : Box(-1, 1, (8,), float32)}` |
| Part partition | `[(hip4, ankle4, hip1, ankle1, hip2, ankle2, hip3, ankle3)]` |

## Action Space
The action spaces is depended on the partitioning
The shape of the action space depends on the partitioning. The partitioning has the following form:

### if partitioning is None:
```{figure} figures/ant.png
:name: ant
```

| Instantiate | `env = mamujoco_v0.parallel_env("Ant", None)` |
| Instantiate | `env = mamujoco_v1.parallel_env("Ant", None)` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0']` |
| Number of Agents | 1 |
Expand All @@ -56,7 +56,7 @@ If partitioning, is None then the environment contains a single agent with the s
:name: ant_2x4
```

| Instantiate | `env = mamujoco_v0.parallel_env("Ant", "2x4")` |
| Instantiate | `env = mamujoco_v1.parallel_env("Ant", "2x4")` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1']` |
| Number of Agents | 2 |
Expand Down Expand Up @@ -86,7 +86,7 @@ The environment is partitioned in 2 parts, the front part (containing the front
:name: ant_2x4d
```

| Instantiate | `env = mamujoco_v0.parallel_env("Ant", "2x4d")` |
| Instantiate | `env = mamujoco_v1.parallel_env("Ant", "2x4d")` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1']` |
| Number of Agents | 2 |
Expand Down Expand Up @@ -114,7 +114,7 @@ The environment is partitioned in 2 parts, split diagonally.
:name: ant_4x2
```

| Instantiate | `env = mamujoco_v0.parallel_env("Ant", "4x2")` |
| Instantiate | `env = mamujoco_v1.parallel_env("Ant", "4x2")` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1', 'agent_2', 'agent_3']` |
| Number of Agents | 4 |
Expand Down Expand Up @@ -168,7 +168,7 @@ All agents receive the same [Gymnasium's Ant](https://gymnasium.farama.org/envir


## Starting state
The starting state of the environment is the as [Gymnasium's Ant](https://gymnasium.farama.org/environments/mujoco/ant/#starting-state).
The starting state of the environment is the same as [Gymnasium's Ant](https://gymnasium.farama.org/environments/mujoco/ant/#starting-state).



Expand All @@ -178,7 +178,11 @@ All agent terminate and truncate at the same time given the same conditions as [


## Version History
- v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of the original MaMuJoCo [schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco).
* v1:
- Now based on `Gymnasium/MuJoCo-v5` instead of `Gymnasium/MuJoCo-v4` (https://github.com/Farama-Foundation/Gymnasium/pull/572).
- Now observes `local_categories` of `cfrc_ext` by default (same as `Gymnasium/MuJoCo-v5/Ant`).
- Renamed global node `torso` → `root`.
* v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of the original MaMuJoCo [schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco).
Changes from the original `MaMuJoCo` ([schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco)):
- Fixed diagonal factorization ("2x4d") not being diagonal.
- Fixed Global observations (The Ant's Torso: `rootx`, `rooty`, `rootz`) not being observed.
Expand Down
10 changes: 6 additions & 4 deletions docs/envs/MaMuJoCo/ma_coupled_half_cheetah.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ The environment consists of 2 half cheetahs coupled by an elastic tendon.


## Action Space
The action spaces is depended on the partitioning.
The shape of the action space depends on the partitioning. The partitioning has the following form:

### if partitioning is None:
```{figure} figures/coupled_half_cheetah.png
:name: coupled_half_cheetah
```

| Instantiate | `env = mamujoco_v0.parallel_env("CoupledHalfCheetah", None)` |
| Instantiate | `env = mamujoco_v1.parallel_env("CoupledHalfCheetah", None)` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0']` |
| Number of Agents | 1 |
Expand Down Expand Up @@ -49,7 +49,7 @@ If partitioning, is `None`, then the environment contains a single agent with th
:name: coupled_half_cheetah_1p1
```

| Instantiate | `env = mamujoco_v0.parallel_env("CoupledHalfCheetah", "1p1")`|
| Instantiate | `env = mamujoco_v1.parallel_env("CoupledHalfCheetah", "1p1")`|
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1']` |
| Number of Agents | 2 |
Expand Down Expand Up @@ -98,7 +98,7 @@ All agents receive the same average reward of each cheetah.


## Starting state
The starting state of the environment is the as [Gymnasium's Half Cheetah](https://gymnasium.farama.org/environments/mujoco/half_cheetah/#starting-state) (but with 2 cheetahs).
The starting state of the environment is the same as [Gymnasium's Half Cheetah](https://gymnasium.farama.org/environments/mujoco/half_cheetah/#starting-state) (but with 2 cheetahs).



Expand All @@ -108,6 +108,8 @@ All agent terminate and truncate at the same time, given the same conditions as


## Version History
* v1:
- Now based on `Gymnasium/MuJoCo-v5` instead of `Gymnasium/MuJoCo-v4` (https://github.com/Farama-Foundation/Gymnasium/pull/572).
- v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of the original MaMuJoCo [schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco).
Changes from the original `MaMuJoCo` ([schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco)):
- Fixed action mapping of the second cheetah (It would previously not work)
Expand Down
12 changes: 7 additions & 5 deletions docs/envs/MaMuJoCo/ma_half_cheetah.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The task is [Gymansium's MuJoCo/Half Cheetah](https://gymnasium.farama.org/envir


## Action Space
The action spaces is depended on the partitioning
The shape of the action space depends on the partitioning. The partitioning has the following form:

### if partitioning is None:
```{figure} figures/half_cheetah.png
:name: half_cheetah
```

| Instantiate | `env = mamujoco_v0.parallel_env("HalfCheetah", None)` |
| Instantiate | `env = mamujoco_v1.parallel_env("HalfCheetah", None)` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0']` |
| Number of Agents | 1 |
Expand All @@ -47,7 +47,7 @@ If partitioning, is `None`, then the environment contains a single agent with th
:name: half_cheetah_2x3
```

| Instantiate | `env = mamujoco_v0.parallel_env("HalfCheetah", "2x3")`|
| Instantiate | `env = mamujoco_v1.parallel_env("HalfCheetah", "2x3")`|
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1']` |
| Number of Agents | 2 |
Expand Down Expand Up @@ -75,7 +75,7 @@ The environment is partitioned in 2 parts, the front part (containing the front
:name: half_cheetah_6x1
```

| Instantiate | `env = mamujoco_v0.parallel_env("HalfCheetah", "6x1")`|
| Instantiate | `env = mamujoco_v1.parallel_env("HalfCheetah", "6x1")`|
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1', 'agent_2', 'agent_3', 'agent_4', 'agent_5']` |
| Number of Agents | 6 |
Expand Down Expand Up @@ -129,7 +129,7 @@ All agents receive the same [Gymnasium's Half Cheetah](https://gymnasium.farama.


## Starting state
The starting state of the environment is the as [Gymnasium's Half Cheetah](https://gymnasium.farama.org/environments/mujoco/half_cheetah/#starting-state).
The starting state of the environment is the same as [Gymnasium's Half Cheetah](https://gymnasium.farama.org/environments/mujoco/half_cheetah/#starting-state).



Expand All @@ -138,6 +138,8 @@ All agent terminate and truncate at the same time, given the same conditions as


## Version History
* v1:
- Now based on `Gymnasium/MuJoCo-v5` instead of `Gymnasium/MuJoCo-v4` (https://github.com/Farama-Foundation/Gymnasium/pull/572).
- v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of the original MaMuJoCo [schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco).
Changes from the original `MaMuJoCo` ([schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco)):
- Added/Fixed Global observations (The Cheetah's front tip: `rootx`, `rooty`, `rootz`) not being observed.
Expand Down
10 changes: 6 additions & 4 deletions docs/envs/MaMuJoCo/ma_hopper.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The task is [Gymansium's MuJoCo/Hopper](https://gymnasium.farama.org/environment


## Action Space
The action spaces is depended on the partitioning
The shape of the action space depends on the partitioning. The partitioning has the following form:

### if partitioning is None:
```{figure} figures/hopper.png
:name: hopper
```

| Instantiate | `env = mamujoco_v0.parallel_env("Hopper", None)` |
| Instantiate | `env = mamujoco_v1.parallel_env("Hopper", None)` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0']` |
| Number of Agents | 1 |
Expand All @@ -47,7 +47,7 @@ If partitioning, is `None`, then the environment contains a single agent with th
:name: hopper_3x1
```

| Instantiate | `env = mamujoco_v0.parallel_env("Hopper", "3x1")`|
| Instantiate | `env = mamujoco_v1.parallel_env("Hopper", "3x1")`|
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1', 'agent_2']` |
| Number of Agents | 3 |
Expand Down Expand Up @@ -89,7 +89,7 @@ All agents receive the same [Gymnasium's Hopper](https://gymnasium.farama.org/en


## Starting state
The starting state of the environment is the as [Gymnasium's Hopper](https://gymnasium.farama.org/environments/mujoco/hopper/#starting-state).
The starting state of the environment is the same as [Gymnasium's Hopper](https://gymnasium.farama.org/environments/mujoco/hopper/#starting-state).



Expand All @@ -98,6 +98,8 @@ All agent terminate and truncate at same time given the same conditions as [Gymn


## Version History
* v1:
- Now based on `Gymnasium/MuJoCo-v5` instead of `Gymnasium/MuJoCo-v4` (https://github.com/Farama-Foundation/Gymnasium/pull/572).
- v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of the original MaMuJoCo [schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco).
Changes from the original `MaMuJoCo` ([schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco)):
- Fixed Global observations (The Hopper's top: `rootx`, `rooty`, `rootz`) not being observed.
11 changes: 7 additions & 4 deletions docs/envs/MaMuJoCo/ma_humanoid.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The task is [Gymansium's MuJoCo/Humanoid](https://gymnasium.farama.org/environme


## Action Space
The action spaces is depended on the partitioning
The shape of the action space depends on the partitioning. The partitioning has the following form:

### if partitioning is None:
```{figure} figures/humanoid.png
:name: humanoid
```

| Instantiate | `env = mamujoco_v0.parallel_env("Humanoid", None)` |
| Instantiate | `env = mamujoco_v1.parallel_env("Humanoid", None)` |
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0']` |
| Number of Agents | 1 |
Expand Down Expand Up @@ -60,7 +60,7 @@ If partitioning, is `None` then the environment contains a single agent with the
:name: humanoid_9|8
```

| Instantiate | `env = mamujoco_v0.parallel_env("Humanoid", "3x1")`|
| Instantiate | `env = mamujoco_v1.parallel_env("Humanoid", "3x1")`|
|-----------------------|------------------------------------------------------|
| Agents | `agents= ['agent_0', 'agent_1']` |
| Number of Agents | 2 |
Expand Down Expand Up @@ -114,7 +114,7 @@ All agents receive the same [Gymnasium's Humanoid](https://gymnasium.farama.org/


## Starting state
The starting state of the environment is the as [Gymnasium's Humanoid](https://gymnasium.farama.org/environments/mujoco/humanoid/#starting-state).
The starting state of the environment is the same as [Gymnasium's Humanoid](https://gymnasium.farama.org/environments/mujoco/humanoid/#starting-state).



Expand All @@ -123,6 +123,9 @@ All agent terminate and truncate at the same time, given the same conditions as


## Version History
* v1:
- Now based on `Gymnasium/MuJoCo-v5` instead of `Gymnasium/MuJoCo-v4` (https://github.com/Farama-Foundation/Gymnasium/pull/572).
- No longer observes `qfrc_actuator` of `root` & `cinert`, `cvel`, `qfrc_actuator`, `cfrc_ext` of `worldbody` (same as `Gymnasium/MuJoCo-v5/Humanoid`).
- v0: Initial version release, uses [Gymnasium.MuJoCo-v4](https://gymnasium.farama.org/environments/mujoco/), and is a fork of the original MaMuJoCo [schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco).
Changes from the original `MaMuJoCo` ([schroederdewitt/multiagent_mujoco](https://github.com/schroederdewitt/multiagent_mujoco)):
- Added/Fixed Global observations (The Humanoids's torso: `rootx`, `rooty`, `rootz`) not being observed.
Expand Down
Loading

0 comments on commit 8606192

Please sign in to comment.