github.com/BurnySc2/python-sc2

A StarCraft II bot api client library for Python 3

Open this visualization on its own page →

Contributors

40

Lines of Code

3,693

From

2017-08-14

To

2020-12-01

About BurnySc2/python-sc2

This is a Python 3 library for writing artificial intelligence bots for StarCraft II using the game's raw scripted API. It aims for simplicity and accessibility, with the philosophy that even basic bots like a worker rush should require minimal code. The library provides both high-level and low-level abstractions, with comprehensive documentation, type hints, and docstrings throughout the codebase to help bot authors understand how to use its core components.

The library requires Python 3.9 or newer and a local StarCraft II installation, which can be obtained through the Blizzard app on Windows and macOS or through Wine/Lutris on Linux. Users need to obtain maps separately from either official Blizzard downloads or the SC2 AI Arena Ladder, depending on whether they want to run casual games or compete on the ladder. Configuration options allow fine-tuning of bot performance through settings like unit command styles, distance calculation methods, and game step frequency.

The fork is actively maintained and makes more radical changes than the original Dentosal repository to improve bot performance and help new authors, with deprecation warnings provided for breaking changes. The project has an active community on the SC2 AI Arena Discord server and welcomes bug reports, feature requests, and pull requests from contributors.

Share this video