• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 5 years ago

Reviews

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

Repository Details

Startcraft II Machine Learning research with DeepMind pysc2 python library .mini-games and agents.

GitHub license GitHub issues GitHub stars GitHub forks Twitter

Startcraft PySC2 mini-games and agents

This repository aims to serve as a guide for open source contributing in minigame pysc2 library for Starcraft II For minigame instalation for execution you should go to the official repository and install requirements

Direct Links

Please, if you want to reach directly mini-games click to the following link

Minigame task description

Minigames come as a controled environments that might be useful to exploit game features in SC2. General purpose learning system for Startcraft 2 can be a daunting task. So there is a logical option in splitting this tasks into minitask in orther to advance in research . Mini-games focus on different elements of Starcraft II Gameplay .

To investigate elements of the game in isolation, and to provide further fine-grained steps towards playing the full game, Deepmind has built several mini-games. These are focused scenarios on small maps that have been constructed with the purpose of testing a subset of actions and/or game mechanics with a clear reward structure. Unlike the full game where the reward is just win/lose/tie, the reward structure for mini-games can reward particular behaviours (as defined in a corresponding .SC2Map file).

Minigame introduction and Repo information

Before creating a minigame, I encourage you to run the alredy developed ones to see wich task are subdivided into each minigame as the reward function could be important due to the behaviour that leads to learning . The minigame title gives us a description of the goal You might find in this repo new maps created for investigate in explotation-exploration dilema and some programming about the functions of different units .

SentryDefense , ForceField , HallucinIce and FlowerFields Projects

In this repo, besides information about current minigames, you will find my own minigames development . In projects section you can know more about the state of the art and in docs and new_minigames folder you can find the map. In SentryDefense, a arrowhead TerranVSProtoss Melee is proposed . In ForceField,an imbalanced situation between Sentry and Zerg units forces sentry to use forcefield, adding terrain disposition.

1.- SentryDefense: Protoss VS Terran Melee.

2.- ForceField: Learn about Sentry forcefield function.

3.- HallucinIce: Learn how to play with hallucination.

4.- FlowerFields: Defeat protoss photon cannon .

5.-TheRightPath: Move to beacon finding the optimal route collecting minerals and avoiding mines .

6.-RedWaves: Choose your race and defend against waves of zerg attacks .

7.-BlueMoon: Choose unit development to defend against protoss development . (under construction)

8.-MicroPrism: Learn how to use Warp Prism in a protoss versus protoss stalker melee

Agents

Regarding scripted agent, there is a python file with several developments. Scriptedagent.py is focused on HallucinIce map in which makes Archon Hallucination. Besides there is another class that put all hallucination actions on a list and the agent chooses randomly in between those actions .

Q-Learning and DQN agents are provided for HallucinIce minigame with the new PySC2 release

An A3C trained agent has been tested with several minigames, reaching some of them a local optima . Please, report problems in issues if you currently find problems .

How to run mini-games in your environment

  1. Download or clone the repository, or download all minigames clicking here

  2. Place the .SC2 files into /Applications/StarCraft II/Maps/mini_games/ -sometimes the Map folder might not exist. If so, please create it-

  3. Go to pysc2\maps\mini_games.py and add to mini-games array the following mini-games names

mini_games = [  ## This mini-games names should alredy been in your list
    "BuildMarines",  # 900s
    "CollectMineralsAndGas",  # 420s
    "CollectMineralShards",  # 120s
    "DefeatRoaches",  # 120s
    "DefeatZerglingsAndBanelings",  # 120s
    "FindAndDefeatZerglings",  # 180s
    "MoveToBeacon",  # 120s   ##Now you add this few lines 
    "SentryDefense", # 120s
    "ForceField", # 30s
    "HallucinIce", # 30s
    "FlowerFields", # 60s
    "TheRightPath", # 300s
    "RedWaves", # 180s
    "BlueMoon", # 60s
    "MicroPrism", # 45s
]
  1. In your console, you can type the mini-game map name
my-computer:~ me$ python -m pysc2.bin.agent --map FlowerFields 

Tutorial

Find an ongoing tutorial about how to create your own mini-game here

Other repository

With features with map placement here

'Making a reward function isn’t that difficult. The difficulty comes when you try to design a reward function that encourages the behaviors you want while still being learnable.' -Deep Reinforcement Learning Doesn´t work yet , Alex Irpan post-

More Repositories

1

pySC2_minigames

Curated list of pysc2 mini-games . Singleton Environmnets.Debugged by @SoyGema and mini-game authors
43
star
2

Starcraft_2_Data_Analysis

Data analysis of Starcraft II replays . Visualization and classification models
Jupyter Notebook
28
star
3

Deep_Asteroid

OpenNASA Space Apps Challenge Global Finalist Project
Python
22
star
4

Tensorflow_CodeLab_Wide-Deep_learning

Wide+Deep learning Neural Network Tensorflow
Jupyter Notebook
20
star
5

Prophet_forecasting

Using Facebook phrophet forecasting tool for Asteroid impact on earth time series study
Jupyter Notebook
11
star
6

The-Lord-of-The-Words-The-two-frameworks

Translation exploration with Transformers and Machine Learning Experimentation Platfroms
Jupyter Notebook
7
star
7

Numpy_exploration

Numpy library exploration . Implementations of algorithms in numpy
Jupyter Notebook
6
star
8

Tensorflow_LinearRegression

Example of Linear regression using Tensorflow with GOT DataSet
Jupyter Notebook
6
star
9

Neural-Machine-Translation

Neural Machine Translation Project
Jupyter Notebook
6
star
10

Alice_In_SequenceLand

Alice in wonderland text generator with Neural Networks
Jupyter Notebook
5
star
11

Limbic_System

Data gathering. Cognitive Experiments. Neural Net Experimentation , from classification to Architecture model Design
Python
5
star
12

pulling_ace

Python
4
star
13

OpenAI

OpenAI enviroments exercise and conclussions
Jupyter Notebook
4
star
14

ASTRON_Hackathon

Scalable Astronomy data management
Jupyter Notebook
3
star
15

SoyGema

Presentation Repository
3
star
16

starcraftII_machine_learning

Web deployment
HTML
3
star
17

TensorFlow_Gdgcloud_London

Talk and resources about TensorFlow in 20th June talk at GDG Cloud London
Jupyter Notebook
3
star
18

ML-agents-GAIL

2
star
19

Data_Science

Data visualization, TensorFlow architecture with deep_asteroid project , examples and basics
Jupyter Notebook
2
star
20

OSS_activity

Activity of OSS contribs and learnings
1
star
21

Portfolio

Portfolio of some Data Science Projects
Jupyter Notebook
1
star
22

Python_Coding_Practice

Python Coding Practice Katas
Python
1
star
23

SoyGema.github.io

WebPage projects
HTML
1
star
24

polyaxon_pySC2

Polyaxon training experiment for Starcraft II pySC2 agent
Python
1
star
25

Deep_Reinforcement_Learning

DRL experiment with Taxi-v2 env
Python
1
star
26

pysc2_Talk

Talk, HallucinIce mini game and scripted agent for AI workshop ( Blizzard+Deepmind ) Blizzcon 2017 and BigDataSpain
Python
1
star
27

CSharp_katas

Katas to get agile with the language
C#
1
star
28

VSCode-DVC-Experiments-Template

Template for DVC VSCode Experiments
Python
1
star
29

Reinforcement_Learning_practice

Experiments with RLlib with gym environments
Jupyter Notebook
1
star
30

pysc2_protoss_tutorial

Protoss Agent for pysc2
Python
1
star