Git Product home page Git Product logo

safe-multi-agent-mujoco's Introduction

Safe Multi-Agent Mujoco

We introduce a safe Multi-Agent Reinforcement Learning Benchmark, Safe Multi-Agent MuJoCo (Safe MAMujoco), a safety-aware modification of MAMuJoCo. Safe MAMuJoCo agents learn to not only skilfully manipulate a robot, but also to avoid dangerous obstacles and positions, Figure 1 shows example views of the environment. (This repository is under actively development. We appreciate any constructive comments and suggestions)

In particular, the background environment, agents, physics simulator, and the reward function are preserved. However, as oppose to its predecessor, Safe MAMuJoCo environments come with obstacles, like walls or bombs. Furthermore, with the increasing risk of an agent stumbling upon an obstacle, the environment emits cost.

Figure.1 Example views of robots in Safe MAMuJoCo. Body parts of different colours are controlled by differentagents. Agents jointly learn to manipulate the robot, while avoiding crashing into unsafe areas.

Installation

LD_LIBRARY_PATH=${HOME}/.mujoco/mujoco200/bin;
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so
pip install -r requirements.txt

Test

Run test.py

python test.py

Tasks

    ManyAgent Ant
    env_args = {"scenario": "manyagent_ant",
                  "agent_conf": "3x2",
                  "agent_obsk": 1,
                  "episode_limit": 1000}

    env_args = {"scenario": "manyagent_ant",
                  "agent_conf": "2x3",
                  "agent_obsk": 1,
                  "episode_limit": 1000}
                  
    env_args = {"scenario": "manyagent_ant",
                  "agent_conf": "6x1",
                  "agent_obsk": 1,
                  "episode_limit": 1000}

    env_args = {"scenario": "manyagent_ant",
                "agent_conf": "4x2",
                "agent_obsk": 1,
                "episode_limit": 1000}
                
    env_args = {"scenario": "manyagent_ant",
                "agent_conf": "2x4",
                "agent_obsk": 1,
                "episode_limit": 1000}
                
                
    env_args = {"scenario": "manyagent_ant",
                "agent_conf": "8x1",
                "agent_obsk": 1,
                "episode_limit": 1000}
                
    HalfCheetah
    env_args = {"scenario": "HalfCheetah-v2",
                "agent_conf": "2x3",
                "agent_obsk": 1,
                "episode_limit": 1000}
                
    env_args = {"scenario": "HalfCheetah-v2",
                "agent_conf": "3x2",
                "agent_obsk": 1,
                "episode_limit": 1000}
                
    env_args = {"scenario": "HalfCheetah-v2",
                "agent_conf": "6x1",
                "agent_obsk": 1,
                "episode_limit": 1000}
                  
    Ant 
    env_args = {"scenario": "Ant-v2",
                "agent_conf": "2x4",
                "agent_obsk": 1,
                "episode_limit": 1000}

    env_args = {"scenario": "Ant-v2",
                "agent_conf": "8x1",
                "agent_obsk": 1,
                "episode_limit": 1000}

    env_args = {"scenario": "Ant-v2",
                "agent_conf": "2x4d",
                "agent_obsk": 1,
                "episode_limit": 1000}

    env_args = {"scenario": "Ant-v2",
                "agent_conf": "4x2",
                "agent_obsk": 1,
                "episode_limit": 1000}
                
   Coupled_half_cheetah
    env_args = {"scenario": "coupled_half_cheetah",
                "agent_conf": "1p1",
                "agent_obsk": 1,
                "episode_limit": 1000}
    Hopper
    env_args = {"scenario": "Hopper-v2",
                "agent_conf": "3x1",
                "agent_obsk": 1,
                "episode_limit": 1000}

Publication

If you find the repository useful, please cite the paper:

@article{gu2023safe,
  title={Safe Multi-Agent Reinforcement Learning for Multi-Robot Control},
  author={Gu, Shangding and Kuba, Jakub Grudzien and Chen, Yuanpei and Du, Yali and Yang, Long and Knoll, Alois and Yang, Yaodong},
  journal={Artificial Intelligence},
  pages={103905},
  year={2023},
  publisher={Elsevier}
}

Acknowledgments

We thank the list of contributors from the following open source repositories: MAMujoco, safety-gym, CMBPO.

safe-multi-agent-mujoco's People

Contributors

chauncygu avatar ziyan-wang98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

safe-multi-agent-mujoco's Issues

Cannot run the environment

I have tried to run the test.py. but met a bug.

Error:
ModuleNotFoundError: No module named 'onpolicy'

It seems there is no module named 'onpolicy' in this repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.