pysc2 | StarCraft II Learning Environment | Machine Learning library

 by   deepmind Python Version: 4.0.0 License: Apache-2.0

kandi X-RAY | pysc2 Summary

kandi X-RAY | pysc2 Summary

pysc2 is a Python library typically used in Artificial Intelligence, Machine Learning, Deep Learning, Tensorflow applications. pysc2 has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can install using 'pip install pysc2' or download it from GitHub, PyPI.

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 pysc2@deepmind.com.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pysc2 has a medium active ecosystem.
              It has 7753 star(s) with 1153 fork(s). There are 354 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 42 open issues and 230 have been closed. On average issues are closed in 549 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pysc2 is 4.0.0

            kandi-Quality Quality

              pysc2 has 0 bugs and 0 code smells.

            kandi-Security Security

              pysc2 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pysc2 code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pysc2 is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pysc2 releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              pysc2 saves you 7229 person hours of effort in developing the same functionality from scratch.
              It has 14951 lines of code, 1033 functions and 107 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pysc2 and discovered the below as its top functions. This is intended to give you an instant insight into pysc2 implemented functionality, and help decide if they suit your requirements.
            • Transforms an observation into a named numpy array
            • Unpack an RGB image
            • Unpack a plane
            • Unpack the layer
            • Return a human readable representation of the run configuration
            • Send a request
            • Read from the server
            • Send a single request
            • Compute the difference between two messages
            • Update the game cache
            • Computes the diffs
            • Launch a remote agent
            • Get the action sklearn action sklearn
            • Generate a CSV
            • Run functions in parallel
            • Start the agent
            • Create a dummy observation
            • Connect a remote controller
            • Select minerals from a collection
            • Create a sc_pb Interface object
            • Creates a ReplayObservationStream from a replay
            • Run the game loop
            • Transform an action to an Action
            • Launch a new SC2 instance
            • Draw the minimap
            • Get index
            Get all kandi verified functions for this library.

            pysc2 Key Features

            No Key Features are available at this moment for pysc2.

            pysc2 Examples and Code Snippets

            Play Starcraft 2 on a ladder as a human or AI against other human AI,Installation
            Pythondot img1Lines of Code : 21dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            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
            
            ...
            4.4.0
               base-version: 65895
                  data-h  
            state
            Pythondot img2Lines of Code : 18dot img2License : Permissive (MIT)
            copy iconCopy
            [
            # feature layer 的 state
            "height_map", "visibility_map", "creep", "power", "player_id", "player_relative", "unit_type", "selected", "unit_hit_points", "unit_hit_points_ratio", "unit_energy", "unit_energy_ratio", "unit_shields", "unit_shields_ratio",  
            PySC2 OpenAI Gym Environments,Available environemnts:,General Notes:
            Pythondot img3Lines of Code : 13dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            Copyright 2017 Islam Elnabarawy
            
            Licensed under the Apache License, Version 2.0 (the "License");
            you may not use this file except in compliance with the License.
            You may obtain a copy of the License at
            
            http://www.apache.org/licenses/LICENSE-2.0
            
            Unl  
            pysc2 Starcraft - obs.observation returns KeyError
            Pythondot img4Lines of Code : 2dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            pip install pysc2==1.2 
            

            Community Discussions

            QUESTION

            "Failed to connect to the SC2 websocket. Is it up?"
            Asked 2018-Nov-30 at 03:02

            I am trying to run the Deepmind Environment for Starcraft II, following this tutorial

            After running:

            ...

            ANSWER

            Answered 2018-Nov-30 at 03:02

            This might be obvious for some, but it took me 25 minutes, so I'll put it here.

            The SC2 websocket is up once you completely installed and started the game.

            Not only the battlenet interface.

            Source https://stackoverflow.com/questions/51224752

            QUESTION

            pysc2 Starcraft - obs.observation returns KeyError
            Asked 2018-Oct-08 at 01:23

            I am trying to run various codes I found in the internet with pysc2 Starcraft DeepMind AI agents. I often run into KeyError: 'SOME-VALUE-HERE' invoked by obs.observation["SOME-VALUE-HERE"].

            For example this agent and this agent crash on KeyError: 'minimap' invoked by obs.observation['minimap'].

            Other example is KeyError: 'screen' invoked by observation["screen"] when running Siraj Raval's enjoy_mineral_shards script.

            It is very frustrating as I have not found anybody else running to this error and I really struggle with debugging in pysc2 environment. Any help?

            ...

            ANSWER

            Answered 2018-Jul-15 at 20:08

            The codes were run with pysc2 version 2.0.1. One needs to downgrade to version 1.2 (relevant for mentioned examples).

            Source https://stackoverflow.com/questions/51351598

            QUESTION

            Where can I find the maps folder within StarcraftII?
            Asked 2018-Oct-07 at 20:41

            I am trying to set up Starcraft II for Deep Reinforcement Learning, following this Tutorial.

            At some point I am adviced to download the maps:

            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 maps and the mini games and extract them to your StarcraftII/Maps/ directory.

            Thing is I am not able to locate my Maps directory. Any advice or hints are welcome.

            ...

            ANSWER

            Answered 2018-Jul-07 at 15:26

            Create one yourself

            So the thing is, I could not find it, since there is none. The easy solution in hindsight is to create one:

            Source https://stackoverflow.com/questions/51223187

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pysc2

            You can install using 'pip install pysc2' or download it from GitHub, PyPI.
            You can use pysc2 like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install PySC2

          • CLONE
          • HTTPS

            https://github.com/deepmind/pysc2.git

          • CLI

            gh repo clone deepmind/pysc2

          • sshUrl

            git@github.com:deepmind/pysc2.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link