dm-control soccer (multi-agent)#

Installation#

pip install shimmy[dm-control]

Usage (Multi agent)#

from dm_control.locomotion import soccer as dm_soccer
from shimmy.dm_control_multiagent_compatibility import (
    DmControlMultiAgentCompatibilityV0,
)

walker_type = dm_soccer.WalkerType.BOXHEAD,

env = dm_soccer.load(
    team_size=2,
    time_limit=10.0,
    disable_walker_contacts=False,
    enable_field_box=True,
    terminate_on_goal=False,
    walker_type=walker_type,
)

env = DmControlMultiAgentCompatibilityV0(env)

Class Description#

class shimmy.dm_control_multiagent_compatibility.DmControlMultiAgentCompatibilityV0(env: dm_control.composer.Environment, render_mode: str | None = None)#

This compatibility wrapper converts multi-agent dm-control environments, primarily soccer, into a Pettingzoo environment.

Dm-control is DeepMindā€™s software stack for physics-based simulation and Reinforcement Learning environments, using MuJoCo physics. This compatibility wrapper converts a dm-control environment into a gymnasium environment.

metadata: Dict[str, Any] = {'render_modes': ['human']}#
possible_agents: List[AgentID]#
observation_space(agent)#

The observation space for agent.

action_space(agent)#

The action space for agent.

render()#

Renders the environment.

close()#

Closes the environment.

reset(seed=None, return_info=False, options=None)#

Resets the dm-control environment.

step(actions)#

Steps through all agents with the actions.

agents: List[AgentID]#
observation_spaces: Dict[AgentID, gymnasium.spaces.Space]#
action_spaces: Dict[AgentID, gymnasium.spaces.Space]#