pysc2

(★ 8,307)

StarCraft II Learning Environment

File Explorer

  • .gitignore
  • CONTRIBUTING.md
  • LICENSE
  • README.md
  • setup.py
  • WORKSPACE

# Installation Guide

python
Prerequisites

Setup Steps

pip install pysc2

Install PySC2 and dependencies using pip.

python -m pysc2.bin.agent --map Simple64

Run a default agent to test the environment.

Video Guides

DeepMind open source PySC2 toolset for Starcraft II

StarCraft II mini games for AI research

Key Commands

pip install pysc2

Install the PySC2 package and its Python dependencies.

python -m pysc2.bin.agent --map Simple64

Run an agent in the StarCraft II environment with a specified map.

python -m pysc2.bin.play --map Simple64

Launch the UI to play the game as a human or watch replays.

python -m pysc2.bin.map_list

List all configured maps available in the environment.

python -m pysc2.bin.run_tests

Run the project test suite.

StarCraft II must be installed, and you may need to set the SC2PATH environment variable if it is not in the default directory.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Release Timeline

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

python

View Details ▼

Python language interpreter.

python

Start a REPL (interactive shell):

python {{path/to/file.py}}

Execute a specific Python file:

python -i {{path/to/file.py}}

Execute a specific Python file and start a REPL:

// repository documentation