morl-baselines

Multi-Objective Reinforcement Learning algorithms implementations.

https://github.com/lucasalegre/morl-baselines

Science Score: 49.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, researchgate.net, springer.com
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

gym gymnasium mo-gymnasium morl multi-objective multi-objective-rl pytorch reinforcement-learning rl rl-algorithms

Keywords from Contributors

gym-environment embedded transformers cryptocurrencies diffusers optim interactive annotation distribution charts
Last synced: 6 months ago · JSON representation

Repository

Multi-Objective Reinforcement Learning algorithms implementations.

Basic Info
Statistics
  • Stars: 422
  • Watchers: 5
  • Forks: 80
  • Open Issues: 7
  • Releases: 5
Topics
gym gymnasium mo-gymnasium morl multi-objective multi-objective-rl pytorch reinforcement-learning rl rl-algorithms
Created over 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

Project Status: Active – The project has reached a stable, usable state and is being actively developed. tests License Discord pre-commit Code style: black Imports: isort

Multiple policies

MORL-Baselines

MORL-Baselines is a library of Multi-Objective Reinforcement Learning (MORL) algorithms. This repository aims to contain reliable MORL algorithms implementations in PyTorch.

It strictly follows MO-Gymnasium API, which differs from the standard Gymnasium API only in that the environment returns a numpy array as the reward.

For details on multi-objective MDPs (MOMDPs) and other MORL definitions, we suggest reading A practical guide to multi-objective reinforcement learning and planning. An overview of some techniques used in various MORL algorithms is also provided in Multi-Objective Reinforcement Learning Based on Decomposition: A Taxonomy and Framework.

A tutorial on MO-Gymnasium and MORL-Baselines is also available: Open in Colab

Features

  • Single and multi-policy algorithms under both SER and ESR criteria are implemented.
  • All algorithms follow the MO-Gymnasium API.
  • Performances are automatically reported in Weights and Biases dashboards.
  • Linting and formatting are enforced by pre-commit hooks.
  • Code is well documented.
  • All algorithms are automatically tested.
  • Utility functions are provided e.g. pareto pruning, experience buffers, etc.
  • Performances have been tested and reported in a reproducible manner.
  • Hyperparameter optimization available.

Implemented Algorithms

| Name | Single/Multi-policy | ESR/SER | Observation space | Action space | Paper | |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|-----------------------------|-----------------------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| | GPI-LS + GPI-PD | Multi | SER | Continuous | Discrete / Continuous | Paper and Supplementary Materials | | MORL/D | Multi | SER / ESR | Discrete / Continuous | Discrete / Continuous | Paper | | Envelope Q-Learning | Multi | SER | Continuous | Discrete | Paper | | CAPQL | Multi | SER | Continuous | Continuous | Paper | | PGMORL | Multi | SER | Continuous | Continuous | Paper / Supplementary Materials | | Pareto Conditioned Networks (PCN) | Multi | SER/ESR 1 | Continuous | Discrete / Continuous | Paper | | Pareto Q-Learning | Multi | SER | Discrete | Discrete | Paper | | MO Q learning | Single | SER | Discrete | Discrete | Paper | | MPMOQLearning (outer loop MOQL) | Multi | SER | Discrete | Discrete | Paper | | Optimistic Linear Support (OLS) | Multi | SER | / | / | Section 3.3 of the thesis | | Expected Utility Policy Gradient (EUPG) | Single | ESR | Discrete | Discrete | Paper | | Iterated Pareto Referent Optimisation (IPRO) | Multi | SER | Continuous | Discrete | Paper | | Iterated Pareto Referent Optimisation-2D (IPRO-2D) 2 | Multi | SER | Continuous | Discrete | Paper | | Non-Linear Multi-Objective PPO (NLMOPPO) | Single | SER | Continuous | Discrete | Derivation of the policy-gradient update in this paper | :warning: Some of the algorithms have limited features.

1: PCN assumes environments with deterministic transitions.
2: IPRO-2D is a two-objective specialisation of IPRO designed for efficiency gains, but it cannot be applied to settings with more than two objectives.

Benchmarking

MORL-Baselines participates to Open RL Benchmark which contains tracked experiments from popular RL libraries such as cleanRL and Stable Baselines 3.

We have run experiments of our algorithms on various environments from MO-Gymnasium. The results can be found here: https://wandb.ai/openrlbenchmark/MORL-Baselines. An issue tracking all the settings is available at #43. Some design documentation for the experimentation protocol are also available on our Documentation website. <!-- end benchmark -->

An example visualization of our dashboards with Pareto support is shown below: WandB dashboards

Structure

As much as possible, this repo tries to follow the single-file implementation rule for all algorithms. The repo's structure is as follows:

  • examples/ contains a set of examples to use MORL Baselines with MO-Gymnasium environments.
  • common/ contains the implementation recurring concepts: replay buffers, neural nets, etc. See the documentation for more details.
  • multi_policy/ contains the implementations of multi-policy algorithms.
  • single_policy/ contains the implementations of single-policy algorithms (ESR and SER).

Citing the Project

If you use MORL-Baselines in your research, please cite our NeurIPS 2023 paper:

