momaland

Benchmarks for Multi-Objective Multi-Agent Decision Making

https://github.com/farama-foundation/momaland

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Benchmarks for Multi-Objective Multi-Agent Decision Making

Basic Info
  • Host: GitHub
  • Owner: Farama-Foundation
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://momaland.farama.org/
  • Size: 28.9 MB
Statistics
  • Stars: 99
  • Watchers: 5
  • Forks: 18
  • Open Issues: 3
  • Releases: 5
Created over 3 years ago · Last pushed 10 months ago
Metadata Files
Readme Funding License Code of conduct Citation

README.md

Python PyPI tests pre-commit Code style: black

MOMAland is an open source Python library for developing and comparing multi-objective multi-agent reinforcement learning algorithms by providing a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API. Essentially, the environments follow the standard PettingZoo APIs, but return vectorized rewards as numpy arrays instead of scalar values.

The documentation website is at https://momaland.farama.org/, and we have a public discord server (which we also use to coordinate development work) that you can join here. <!-- end elevator-pitch -->

Environments

MOMAland includes environments taken from the MOMARL literature, as well as multi-objective version of classical environments, such as SISL or Butterfly. The full list of environments is available at https://momaland.farama.org/environments/all-envs/.

Installation

To install MOMAland, use: bash pip install momaland This does not include dependencies for all components of MOMAland (not everything is required for the basic usage, and some can be problematic to install on certain systems). - pip install "momaland[testing]" to install dependencies for API testing. - pip install "momaland[learning]" to install dependencies for the supplied learning algorithms. - pip install "momaland[all]" for all dependencies for all components. <!-- end install -->

API

Similar to PettingZoo, the MOMAland API models environments as simple Python env classes. Creating environment instances and interacting with them is very simple - here's an example using the "momultiwalkerstabilityv0" environment:

```python from momaland.envs.momultiwalkerstability import momultiwalkerstability_v0 as _env import numpy as np

.env() function will return an AEC environment, as per PZ standard

env = env.env(rendermode="human")

env.reset(seed=42) for agent in env.agentiter(): # vecreward is a numpy array observation, vec_reward, termination, truncation, info = env.last()

if termination or truncation:
    action = None
else:
    action = env.action_space(agent).sample() # this is where you would insert your policy

env.step(action)

env.close()

optionally, you can scalarize the reward with weights

Making the vector reward a scalar reward to shift to single-objective multi-agent (aka PettingZoo)

We can assign different weights to the objectives of each agent.

weights = { "walker0": np.array([0.7, 0.3]), "walker1": np.array([0.5, 0.5]), "walker_2": np.array([0.2, 0.8]), } env = LinearizeReward(env, weights) ```

For details on multi-objective multi-agent RL definitions, see Multi-Objective Multi-Agent Decision Making: A Utility-based Analysis and Survey.

You can also check more examples in this colab notebook! MOMAland Demo in Collab <!-- end snippet-usage -->

Learning Algorithms

