Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
assets Release dm_control.locomotion, containing a multi-agent soccer enviro… Feb 20, 2019
README.md Update README for soccer. Feb 21, 2019
__init__.py
boxhead.py
boxhead_test.py
explore.py Release dm_control.locomotion, containing a multi-agent soccer enviro… Feb 20, 2019
initializers.py Release dm_control.locomotion, containing a multi-agent soccer enviro… Feb 20, 2019
loader_test.py
observables.py Rename `soccer.*Observables` --> `soccer.*ObservablesAdder` Feb 25, 2019
pitch.py
pitch_test.py Release dm_control.locomotion, containing a multi-agent soccer enviro… Feb 20, 2019
soccer.png
soccer_ball.py
soccer_ball_test.py Add tracking cameras to the soccer ball. Feb 21, 2019
task.py Rename `soccer.*Observables` --> `soccer.*ObservablesAdder` Feb 25, 2019
task_test.py
team.py Release dm_control.locomotion, containing a multi-agent soccer enviro… Feb 20, 2019

README.md

DeepMind MuJoCo Multi-Agent Soccer Environment.

This submodule contains the components and environment described in ICLR 2019 paper Emergent Coordination through Competition.

soccer

Installation and requirements

See dm_control for instructions.

Quickstart

from dm_control.locomotion import soccer as dm_soccer

# Load the 2-vs-2 soccer environment with episodes of 10 seconds:
env = dm_soccer.load(team_size=2, time_limit=10.)

# Retrieves action_specs for all 4 players.
action_specs = env.action_spec()

# Step through the environment for one episode with random actions.
time_step = env.reset()
while not time_step.last():
  actions = []
  for action_spec in action_specs:
    action = np.random.uniform(
        action_spec.minimum, action_spec.maximum, size=action_spec.shape)
    actions.append(action)
  time_step = env.step(actions)

  for i in range(len(action_specs)):
    print(
        "Player {}: reward = {}, discount = {}, observations = {}.".format(
            i, time_step.reward[i], time_step.discount,
            time_step.observation[i]))

Environment Viewer

To visualize an example 2-vs-2 soccer environment in the dm_control interactive viewer, execute dm_control/locomotion/soccer/explore.py.

You can’t perform that action at this time.