PySC2 is DeepMind'sPython component of the StarCraft II Learning Environment (SC2LE). It exposesBlizzard Entertainment's StarCraft II Machine LearningAPI as a Python RL Environment.This is a collaboration between DeepMind and Blizzard to develop StarCraft IIinto a rich environment for RL research. PySC2 provides an interface for RLagents to interact with StarCraft 2, getting observations and sending actions.
Download free maps and mods for StarCraft 2! StarCraft II: Wings of Liberty is a military science fiction real-time strategy video game developed and released by Blizzard Entertainment.
We have published an accompanyingblogpostand paper, which outlines ourmotivation for using StarCraft II for DeepRL research, and some initial researchresults using the environment.
About
Disclaimer: This is not an official Google product.
If you use the StarCraft II Machine Learning API and/or PySC2 in your research,please cite the StarCraft II Paper
You can reach us at [email protected].
Get PySC2PyPI
The easiest way to get PySC2 is to use pip:
That will install the
pysc2 package along with all the required dependencies.virtualenv can help manage yourdependencies. You may also need to upgrade pip: pip install --upgrade pip for the pysc2 install to work. If you're running on an older system you mayneed to install libsdl libraries for the pygame dependency.
Pip will install a few of the binaries to your bin directory.
pysc2_play canbe used as a shortcut to python -m pysc2.bin.play .
Git
Alternatively you can install PySC2 with git. First clone the PySC2 repo, theninstall the dependencies and
pysc2 package:
Get StarCraft II
PySC2 depends on the full StarCraft II game and only works with versions thatinclude the API, which is 3.16.1 and above.
Linux
Follow Blizzard's documentation toget the linux version. By default, PySC2 expects the game to live in
~/StarCraftII/ . You can override this path by setting the SC2PATH environment variable or creating your own run_config.
Windows/MacOS
Install of the game as normal from Battle.net. Even theStarter Edition will work.If you used the default install location PySC2 should find the latest binary.If you changed the install location, you might need to set the
SC2PATH environment variable with the correct location.
PySC2 should work on MacOS and Windows systems running Python 2.7+ or 3.4+,but has only been thoroughly tested on Linux. We welcome suggestions and patchesfor better compatibility with other systems.
Get the maps
PySC2 has many maps pre-configured, but they need to be downloaded into the SC2
Maps directory before they can be played.
Download the ladder mapsand the mini gamesand extract them to your
StarcraftII/Maps/ directory.
Run an agent
You can run an agent to test the environment. The UI shows you the actions ofthe agent and is helpful for debugging and visualization purposes.
It runs a random agent by default, but you can specify others if you'd like,including your own.
You can also run two agents against each other.
To specify the agent's race, the opponent's difficulty, and more, you can passadditional flags. Run with
--help to see what you can change.
Play the game as a human
There is a human agent interface which is mainly used for debugging, but it canalso be used to play the game. The UI is fairly simple and incomplete, but it'senough to understand the basics of the game. Also, it runs on Linux.
In the UI, hit
? for a list of the hotkeys. The most basic ones are: F4 toquit, F5 to restart, F9 to save a replay, and Pgup /Pgdn to control thespeed of the game. Otherwise use the mouse for selection and keyboard forcommands listed on the left.
The left side is a basic rendering. The right side is the feature layers thatthe agent receives, with some coloring to make it more useful to us. You canenable or disable RGB or feature layer rendering and their resolutions withcommand-line flags.
Watch a replay
Running an agent and playing as a human save a replay by default. You can watchthat replay by running:
This works for any replay as long as the map can be found by the game.
The same controls work as for playing the game, so
F4 to exit, pgup /pgdn to control the speed, etc.
You can save a video of the replay with the
--video flag.
List the maps
Maps need to be configured before they're known to theenvironment. You can see the list of known maps by running:
Run the tests
If you want to submit a pull request, please make sure the tests pass on bothpython 2 and 3.
For a full description of the specifics of how the environment is configured,the observations and action spaces work read theenvironment documentation.
The mini-game map files referenced in the paper are stored under
pysc2/maps/ but must be installed in $SC2PATH/Maps . Make sure to follow the downloadinstructions above.
Maps are configured in the Python files in
pysc2/maps/ . The configs can setplayer and time limits, whether to use the game outcome or curriculum score, anda handful of other things. For more information about the maps, and how toconfigure your own, read the maps documentation.
A replay lets you review what happened during a game. You can see the actionsand observations that each player made as they played.
Blizzard is releasing a large number of anonymized 1v1 replays played on theladder. You can find instructions for how to get thereplay files on theirsite. You can also review your own replays.
Replays can be played back to get the observations and actions made during thatgame. The observations are rendered at the resolution you request, so may differfrom what the human actually saw. Similarly the actions specify a point, whichcould reflect a different pixel on the human's screen, so may not have an exactmatch in our observations, though they should be fairly similar.
Replays are version dependent, so a 3.16 replay will fail in a 3.16.1 or 3.17binary.
You can visualize the replays with the full game, or with
pysc2.bin.play .Alternatively you can run pysc2.bin.replay_actions to process many replaysin parallel.
A powerful map editor that allows you to create much more elaborate StarCraft maps than were possible with the original tool
StarCraft is one of the best real-time strategy games to has ever hit the gaming world and even after more than a decade since its release, it's still being played.
Since its release StarCraft II has emerged just as glorious but even so, StarCraft remains at heart to many. It brings a well written and acted campaign that synchronizes perfectly with the campaign and its multiplayer feature has made it an great environment for people to test their skills.
StarCraft brings face to face three unique races that are almost perfectly balanced in combat strength and abilities, allowing player skill to shine when opponents face each other. The game also comes with a custom map editor which has helped many piece together their own campaigns and multiplayer maps.
SCMDraft 2 is a fan made map builder that was created to serve the same role as the game's editor but with plenty of additional features. This editor provides zooming capabilities, mod support, location overlay, brushes, addons and much more.
With it creating a custom map can reach new levels of complexity enabling players and programmers to create unique maps.
System requirements
Filed underStarcraft - SCMDraft 2 0.8.0add to watchlistsend us an update
3 screenshots:
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |