Coupled Half Cheetah¶
This Environment is one of the new environments introduced with MaMuJoCo. The environment consists of 2 half cheetahs coupled by an elastic tendon.
Action Space¶
The shape of the action space depends on the partitioning. The partitioning has the following form:
if partitioning is None:¶
Instantiate |
|
---|---|
Agents |
|
Number of Agents |
1 |
Action Spaces |
|
Part partition |
|
If partitioning, is None
, then the environment contains a single agent with the same action space.
Num |
Action |
Control Min |
Control Max |
Name (in corresponding XML file) |
Joint |
Unit |
---|---|---|---|---|---|---|
0 |
Torque applied on the back thigh rotor of the first cheetah |
-1 |
1 |
bthigh0 |
hinge |
torque (N m) |
1 |
Torque applied on the back shin rotor of the first cheetah |
-1 |
1 |
bshin0 |
hinge |
torque (N m) |
2 |
Torque applied on the back foot rotor of the first cheetah |
-1 |
1 |
bfoot0 |
hinge |
torque (N m) |
3 |
Torque applied on the front thigh rotor of the first cheetah |
-1 |
1 |
fthigh0 |
hinge |
torque (N m) |
4 |
Torque applied on the front shin rotor of the first cheetah |
-1 |
1 |
fshin0 |
hinge |
torque (N m) |
5 |
Torque applied on the front foot rotor of the first cheetah |
-1 |
1 |
ffoot0 |
hinge |
torque (N m) |
6 |
Torque applied on the back thigh rotor of the second cheetah |
-1 |
1 |
bthigh1 |
hinge |
torque (N m) |
7 |
Torque applied on the back shin rotor of the second cheetah |
-1 |
1 |
bshin1 |
hinge |
torque (N m) |
8 |
Torque applied on the back foot rotor of the second cheetah |
-1 |
1 |
bfoot1 |
hinge |
torque (N m) |
9 |
Torque applied on the front thigh rotor of the second cheetah |
-1 |
1 |
fthigh1 |
hinge |
torque (N m) |
10 |
Torque applied on the front shin rotor of the second cheetah |
-1 |
1 |
fshin1 |
hinge |
torque (N m) |
11 |
Torque applied on the front foot rotor of the second cheetah |
-1 |
1 |
ffoot1 |
hinge |
torque (N m) |
if partitioning == “1p1”: # isolate the cheetahs¶
Instantiate |
|
---|---|
Agents |
|
Number of Agents |
2 |
Action Spaces |
|
Part partition |
|
The environment is partitioned in 2 parts, one part corresponding to the first cheetah and second part corresponding to the second cheetah.
Agent 0 action space (first cheetah)¶
Num |
Action |
Control Min |
Control Max |
Name (in corresponding XML file) |
Joint |
Unit |
---|---|---|---|---|---|---|
0 |
Torque applied on the back thigh rotor of the first cheetah |
-1 |
1 |
bthigh0 |
hinge |
torque (N m) |
1 |
Torque applied on the back shin rotor of the first cheetah |
-1 |
1 |
bshin0 |
hinge |
torque (N m) |
2 |
Torque applied on the back foot rotor of the first cheetah |
-1 |
1 |
bfoot0 |
hinge |
torque (N m) |
3 |
Torque applied on the front thigh rotor of the first cheetah |
-1 |
1 |
fthigh0 |
hinge |
torque (N m) |
4 |
Torque applied on the front shin rotor of the first cheetah |
-1 |
1 |
fshin0 |
hinge |
torque (N m) |
5 |
Torque applied on the front foot rotor of the first cheetah |
-1 |
1 |
ffoot0 |
hinge |
torque (N m) |
Agent 1 action space (second cheetah)¶
Num |
Action |
Control Min |
Control Max |
Name (in corresponding XML file) |
Joint |
Unit |
---|---|---|---|---|---|---|
0 |
Torque applied on the back thigh rotor of the second cheetah |
-1 |
1 |
bthigh1 |
hinge |
torque (N m) |
1 |
Torque applied on the back shin rotor of the second cheetah |
-1 |
1 |
bshin1 |
hinge |
torque (N m) |
2 |
Torque applied on the back foot rotor of the second cheetah |
-1 |
1 |
bfoot1 |
hinge |
torque (N m) |
3 |
Torque applied on the front thigh rotor of the second cheetah |
-1 |
1 |
fthigh1 |
hinge |
torque (N m) |
4 |
Torque applied on the front shin rotor of the second cheetah |
-1 |
1 |
fshin1 |
hinge |
torque (N m) |
5 |
Torque applied on the front foot rotor of the second cheetah |
-1 |
1 |
ffoot1 |
hinge |
torque (N m) |
Observation Space¶
Observation Categories |
|
---|---|
Default |
|
Default |
|
Supported observation categories |
|
Besides the local observation of each agent (which depend on their parts of the agent, the observation categories and the observation depth), each agent also observes the position and velocity items in each cheetah’s top.
Rewards¶
All agents receive the same average reward of each cheetah.
Starting state¶
The starting state of the environment is the same as Gymnasium’s Half Cheetah (but with 2 cheetahs).
Episode End¶
All agent terminate and truncate at the same time, given the same conditions as Gymnasium’s Half Cheetah.
Version History¶
v1:
Now based on
Gymnasium/MuJoCo-v5
instead ofGymnasium/MuJoCo-v4
(https://github.com/Farama-Foundation/Gymnasium/pull/572).
v0: Initial version release, uses Gymnasium.MuJoCo-v4, and is a fork of the original MaMuJoCo schroederdewitt/multiagent_mujoco. Changes from the original
MaMuJoCo
(schroederdewitt/multiagent_mujoco):Fixed action mapping of the second cheetah (It would previously not work)
Fixed tendon Jacobean observations
Added/Fixed Global observations (The Cheetahes’s front tips:
rootx
s,rooty
s,rootz
s) not being observed.Improved node naming
Changed action ordering to be same as Gymnasium/MuJoCo/HalfCheetah