pysc2-examples  by chris-chris

StarCraft II reinforcement learning examples

created 8 years ago
757 stars

Top 46.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides example implementations for deep reinforcement learning agents within the StarCraft II environment using the PySC2 library. It targets researchers and developers looking to experiment with RL algorithms in a complex, real-time strategy game setting, offering a practical starting point for building and training agents.

How It Works

The project leverages the PySC2 API to interact with StarCraft II, enabling agents to observe game states and execute actions. It integrates with the OpenAI Baselines library for common RL algorithm implementations, specifically demonstrating Deep Q-Networks (DQN) and Advantage Actor-Critic (A2C). This combination allows for structured experimentation with established RL techniques in a challenging domain.

Quick Start & Requirements

  • Install PySC2 and OpenAI Baselines:
    pip install git+https://github.com/deepmind/pysc2
    pip install git+https://github.com/openai/baselines
    
  • Requires a purchased or Starter Edition of StarCraft II installed.
  • Download and extract ladder maps and mini-games to StarcraftII/Maps/.
  • Training command example: python train_mineral_shards.py --algorithm=a2c
  • Official PySC2 documentation: https://github.com/deepmind/pysc2

Highlighted Details

  • Demonstrates training agents for the CollectMineralShards mini-game.
  • Supports both Deep Q-Network (DQN) and Advantage Actor-Critic (A2C) algorithms.
  • Configurable parameters include learning rate, number of agents, and exploration fraction.
  • Utilizes TensorFlow 1.3 for model implementation.

Maintenance & Community

This repository appears to be a personal project with no explicit mention of active maintenance, contributors, or community channels in the provided README.

Licensing & Compatibility

The README does not explicitly state a license for this repository. It relies on dependencies with their own licenses: PySC2 (Apache 2.0), Baselines (MIT), s2client-proto (Blizzard, likely proprietary), and TensorFlow 1.3 (Apache 2.0). Compatibility for commercial use would depend on the licensing of StarCraft II itself and any unstated license for this code.

Limitations & Caveats

The project is built on TensorFlow 1.3, which is significantly outdated and unsupported. The README does not mention support for newer RL algorithms or PySC2 features, and the lack of community or maintenance signals suggest potential abandonment.

Health Check
Last commit

4 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.