bibtex @inproceedings{felten_toolkit_2023, author = {Felten, Florian and Alegre, Lucas N. and Now{\'e}, Ann and Bazzan, Ana L. C. and Talbi, El Ghazali and Danoy, Gr{\'e}goire and Silva, Bruno Castro da}, title = {A Toolkit for Reliable Benchmarking and Research in Multi-Objective Reinforcement Learning}, booktitle = {Proceedings of the 37th Conference on Neural Information Processing Systems ({NeurIPS} 2023)}, year = {2023} }

Maintainers

MORL-Baselines is currently maintained by Florian Felten (@ffelten) and Lucas N. Alegre (@LucasAlegre). <!-- end maintainers -->

Contributing

This repository is open to contributions and we are always happy to receive new algorithms, bug fixes, or features. If you want to contribute, you can join our Discord server and discuss your ideas with us. You can also open an issue or a pull request directly.

Acknowledgements

  • Willem Röpke (@wilrop), for his original implementation of IPRO(-2D) and reimplementation of non-linear MO-PPO and Pareto Q-Learning.
  • Mathieu Reymond, for providing us with the original implementation of PCN.
  • Denis Steckelmacher and Conor F. Hayes, for providing us with the original implementation of EUPG.
  • Jayden Teoh, for providing several improvements in different algorithms and the implementation of MOSAC discrete. <!-- end acknowledgements -->

Owner

  • Name: Lucas Alegre
  • Login: LucasAlegre
  • Kind: user
  • Location: Porto Alegre
  • Company: Institute of Informatics - UFRGS

PhD student at Institute of Informatics - UFRGS. Interested in reinforcement learning, machine learning and artificial (neuro-inspired) intelligence.

GitHub Events

Total
  • Create event: 8
  • Release event: 2
  • Issues event: 27
  • Watch event: 113
  • Delete event: 10
  • Issue comment event: 39
  • Push event: 41
  • Pull request review comment event: 10
  • Pull request event: 43
  • Pull request review event: 19
  • Fork event: 24
Last Year
  • Create event: 8
  • Release event: 2
  • Issues event: 27
  • Watch event: 113
  • Delete event: 10
  • Issue comment event: 39
  • Push event: 41
  • Pull request review comment event: 10
  • Pull request event: 43
  • Pull request review event: 19
  • Fork event: 24

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 391
  • Total Committers: 14
  • Avg Commits per committer: 27.929
  • Development Distribution Score (DDS): 0.529
Past Year
  • Commits: 25
  • Committers: 4
  • Avg Commits per committer: 6.25
  • Development Distribution Score (DDS): 0.28
Top Committers
Name Email Commits
Florian Felten f****n@u****u 184
Lucas Alegre l****e@g****m 98
lowlypalace l****e@g****m 41
Florian Felten 39
Willem Röpke w****e@v****e 14
Zonghao Li z****e@g****m 3
omid s****i@u****e 3
vaidas-sl 5****l 2
Mathieu Reymond m****d@g****m 2
noninho18 1****8 1
dependabot[bot] 4****] 1
Timon Deschamps t****h@g****m 1
Ikko Eltociear Ashimine e****r@g****m 1
Elion Hashani e****i@n****x 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 61
  • Total pull requests: 113
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 11 days
  • Total issue authors: 32
  • Total pull request authors: 18
  • Average comments per issue: 1.77
  • Average comments per pull request: 0.52
  • Merged pull requests: 87
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 20
  • Pull requests: 37
  • Average time to close issues: 6 days
  • Average time to close pull requests: 1 day
  • Issue authors: 13
  • Pull request authors: 8
  • Average comments per issue: 0.85
  • Average comments per pull request: 0.22
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • LucasAlegre (8)
  • nkirschi (7)
  • ffelten (5)
  • Saood1810 (4)
  • arshad171 (3)
  • osikazuzanna (3)
  • xwen24 (2)
  • wilrop (2)
  • AsadJeewa (2)
  • man469 (2)
  • wilhem (2)
  • hejincheng-bit (1)
  • oladayosolomon (1)
  • RuohLiuq (1)
  • 1Kraks (1)
Pull Request Authors
  • ffelten (43)
  • LucasAlegre (24)
  • wilrop (10)
  • JaydenTeoh (8)
  • nkirschi (5)
  • 1Kraks (3)
  • omidsbhn (3)
  • ChrisZonghaoLi (3)
  • AdrienBolling (2)
  • wilhem (2)
  • vaidas-sl (2)
  • lowlypalace (2)
  • timondesch (2)
  • dependabot[bot] (1)
  • thomaslautenb (1)
Top Labels
Issue Labels
enhancement (9) documentation (2) good first issue (2) new algo (2)
Pull Request Labels
enhancement (11) new algo (4) bug (3) dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 358 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: morl-baselines

Implementations of multi-objective reinforcement learning (MORL) algorithms.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 358 Last month
Rankings
Stargazers count: 5.8%
Forks count: 8.6%
Dependent packages count: 9.5%
Average: 21.6%
Dependent repos count: 62.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/deploy-docs.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 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
docs/requirements.txt pypi
  • furo *
  • myst-parser *
  • sphinx *
pyproject.toml pypi
  • cvxpy *
  • fire *
  • gymnasium >=0.28.1,<0.30
  • imageio *
  • mo-gymnasium >=1.0.1
  • moviepy *
  • numpy >=1.21.0
  • pygame >=2.1.0
  • pymoo >=0.6.0
  • scipy >=1.7.3
  • seaborn *
  • torch >=1.12.0
  • wandb >=0.14.0
setup.py pypi