Code Monkey home page Code Monkey logo

maca's Introduction

MaCA

Multi-agent Combat Arena (MaCA) is a heterogeneous multi-agent distributed decision and control technology reasearch platform produced by CETC-TFAI team. It focuses on the application of AI technologies e.g. reinforcement learning in multi-agent cooperation and confrontation

System Requirements

  • Linux 64-bit or Mac OS with Python 3.6
  • numpy 1.14.2 or later
  • pygame 1.9.3 or later

There is no limitation on agents' structure. You can write rule-based algorithms or use deep learning frameworks.

Quick Start Guide

Installation

pip install numpy pygame
git clone https://github.com/CETC-TFAI/MaCA.git
cd MaCA
export PYTHONPATH=$(pwd)/environment:$PYTHONPATH

Run a combat between two agents

fight.py can execute two agents. It uses two instances of a fixed-rule agent to fight each other by default.

python fight.py

You can specify agents and map by input arguments. In addition an agent should provide a call interface follows the MaCa platform specification.

Replay

MaCa can record runtime log while playing and training. Use replay.py to perform a replay.

First, run fight.py and enable log record function

python fight.py --log

Then, run replay.py to replay the log

python replay.py default_log

The log structure of MaCa is a set of .macalog files, they will save in path "log/log-name/". When you run the replay.py, You must input a "log-name" as the parameter to specify which log you want to replay.

Train

python train.py

MaCA provides an image based RL-API for deep reinforcement learning, but also a underlying data based RAW-API for other agent types e.g. fixed-rule agent development. Considering that different algorithms need different implementation methods and code structures, the training example can not be suitable for all algorithms. You can design your own algorithm and training script based on the two APIs.

maca's People

Contributors

leonfg avatar

Stargazers

 avatar  avatar

Watchers

 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.