GithubHelp home page GithubHelp logo

00mjk / magent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geek-ai/magent

0.0 0.0 0.0 9.61 MB

A Platform for Many-agent Reinforcement Learning

License: MIT License

CMake 0.35% Python 45.80% Shell 0.06% C++ 44.36% HTML 1.48% JavaScript 7.34% C 0.61%

magent's Introduction

This project is no longer maintained

Please see https://github.com/PettingZoo-Team/MAgent for a maintained fork of this project that's installable with pip.

MAgent

MAgent is a research platform for many-agent reinforcement learning. Unlike previous research platforms that focus on reinforcement learning research with a single agent or only few agents, MAgent aims at supporting reinforcement learning research that scales up from hundreds to millions of agents.

Requirement

MAgent supports Linux and OS X running Python 2.7 or python 3. We make no assumptions about the structure of your agents. You can write rule-based algorithms or use deep learning frameworks.

Install on Linux

git clone [email protected]:geek-ai/MAgent.git
cd MAgent

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

bash build.sh
export PYTHONPATH=$(pwd)/python:$PYTHONPATH

Install on OSX

Note: There is an issue with homebrew for installing websocketpp, please refer to #17

git clone [email protected]:geek-ai/MAgent.git
cd MAgent

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]

bash build.sh
export PYTHONPATH=$(pwd)/python:$PYTHONPATH

Docs

Get started

Examples

The training time of following tasks is about 1 day on a GTX1080-Ti card. If out-of-memory errors occur, you can tune infer_batch_size smaller in models.

Note : You should run following examples in the root directory of this repo. Do not cd to examples/.

Train

Three examples shown in the above video. Video files will be saved every 10 rounds. You can use render to watch them.

  • pursuit

     python examples/train_pursuit.py --train
    
  • gathering

     python examples/train_gather.py --train
    
  • battle

     python examples/train_battle.py --train
    

Play

An interactive game to play with battle agents. You will act as a general and dispatch your soldiers.

  • battle game
    python examples/show_battle_game.py
    

Baseline Algorithms

The baseline algorithms parameter-sharing DQN, DRQN, a2c are implemented in Tensorflow and MXNet. DQN performs best in our large number sharing and gridworld settings.

Acknowledgement

Many thanks to Tianqi Chen for the helpful suggestions.

magent's People

Contributors

bywbilly avatar jkterry1 avatar kipsora avatar kornbergfresnel avatar merrymercy avatar passionke avatar seawan avatar timerchen avatar wnzhang 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.