Code Monkey home page Code Monkey logo

pysc2-agents's Introduction

PySC2 agents

This is a simple implementation of DeepMind's PySC2 RL agents. In this project, the agents are defined according to the original paper, which use all feature maps and structured information to predict both actions and arguments via an A3C algorithm.

Requirements

  • PySC2 is a learning environment of StarCraft II provided by DeepMind. It provides an interface for RL agents to interact with StarCraft II, getting observations and sending actions. You can follow the tutorial in PySC2 repo to install it.

  • Python packages might miss: tensorflow. If pip is set up on your system, it can be easily installed by running

pip install tensorflow-gpu

Getting Started

Clone this repo:

git clone https://github.com/xhujoy/pysc2-agents
cd pysc2-agents

Testing

  • Download the pretrained model from here and extract them to ./snapshot/.

  • Test the pretrained model:

python -m main --map=MoveToBeacon --training=False
  • You will get the following results for different maps.
MoveToBeacon CollectMineralShards DefeatRoaches
Mean Score ~25 ~62 ~87
Max Score 31 97 371

Training

Train a model by yourself:

python -m main --map=MoveToBeacon

Notations

  • Different from the original A3C algorithm, we replace the policy penalty term with epsilon greedy exploration.
  • When train a model by yourself, you'd better to run several times and choose the best one. If you get better results than ours, it's grateful to share with us.

Licensed under The MIT License.

pysc2-agents's People

Contributors

xiaowei-hu avatar yilei 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.