百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MAGIC

> 编程语言
开源

从 AAMAS'21 中公开实现"多代理图形注意力通信和团队合作"

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

从 AAMAS'21 中公开实现"多代理图形注意力通信和团队合作"

MAGIC Implementation

This is the codebase for "Multi-Agent Graph-Attention Communication and Teaming," which is published in AAMAS 2021 (oral) and presented at ICCV 2021 Mair2 Workshop (best paper award). The presentation video of this work can be found here. A short video demo can be found here. The implementation is in three domains including Predator-Prey, Traffic-Junction, and Google Researh Football.

Authors: Yaru Niu*, Rohan Paleja*, Matthew Gombolay

Requirements

  • OpenAI Gym
  • PyTorch 1.5 (CPU)
  • visdom
  • Predator-Prey and Traffic Junction Environments
  • Fork from authors' version of Google Research Football

Testing Environment Setup

  • Predator-Prey and Traffic Junction (from IC3Net)
    bash
    cd envs/ic3net-envs
    python setup.py develop
  • Google Research Football
    Install required apt packages with:
    bash
    sudo apt-get install git cmake build-essential libgl1-mesa-dev libsdl2-dev \
    libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev libboost-all-dev \
    libdirectfb-dev libst-dev mesa-utils xvfb x11vnc libsdl-sge-dev python3-pip
    Install the game of author's version (added multi-agent observations and fixed some bugs):
    bash
    git clone https://github.com/chrisyrniu/football.git
    cd football
    pip install .
    Install the multi-agent environment wrapper for GRF (each agent will receive a local observation in multi-agent settings)
    bash
    cd envs/grf-envs
    python setup.py develop

Training MAGIC

-Run python main.py --help to check all the options.
-Use --first_graph_complete and --second_graph_complete to set the corresponding communication graph of the first round and second round to be complete (disable the sub-scheduler), respectively.
-Use --comm_mask_zero to block the communication.

  • Predator-Prey 5-agent scenario: sh train_pp_medium.sh
  • Predator-Prey 10-agent scenario: sh train_pp_hard.sh
  • Traffic-Junction 5-agent scenario: sh train_tj_easy.sh
  • Traffic-Junction 10-agent scenario: sh train_tj_medium.sh
  • Traffic-Junction 20-agent scenario: sh train_tj_hard.sh
  • Google Research Football 3 vs. 2 (3-agent) scenario: sh train_grf.sh

Training Baselines

-cd baselines
-Run python run_baselines.py --help to check all the options.
-Use --comm_action_one to force all agents to always communicate all (other) agents.
-Use --comm_mask_zero to block the communication.
-Use --commnet to enable CommNet, --ic3net to enable IC3Net, --tarcomm and --ic3net to enable TarMAC-IC3Net, and --gacomm to enable GA-Comm.
-The learning rate for IC3Net in Google Research Football was adjusted as 0.0007, otherwise it was kept as 0.001.

  • Predator-Prey 5-agent scenario: sh train_pp_medium.sh
  • Predator-Prey 10-agent scenario: sh train_pp_hard.sh
  • Traffic-Junction 5-agent scenario: sh train_tj_easy.sh
  • Traffic-Junction 10-agent scenario: sh train_tj_medium.sh
  • Traffic-Junction 20-agent scenario: sh train_tj_hard.sh
  • Google Research Football 3 vs. 2 (3-agent) scenario: sh train_grf.sh

Visualization

  • Check training progress
    Use visdom with --plot. --plot_env should be followed by the name of this plotting environment. --plot_port should be followed by the port number you want to use.
  • Plot with multiple log files
    Use plot_script.py (log files in saved/):
    bash
    python plot.py saved/ title Reward
    python plot.py saved/ title Steps-Taken

Citation

If you find our paper and repo helpful to your research, please consider citing the paper:

@inproceedings{niu2021multi,
  title={Multi-Agent Graph-Attention Communication and Teaming},
  author={Niu, Yaru and Paleja, Rohan and Gombolay, Matthew},
  booktitle={Proceedings of the 20th International Conference on Autonomous Agents and MultiAgent Systems},
  pages={964--973},
  year={2021}
}

Reference

The training framework is adapted from IC3Net

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言