Giter Club home page Giter Club logo

mtmfrl's Introduction

Multi Type Mean Field Reinforcement Learning

Implementation of MTMFQ in the paper Multi Type Mean Field Reinforcement Learning.

The environments contain 4 teams training and fighting against each other. Multi Battle Game environment has four teams with 72 agents each.

Code structure

  • See folder Multibattle for training and testing environments of the Multi battle environment.

  • See folder Multigather for training and testing environments of the Multi gather environment.

  • See folder Predatorprey for training and testing environments of the Predaotor Prey environment.

In each of these three game directories, the files most relevant to our research are:

  • /mfrl/examples/battle_model/python/magent/builtin/config/battle.py: Script that defines the rewards for the different games and is game-dependent.

  • /mfrl/examples/battle_model/senario_battle.py: Script to run the training and testing, which other scripts call into, and is game-dependent.

  • /mfrl/train_battle.py: Script to begin training the game for 2000 iterations and almost identical across games. The algorithm can be specified as a parameter (MFAC, MFQ, IL, or MTMFQ).

  • /mfrl/battle.py: Script to run comparative testing (creating 4 types of agents, where each type is one of the 4 algorithms) and is almost identical across games.

  • /mfrl/examples/battle_model/algo: This directory contains the learning algorithms, and is identical across all three games.

Instructions for Ubuntu

Requirements

Atleast

  • python==3.6.1
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
  • gym==0.9.2
pip install gym
  • scikit-learn==0.22.0
sudo pip install scikit-learn
  • tensorflow 2

Check Documentation.

  • libboost libraries
sudo apt-get install cmake libboost-system-dev libjsoncpp-dev libwebsocketpp-dev

Clone the repository

git clone https://github.com/BorealisAI/mtmfrl

Build the MAgent framework

cd mtmfq/multibattle/mfrl/examples/battle_model
./build.sh

Similarly change directory and build for multigather and predatorprey folders for those testbeds.

Training and Testing

cd mtmfq/multibattle/mfrl
export PYTHONPATH=./examples/battle_model/python:${PYTHONPATH}
python3 train_battle.py --algo mtmfq

Run file battle.py for running the test battles.

For more help, look at the instrctions in MAgent and MFRL

Instructions for OSX

Clone the repository

git clone https://github.com/BorealisAI/mtmfrl

Install dependencies

cd mtmfq
brew install cmake llvm [email protected]
brew install jsoncpp argp-standalone
brew tap david-icracked/homebrew-websocketpp
brew install --HEAD david-icracked/websocketpp/websocketpp
brew link --force [email protected]

Build MAgent Framework

cd mtmfq/multibattle/mfrl/examples/battle_model
./build.sh

Similarly change directory and build for multigather and predatorprey folders for those testbeds.

Training and Testing

cd mtmfq/multibattle/mfrl
export PYTHONPATH=./examples/battle_model/python:${PYTHONPATH}
python3 train_battle.py --algo mtmfq

Run file battle.py for running the test battles.

For more help, look at the instrctions in MAgent and MFRL

Note

This is research code and will not be actively maintained. Please send an email to [email protected] for questions or comments.

Paper citation

If you found it helpful, please cite the following paper:

@InProceedings{Srirammtmfrl2020,
  title = 	 {Multi Type Mean Field Reinforcement Learning},
  author = 	 {Ganapathi Subramanian, Sriram and Poupart, Pascal and Taylor, Matthew E. and Hegde, Nidhi}, 
  booktitle = 	 {Proceedings of the Autonomous Agents and Multi Agent Systems (AAMAS 2020)},
  year = 	 {2020},
  address = 	 {Auckland, New Zealand},
  month = 	 {9--13 May},
  publisher = 	 {IFAAMAS}
}

mtmfrl's People

Contributors

sriram94 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.