Code Monkey home page Code Monkey logo

ai-qmix's Introduction

AI-QMIX

Code for AI-QMIX: Attention and Imagination for Dynamic Multi-Agent Reinforcement Learning (Iqbal et al., arXiv 2006.04222)

This codebase is built on top of the PyMARL framework for multi-agent reinforcement learning algorithms.

Dependencies

  • Docker
  • NVIDIA-Docker (if you want to use GPUs)

Setup instructions

Build the Dockerfile using

cd docker
./build.sh

Set up StarCraft II.

./install_sc2.sh

Run an experiment

Run an ALGORITHM from the folder src/config/algs in an ENVIRONMENT from the folder src/config/envs on a specific GPU using some PARAMETERS:

./run.sh <GPU> python3 src/main.py --env-config=<ENVIRONMENT> --config=<ALGORITHM> with <PARAMETERS>

Add the --no-mongo flag before the "with" statement if you do not have a MongoDB database set up to log results (the results will still be logged in a local file).

Possible environments are:

  • firefighters: SaveTheCity environment from the paper
  • sc2custom: StarCraft environment from the paper

For each environment you can specify the set of scenarios to train/test on by including the parameter with scenario=<scenario_set_name>. Here are the possible scenario sets for each environment:

  • SaveTheCity
    • '2-8a_2-8b_05': train on 5% of the possible scenarios
    • '2-8a_2-8b_25': train on 25% of the possible scenarios
    • '2-8a_2-8b_45': train on 45% of the possible scenarios
    • '2-8a_2-8b_65': train on 65% of the possible scenarios
    • '2-8a_2-8b_85': train on 85% of the possible scenarios
    • '2-8a_2-8b_sim_Q1': train on the quartile of scenarios least similar to the testing ones
    • '2-8a_2-8b_sim_Q2': train on the quartile of scenarios 2nd least similar to the testing ones
    • '2-8a_2-8b_sim_Q3': train on the quartile of scenarios 2nd most similar to the testing ones
    • '2-8a_2-8b_sim_Q4': train on the quartile of scenarios most similar to the testing ones
  • StarCraft
    • '3-8sz_symmetric'
    • '3-8MMM_symmetric'

The testing scenarios are the same on all SaveTheCity scenario set

Possible algorithms are:

  • 'imagine_qmix': AI-QMIX (our method)
  • 'atten_qmix': A-QMIX
  • 'imagine_vdn': AI-VDN
  • 'atten_vdn': A-VDN

Citing our work

If you use this repo in your work, please consider citing the corresponding paper:

@article{iqbal2020ai,
  title={AI-QMIX: Attention and Imagination for Dynamic Multi-Agent Reinforcement Learning},
  author={Iqbal, Shariq and de Witt, Christian A Schroeder and Peng, Bei and B{\"o}hmer, Wendelin and Whiteson, Shimon and Sha, Fei},
  journal={arXiv preprint arXiv:2006.04222},
  year={2020}
}

ai-qmix's People

Contributors

shariqiqbal2810 avatar

Stargazers

 avatar

Forkers

gaosz0755

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.