GithubHelp home page GithubHelp logo

faithmai / lica Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mzho7212/lica

0.0 1.0 0.0 40.58 MB

[NeurIPS 2020] PyTorch implementation of "Learning Implicit Credit Assignment for Cooperative Muti-Agent Reinforcement Learning"

Home Page: https://arxiv.org/abs/2007.02529

License: MIT License

Shell 1.18% Python 98.82%

lica's Introduction

Learning Implicit Credit Assignment for Cooperative Multi-Agent Reinforcement Learning (LICA)

This repository hosts the official PyTorch implementation of "Learning Implicit Credit Assignment for Cooperative Multi-Agent Reinforcement Learning". The implementation is based on the PyMARL framework and SMAC.

[PDF]

Setup

Set up the working environment:

pip3 install -r requirements.txt

Set up the StarCraftII game core

bash install_sc2.sh

Training

To train LICA on the 5m_vs_6m scenario,

python3 src/main.py --config=lica --env-config=sc2 with env_args.map_name=5m_vs_6m

Change the map_name accordingly for other scenarios (e.g. mmm2). Remember to update hyperparameters accordingly (e.g. regularization coefficient). All results will be saved in the results folder.

Evaluation

TensorBoard

The training tensorboards are saved in the results/tb_logs directory, containing useful info such as policy entropy trajectory and test battle win rate during training.

Saving models

Same as PyMARL, set save_model to True in src/config/default.yaml will save the learnt model during training (saved in result/ directory be default). The frequency for saving models can be adjusted using the parameter save_model_interval.

Loading models

Saved models can be loaded by adjusting the checkpoint_path parameter in src/config/default.yaml. For instance, to load model under path result/model/[timesteps]/agent.th, set checkpoint_path to result/model/[timesteps].

Saving Starcraft II Replay

The learned model loaded from checkpoint_path can be evaluated by setting evaluate to True in src/config/default.yaml. To save the Starcraft II replays, please make sure configure save_replay to True, and use the episode_runner.

Check out PyMARL documentation for more information.

Visualizations

The demo videos of two of the best battles performed by LICA agents (red) are available at visualizations/. The GIF previews are shown below:

5m_vs_6m MMM2

Citation

Please cite this work if you find it useful:

@article{zhou2020learning,
  title={Learning Implicit Credit Assignment for Cooperative Multi-Agent Reinforcement Learning}, 
  author={Meng Zhou and Ziyu Liu and Pengwei Sui and Yixuan Li and Yuk Ying Chung},
  journal={arXiv preprint arXiv:2007.02529},
  year={2020}
}

Contact

Please email mzho7212 AT gmail.com and kenziyuliu AT outlook.com for further questions.

See Also

See SMAC and PyMARL for additional instructions.

lica's People

Contributors

kenziyuliu avatar mzho7212 avatar

Watchers

James Cloos avatar

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.