GithubHelp home page GithubHelp logo

mfrl's Introduction

Mean Field Multi-Agent Reinforcement Learning

A PyTorch implementation of MF-Q and MF-AC in the paper Mean Field Multi-Agent Reinforcement Learning .

Example

image

An 20x20 Ising model example under the low temperature.

A 40x40 Battle Game gridworld example with 128 agents, the blue one is MFQ, and the red one is IL.

Code structure

  • main_MFQ_Ising.py: contains code for running tabular based MFQ for Ising model.

  • ./examples/: contains scenarios for Ising Model and Battle Game (also models).

  • battle.py: contains code for running Battle Game with trained model

  • train_battle.py: contains code for training Battle Game models

Compile Ising environment and run

Requirements

  • python==3.6.1
  • gym==0.9.2 (might work with later versions)
  • matplotlib if you would like to produce Ising model figures

Compile MAgent platform and run

Before running Battle Game environment, you need to compile it. You can get more helps from: MAgent

Steps for compiling

cd examples/battle_model
./build.sh

Steps for training models under Battle Game settings

  1. Add python path in your ~/.bashrc or ~/.zshrc:

    vim ~/.zshrc
    export PYTHONPATH=./examples/battle_model/python:${PYTHONPATH}
    source ~/.zshrc
  2. Run training script for training (e.g. mfac):

    python3 train_battle.py --algo mfac

    or get help:

    python3 train_battle.py --help

Paper citation

If you found it helpful, consider citing the following paper:



@InProceedings{pmlr-v80-yang18d,
  title = 	 {Mean Field Multi-Agent Reinforcement Learning},
  author = 	 {Yang, Yaodong and Luo, Rui and Li, Minne and Zhou, Ming and Zhang, Weinan and Wang, Jun},
  booktitle = 	 {Proceedings of the 35th International Conference on Machine Learning},
  pages = 	 {5567--5576},
  year = 	 {2018},
  editor = 	 {Dy, Jennifer and Krause, Andreas},
  volume = 	 {80},
  series = 	 {Proceedings of Machine Learning Research},
  address = 	 {Stockholmsmässan, Stockholm Sweden},
  month = 	 {10--15 Jul},
  publisher = 	 {PMLR}
}

mfrl's People

Contributors

kornbergfresnel avatar mlii avatar wwxfromtju 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.