Status: Archive (code is provided as-is, no updates expected)
The maintained version of these environments, which includenumerous fixes, comprehensive documentation, support for installation via pip, and support for current versions of Python are available in PettingZoo (https://github.com/Farama-Foundation/PettingZoo , https://pettingzoo.farama.org/environments/mpe/)
A simple multi-agent particle world with a continuous observation and discrete action space, along with some basic simulated physics. Used in the paper Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments.
-
To install,
cdinto the root directory and typepip install -e . -
To interactively view moving to landmark scenario (see others in ./scenarios/):
bin/interactive.py --scenario simple.py -
Known dependencies: Python (3.5.4), OpenAI gym (0.10.5), numpy (1.14.5), pyglet (1.5.27)
-
To use the environments, look at the code for importing them in
make_env.py.
-
make_env.py: contains code for importing a multiagent environment as an OpenAI Gym-like object. -
./multiagent/environment.py: contains code for environment simulation (interaction physics,_step()function, etc.) -
./multiagent/core.py: contains classes for various objects (Entities, Landmarks, Agents, etc.) that are used throughout the code. -
./multiagent/rendering.py: used for displaying agent behaviors on the screen. -
./multiagent/policy.py: contains code for interactive policy based on keyboard input. -
./multiagent/scenario.py: contains base scenario object that is extended for all scenarios. -
./multiagent/scenarios/: folder where various scenarios/ environments are stored. scenario code consists of several functions:make_world(): creates all of the entities that inhabit the world (landmarks, agents, etc.), assigns their capabilities (whether they can communicate, or move, or both). called once at the beginning of each training sessionreset_world(): resets the world by assigning properties (position, color, etc.) to all entities in the world called before every episode (including after make_world() before the first episode)reward(): defines the reward function for a given agentobservation(): defines the observation space of a given agent- (optional)
benchmark_data(): provides diagnostic data for policies trained on the environment (e.g. evaluation metrics)
You can create new scenarios by implementing the first 4 functions above (make_world(), reset_world(), reward(), and observation()).
If you used this environment for your experiments or found it helpful, consider citing the following papers:
Environments in this repo:
@article{lowe2017multi,
title={Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments},
author={Lowe, Ryan and Wu, Yi and Tamar, Aviv and Harb, Jean and Abbeel, Pieter and Mordatch, Igor},
journal={Neural Information Processing Systems (NIPS)},
year={2017}
}
Original particle world environment:
@article{mordatch2017emergence,
title={Emergence of Grounded Compositional Language in Multi-Agent Populations},
author={Mordatch, Igor and Abbeel, Pieter},
journal={arXiv preprint arXiv:1703.04908},
year={2017}
}
