Skip to content

Python framework for rapid development of Starcraft 2 AI bots

License

Notifications You must be signed in to change notification settings

DrInfy/sharpy-sc2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sc2-sharpy

Python framework for rapid development of Starcraft 2 AI bots

Sharpy uses python-sc2 and it is the framework used by Sharpened Edge.

Work in progress

The framework has all the necessary components to run the dummy bots that are used for testing against Sharpened Edge. The folder structure is subject to change.

Requirements

Python 3.7 (>=3.8 is not supported yet)

Ladder Dummy Bots

To build dummy bot for ladder, run ladder_zip.py. Bots will appear as individual zip files in publish folder.

Getting started

Read the getting started guide.

Using Virtual Environment

Windows

Virtual Environments (venv) can be used to isolate this project's Python dependencies from other projects.

You can create a virtual environment for this project with

venv-create.bat

And activate it with

venv-activate.bat

Venv needs to be activated for every new console window, so it may be helpful to create an alias such as

doskey sharpy=cd C:\Dev\sharpy-sc2 $T venv-activate.bat

More information about virtual environments can be found from the documentation.

Other operating systems

You may replicate the commands used by the above bat scripts to work on your own operating system.

Running tests

Tests are written using pytest framework.

To install requirements for tests run

pip install -r requirements.dev.txt

To run the tests use

pytest

pytest follows standard test discovery rules and will run all tests in the current directory and its subdirectories.

For new tests, make sure that...

  1. file name follows the naming pattern of *_test.py
  2. the test class name starts with Test*
  3. all test methods start with test_*.