Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

MAGIC

> 编程语言
Open source

Public implementation of "Multi-Agent Graph-Attention Communication and Teaming" from AAMAS'21

100 stars0 likes1 views
WebsiteGitHub

About

Public implementation of "Multi-Agent Graph-Attention Communication and Teaming" from 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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

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