We provide a set of learning algorithms that are compatible with the MOMAland environments. The learning algorithms are implemented in the learning/ directory. To keep everything as self-contained as possible, each algorithm is implemented as a single-file (close to cleanRL's philosophy).

Nevertheless, we reuse tools provided by other libraries, like multi-objective evaluations and performance indicators from MORL-Baselines.

Here is a list of algorithms that are currently implemented:

| Name | Single/Multi-policy | Reward | Utility | Observation space | Action space | Paper | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|------------|---------------------|-------------------|--------------|-------| | MOMAPPO (OLS) continuous,
discrete | Multi | Team | Team / Linear | Any | Any | | | Scalarized IQL | Single | Individual | Individual / Linear | Discrete | Discrete | | | Centralization wrapper | Any | Team | Team / Any | Discrete | Discrete | | | Linearization wrapper | Single | Any | Individual / Linear | Any | Any | |

Environment Versioning

MOMAland keeps strict versioning for reproducibility reasons. All environments end in a suffix like "_v0". When changes are made to environments that might impact learning results, the number is increased by one to prevent potential confusion.

Development Roadmap

We have a roadmap for future development available here.

Project Maintainers

Project Managers: Florian Felten (@ffelten)

Maintenance for this project is also contributed by the broader Farama team: farama.org/team.

Citing

If you use this repository in your research, please cite: bibtex @misc{felten2024momaland, title={MOMAland: A Set of Benchmarks for Multi-Objective Multi-Agent Reinforcement Learning}, author={Florian Felten and Umut Ucak and Hicham Azmani and Gao Peng and Willem Röpke and Hendrik Baier and Patrick Mannion and Diederik M. Roijers and Jordan K. Terry and El-Ghazali Talbi and Grégoire Danoy and Ann Nowé and Roxana Rădulescu}, year={2024}, eprint={2407.16312}, archivePrefix={arXiv}, primaryClass={cs.MA}, url={https://arxiv.org/abs/2407.16312}, } <!-- end citation -->

Development

Setup pre-commit

Clone the repo and run pre-commit install to setup the pre-commit hooks.

Owner

  • Name: Farama Foundation
  • Login: Farama-Foundation
  • Kind: organization
  • Email: contact@farama.org

The Farama foundation is a nonprofit organization working to develop and maintain open source reinforcement learning tools.

Citation (CITATION.bib)

@misc{felten2024momaland,
      title={MOMAland: A Set of Benchmarks for Multi-Objective Multi-Agent Reinforcement Learning},
      author={Florian Felten and Umut Ucak and Hicham Azmani and Gao Peng and Willem Röpke and Hendrik Baier and Patrick Mannion and Diederik M. Roijers and Jordan K. Terry and El-Ghazali Talbi and Grégoire Danoy and Ann Nowé and Roxana Rădulescu},
      year={2024},
      eprint={2407.16312},
      archivePrefix={arXiv},
      primaryClass={cs.MA},
      url={https://arxiv.org/abs/2407.16312},
}

GitHub Events

Total
  • Issues event: 4
  • Watch event: 36
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 25
  • Pull request event: 6
  • Fork event: 9
  • Create event: 4
Last Year
  • Issues event: 4
  • Watch event: 36
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 25
  • Pull request event: 6
  • Fork event: 9
  • Create event: 4

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 10
  • Total pull requests: 56
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 11 days
  • Total issue authors: 5
  • Total pull request authors: 10
  • Average comments per issue: 0.9
  • Average comments per pull request: 0.34
  • Merged pull requests: 53
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 5
  • Average time to close issues: 2 days
  • Average time to close pull requests: 5 days
  • Issue authors: 3
  • Pull request authors: 4
  • Average comments per issue: 1.67
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • umutucak (2)
  • ffelten (2)
  • AdrienBolling (2)
  • KevayneCst (1)
  • jselvaraaj (1)
Pull Request Authors
  • umutucak (21)
  • ffelten (21)
  • rradules (12)
  • hiazmani (6)
  • wilrop (2)
  • mgoulao (2)
  • AdrienBolling (2)
  • KevayneCst (2)
  • threepwoody (2)
Top Labels
Issue Labels
documentation (1) priority (1) enhancement (1) good first issue (1)
Pull Request Labels
enhancement (3) documentation (3)

Dependencies

.github/workflows/build-publish.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/pre-commit.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi
  • PyOpenGL >=3.1.7
  • PyOpenGL-accelerate >=3.1.7
  • gymnasium >=0.28
  • numpy >=1.21.0
  • pettingzoo @git+https://github.com/Farama-Foundation/PettingZoo
setup.py pypi
.github/workflows/build-docs-dev.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/build-docs-version.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • dawidd6/action-get-tag v1 composite
docs/requirements.txt pypi
  • cython *
  • furo *
  • gymnasium *
  • myst-parser *
  • sphinx *
  • tqdm *
.github/workflows/manual-build-docs-version.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite