An interface to request SC2 matches and launch the client for human and/or AI/bot play
Project description
Play Starcraft 2 on a ladder as a human or AI against other human AI
About
The objective of this repository is enable casual Starcraft 2 players, AI developers and proficient coders to all create a player that competes against others in a Starcraft 2 match. The strategy is to create an increasingly user-friendly interface so that most anybody can readily set up matches and play against
Rationale: Why Create this Repository?
There is an existing ladder for AI-only developers, sc2ai.net. While that project is under active development as of July 6, 2018, its roadmap doesn't support several critical features which impedes developers' efforts (such as ours) to create AI that is publicly visible. Here are several features which this ladder supports that sc2ai.net may not.
- Play on your own machine against others on their own machines. You're no longer limited by some other person's machine who is sharing system resources with other players in the game.
- Support AI vs AI, AI vs human and human vs human play.
- AI developers aren't required to share their source code or any executable.
- Fast, user-friendly setup that non-programmers or programmers with lower proficiency in a specific language can set up. No need to hunt + edit files by hand.
Brief Functional Overview
This sc2gameLobby package's primary functions are as follows:
- Issue match requests such that other available players or static bots can be matched against you. When being matched against opponents, if no valid opponents are available for a match with you in the queue, you are automatically matched instead against other publicly available bot algorithms or Blizzard's built-in bots depending on your estimated proficiency.
- Launch a Starcraft 2 client that will automatically manage the match along with other Starcraft 2 clients (as needed). The match is played until its finished.
- Each player using sc2gameLobby reports results back to the ladder. The ladder verifies each player's reported results against its own intimate knowledge of the match to accurately determine the proper match result and update the ladder accordingly.
Communication with the ladder server occurs via TCP connection with a django server available on the internet. It is possible to communicate with alternative ladders, but we've established this server form normal sc2gameLobby gameplay.
Installation
System Requirements
- sc2gameLobby is proven using both Linux (using wine) and Windows. While untested on OSX, because OSX is also widely tested using pysc2, sc2gameLobby is also expected to work without issue. NOTE: Linux is not a platform officially supported by Blizzard for Starcraft 2, but it does work, both using headless and regular setups using full graphics.
- As a human, your own system must be able to support a Starcraft 2 client application (the window that actually plays the game). Reference standard Starcraft 2 game requirements for details.
- As an AI, in addition to the requirements for human play, as well as any other resources your AI may require. If your AI architecture can run, it is allowed on this ladder.
Instructions
- Install Starcraft 2 normally. IMPORTANT If you use an install destination path other than the default, ensure
the environment variable
SC2PATH
is set with the path to your customized installation path. - Install any(?) version of python that is compatible with your system.
- Use conda or pip via instructions below to install sc2gameLobby.
NOTE: you can also install this package via other means, but you may have to manage your environment to ensure all dependencies are available on your system. If you're not familiar with these utilities, follow the installation instructions provided by their authors available on the internet.
Conda
From a command line, enter a standard conda install command that's compatible with your system setup. Be sure you're targeting the intended environment!
EXAMPLE: conda install sc2gameLobby -n <your development environment name>
Pip
From a command line, enter a standard pip install command that's compatible with your system setup.
EXAMPLE: pip install sc2gameLobby
Dependencies
This sc2gameLobby package is indended to run with python version >= 3.5. Package dependencies are defined in requirements.txt. Dependencies are installed automatically when using the installation methods above.
Verification of Valid Installation
If your setup is fully successful, the following test commands should work as follows:
test command: python -m sc2gameLobby --help
usage: __main__.py [-h] [--nogui] [--search PLAYERS] [--history] [-l] [-p]
...
PURPOSE: front-end interface to easily and reliably match against opponents
and run Starcraft2 opponents.
...
version: 1.0.0
test command: > python -m sc2gameLobby --versions
...
4.4.0
base-version: 65895
data-hash: BF41339C22AE2EDEBEEADC8C75028F7D
fixed-hash:
label: 4.4.0
replay-hash:
version: 65895
test command: python -m sc2gameLobby --search mapexplorer
<PlayerRecord mapexplorer ai>
type : <PlayerDesigns ai>
difficulty : None
initCmd : sc2ai.agents.newExplorer
rating : 0
created : 2018-05-28
Troubleshooting
ERROR: A connection could not be made. <Ladder versentiedge> may not be available or you may not be connected to the internet.
This means that the ladder server instance you are attempting to communicate with could not be reached. It may not be online or your connection to the internet may be compromised.
<reserved for additional issues if/when such are reported>
Recommended Usage
Great, now you're set to rock ladder matches versus humans and AI opponents! Refer to python-specific or non python-specific usage documents. Good luck!
Further Development and Augmentation
Add New Features to the Code?
This is an open-use repository. Feel free to fork and issue pull requests. Feature enhancements, especially for to-be-developed features, and bug fixes are especially appreciated.
Anticipated Useful, To-Be-Developed Features
- User-friendly GUI front end that abstracts the command-line utilities.
- Web browser integration to perform match requests.
- Publicly available web page statistics from data mining match results.
- Additional game modes beyond 1v1.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file sc2gameLobby-1.1.13.tar.gz
.
File metadata
- Download URL: sc2gameLobby-1.1.13.tar.gz
- Upload date:
- Size: 190.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4021396d5584927b5d977eee881681e5374b966f0e7e0fd5fa0d2e1ca59e308 |
|
MD5 | d59561b75d22bd2b23df067b34470dc3 |
|
BLAKE2b-256 | 2d4e2c0e426e034d19e4189b1440fa9bf0c080c9866f258497fa538349a6414e |
File details
Details for the file sc2gameLobby-1.1.13-py3.6.egg
.
File metadata
- Download URL: sc2gameLobby-1.1.13-py3.6.egg
- Upload date:
- Size: 838.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402db19ab1489739dc2d9fbec112ebdffaed4ab0a62a0871b9990953e8aebc21 |
|
MD5 | b2528e8b00e41deaf55e5a5897af3d62 |
|
BLAKE2b-256 | f8d3d3716e4bc718718800dcc08ce3d47c40d0d8c518c5144fc5fb1f929412a2 |
File details
Details for the file sc2gameLobby-1.1.13-py3-none-any.whl
.
File metadata
- Download URL: sc2gameLobby-1.1.13-py3-none-any.whl
- Upload date:
- Size: 789.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48bc59032d8d38eda3f2a61576f5a3bdc90baa35e810140073cb42c9d6aae993 |
|
MD5 | 1bf8e86df5edb66909ad5714c62c7388 |
|
BLAKE2b-256 | 50eaf4dfec9c0a919aef49af1c081792c86741d3089238af65d568f11481c83a |