• Stars
    star
    753
  • Rank 60,280 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

StarCraft II - pysc2 Deep Reinforcement Learning Examples

StartCraft II Reinforcement Learning Examples

This example program was built on

Current examples

Minimaps

  • CollectMineralShards with Deep Q Network

CollectMineralShards

Quick Start Guide

1. Get PySC2

PyPI

The easiest way to get PySC2 is to use pip:

$ pip install git+https://github.com/deepmind/pysc2

Also, you have to install baselines library.

$ pip install git+https://github.com/openai/baselines

2. Install StarCraft II

Mac / Win

You have to purchase StarCraft II and install it. Or even the Starter Edition will work.

http://us.battle.net/sc2/en/legacy-of-the-void/

Linux Packages

Follow Blizzard's documentation to get the linux version. By default, PySC2 expects the game to live in ~/StarCraftII/.

3. Download Maps

Download the ladder maps and the mini games and extract them to your StarcraftII/Maps/ directory.

4. Train it!

$ python train_mineral_shards.py --algorithm=a2c

5. Enjoy it!

$ python enjoy_mineral_shards.py

4-1. Train it with DQN

$ python train_mineral_shards.py --algorithm=deepq --prioritized=True --dueling=True --timesteps=2000000 --exploration_fraction=0.2

4-2. Train it with A2C(A3C)

$ python train_mineral_shards.py --algorithm=a2c --num_agents=2 --num_scripts=2 --timesteps=2000000
Description Default Parameter Type
map Gym Environment CollectMineralShards string
log logging type : tensorboard, stdout tensorboard string
algorithm Currently, support 2 algorithms : deepq, a2c a2c string
timesteps Total training steps 2000000 int
exploration_fraction exploration fraction 0.5 float
prioritized Whether using prioritized replay for DQN False boolean
dueling Whether using dueling network for DQN False boolean
lr learning rate (if 0 set random e-5 ~ e-3) 0.0005 float
num_agents number of agents for A2C 4 int
num_scripts number of scripted agents for A2C 4 int
nsteps number of steps for update policy 20 int

More Repositories

1

ml-engineer-roadmap

WIP: Roadmap to becoming a machine learning engineer in 2020
2,107
star
2

mlops-example

Tensorflow 2.0 + Sacred + AI Platform + Microsoft NNI
Python
91
star
3

mario-rl-tutorial

Reinforcement Learning Tutorial on Super Mario
Python
89
star
4

haiku-scalable-example

Scalable distributed reinforcement learning agents on kubernetes
Python
57
star
5

research-ci-tutorial

Python
29
star
6

kubeflow-tutorial

Python
22
star
7

unity-clicker-game

C#
21
star
8

jax-tutorial

Jupyter Notebook
20
star
9

ml-study-materials

11
star
10

CoreGameServer

ASP.NET Core๋ฅผ ํ™œ์šฉํ•œ ์ƒ˜ํ”Œ ๊ฒŒ์ž„์„œ๋ฒ„
C#
11
star
11

fastapi-tutorial

Python
10
star
12

kubernetes-tutorial

Dockerfile
10
star
13

tensorflow-rl

ํ…์„œํ”Œ๋กœ์šฐ ๊ฐ•ํ™”ํ•™์Šต ํŠœํ† ๋ฆฌ์–ผ : AlphaGo๋ถ€ํ„ฐ ์Šคํƒ€ํฌ๋ž˜ํ”„ํŠธ2 ๊ฐ•ํ™”ํ•™์Šต ์—์ด์ „ํŠธ ๋งŒ๋“ค์–ด๋ณด๊ธฐ
Python
10
star
14

bentoml-tutorial

Python
9
star
15

mlflow-tutorial

Python
8
star
16

sagemaker-mlops

Jupyter Notebook
6
star
17

starcraft2-docker

6
star
18

Unity3DBook

Java
6
star
19

lovelybot

LovelyBot
Python
5
star
20

bandits-baseline

Python
5
star
21

papers-rl

5
star
22

bandit-api

Python
5
star
23

unity-core-server-login

C#
4
star
24

kpop-classifier

HTML
4
star
25

lovelybot-emotion

๊ฐ์ • ๋ถ„์„ ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•œ ์ฑ—๋ด‡ API
Python
4
star
26

luigi-tutorial

Python
3
star
27

research-ci-example

Python
3
star
28

haiku-a3c

A3C implementation on haiku
3
star
29

atari-docker

Dockerize Atari RL env
3
star
30

xmodel

Multi Cloud Model Management System for Machine Learning
Python
2
star
31

master-leetcode

Master 400 leetcode problems
Python
2
star
32

python-ci-example

Python
2
star
33

docker-tutorial

Python
2
star
34

tf-pacman

Control Pacman with Tensorflow.js
JavaScript
2
star
35

Unity3DBookPPT

๋‚˜ํ™€๋กœ ๊ฐœ๋ฐœํ•˜๋Š” ์œ ๋‹ˆํ‹ฐ3D ์•ก์…˜๊ฒŒ์ž„
2
star
36

unity-dialog

C#
1
star
37

sutton-rl

1
star
38

python-backend-101

1
star
39

reinforcement-governor

Python
1
star
40

tf-stock-prediction

JavaScript
1
star
41

sagemaker-sklearn

Jupyter Notebook
1
star
42

teachable-machine-tutorial

JavaScript
1
star
43

unity-core-server-complete

C#
1
star
44

awesome-bigquery

1
star
45

pydantic-tutorial

Jupyter Notebook
1
star
46

research-ci-sai

Python
1
star
47

unity-choice-game

C#
1
star
48

zkml-benchmark

Jupyter Notebook
1
star
49

zoe

Zoe: Zkml Optimization Engine
TypeScript
1
star