{ "info": { "author": "Damien GILLES", "author_email": "damien.gilles.pro@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Games/Entertainment", "Topic :: Games/Entertainment :: Real Time Strategy", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], "description": "# A StarCraft II bot gym env library over python-sc2\n\nThis library provide [python-sc2](https://github.com/Dentosal/python-sc2) as a [gym](https://github.com/openai/gym) environment.\nSo you benefits both from the sc2.BotAI and gym.Env classes to train your bot using existing algorithms.\n\n**This library (currently) covers only the raw scripted interface.** At this time I don't intend to add support for graphics-based interfaces.\n\n## Documentation\n\n### class Sc2Env(gym.Env)\n\n#### def __init__(self, map, bot_race, get_opponents, **kwargs):\n\n- map `str` upper camel case name of an installed map (ex: KingsCoveLE)\n- bot_race `str` race of the bot (ex: Zerg)\n- get_opponents `Callable` the opponents of the bot\n - returns a `list` of `AbstractPlayer` (BotAI, Player...)\n- initializer `Callable`\n Called on start, must set BotAI.action_space and BotAI.observation_space.\n The defined spaces must inherit from gym.spaces.space.Space.\n\n example:\n\n '''python\n def initializer(bot):\n bot.action_space = gym.spaces.Box(5,10)\n bot.observation_space = gym.spaces.Box(3,11)\n '''\n- observer: `async` `Callable`\n Called on step takes a `sc2.BotAI` instance, must return an observation and a reward.\n An observation is a `numpy.array` matching the observation space and a reward is `number`.\n- actuator: `async` `Callable`\n Called on step, takes a `sc2.BotAI` instance and an action.\n An action is a `numpy.array` matching the action space.\n Used to run actions using in sc2.\n- **kwargs `any` sc2.run_game extra arguments\n\nMore on sc2.BotAI [here](https://github.com/Dentosal/python-sc2/wiki).\n\n## Installation\n\nBy installing this library you agree to be bound by the terms of the [AI and Machine Learning License](http://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html).\n\nYou'll need Python 3.6 or newer.\n\n```bash\npip3 install --user --upgrade sc2-env\n```\n\nYou'll also need an StarCraft II executable. If you are running Windows or macOS, just install the normal SC2 from blizzard app. [The free starter edition works too.](https://us.battle.net/account/sc2/starter-edition/). Linux users get the best experience by installing the Windows version of StarCraft II with [Wine](https://www.winehq.org). Linux user can also use the [Linux binary](https://github.com/Blizzard/s2client-proto#downloads), but it's headless so you cannot actually see the game.\n\nYou probably want some maps too. Official map downloads are available from [Blizzard/s2client-proto](https://github.com/Blizzard/s2client-proto#downloads). Notice: the map files are to be extracted into *subdirectories* of the `install-dir/Maps` directory.\n\n### Running\n\nAfter installing the library, a StarCraft II executable, and some maps, you're ready to get started. Look at the dummy bot example!\n\n```bash\npython3 examples/dummy_bot.py\n```\n\nIf you installed StarCraft II on Linux with Wine, set the `SC2PF` environment variable to `WineLinux`:\n\n```bash\nSC2PF=WineLinux python3 examples/dummy_bot.py\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gillesdami/python-sc2", "keywords": "StarCraft,StarCraft 2,StarCraft II,AI,Bot", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sc2-env", "package_url": "https://pypi.org/project/sc2-env/", "platform": "", "project_url": "https://pypi.org/project/sc2-env/", "project_urls": { "Homepage": "https://github.com/gillesdami/python-sc2" }, "release_url": "https://pypi.org/project/sc2-env/0.11.1.2/", "requires_dist": [ "portpicker", "async-timeout (<4.0,>=3.0)", "s2clientprotocol", "aiohttp", "pyglet", "gym" ], "requires_python": ">=3.6", "summary": "A StarCraft II bot gym env library over python-sc2", "version": "0.11.1.2" }, "last_serial": 5622895, "releases": { "0.11.1": [ { "comment_text": "", "digests": { "md5": "24fc59b0c86abd4e0654790ec5b22a0e", "sha256": "db7b8404f11913396dd56031b9d0bfb38565a8e4b0324fb7ce21b626239d79c8" }, "downloads": -1, "filename": "sc2_env-0.11.1-py2-none-any.whl", "has_sig": false, "md5_digest": "24fc59b0c86abd4e0654790ec5b22a0e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 87635, "upload_time": "2019-07-30T15:50:44", "url": "https://files.pythonhosted.org/packages/73/89/98a4b7558dcfe2317ac02fa7b3386c7ba309b5b907632abb7dbb3fb5b8b9/sc2_env-0.11.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "31b87f394f2ea1a7844f1df87cacfa69", "sha256": "86c4f3af3a0afbd162787bc3ac51d699074bf8e5e7b671f8618c4139781fb8a2" }, "downloads": -1, "filename": "sc2-env-0.11.1.tar.gz", "has_sig": false, "md5_digest": "31b87f394f2ea1a7844f1df87cacfa69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76995, "upload_time": "2019-07-30T15:50:47", "url": "https://files.pythonhosted.org/packages/2b/43/5a3a481f16c53c53bc0458bfbca1bef504b9b450ee72c6231b60cf18753c/sc2-env-0.11.1.tar.gz" } ], "0.11.1.1": [ { "comment_text": "", "digests": { "md5": "13b1ba9b35d44c530351144b1c6b572b", "sha256": "3dcc7379847a3cce2898884561e322af45ffb847c2f0cb993fa33848e1394437" }, "downloads": -1, "filename": "sc2_env-0.11.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "13b1ba9b35d44c530351144b1c6b572b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 89845, "upload_time": "2019-07-31T11:23:56", "url": "https://files.pythonhosted.org/packages/05/dd/679254773675e90d5ab0bb274b5f7595b0af5643b281f28b0f44c32fbc1d/sc2_env-0.11.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0327ae78d9ffd24ffcbf3a3ef9ab385", "sha256": "ec70052cc5b63a2cac1e8b7cf737293767e8177b24b958de8bc1640a2ea8efd8" }, "downloads": -1, "filename": "sc2-env-0.11.1.1.tar.gz", "has_sig": false, "md5_digest": "a0327ae78d9ffd24ffcbf3a3ef9ab385", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 78360, "upload_time": "2019-07-31T11:23:58", "url": "https://files.pythonhosted.org/packages/83/ca/48a830a00cb4b356d7b5df032193bf276e0543e168aa3f76e72b8794c48e/sc2-env-0.11.1.1.tar.gz" } ], "0.11.1.2": [ { "comment_text": "", "digests": { "md5": "fbe2eb6eb35a5b0015fc8d891406080b", "sha256": "ed289b6cdb6d22e437a98eb6989ace605aef7a0a14492260b906851fe7b71a4b" }, "downloads": -1, "filename": "sc2_env-0.11.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fbe2eb6eb35a5b0015fc8d891406080b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 89862, "upload_time": "2019-08-02T09:44:37", "url": "https://files.pythonhosted.org/packages/87/84/2cb5795f110834009d75886e0df5076987ffc660dda2baefdf01acf8d229/sc2_env-0.11.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "827c43832b1f5fa837ae12ac0ecd2229", "sha256": "7c09d990e965d9262aa47b12117187ab9bf7f77f5869f399ed774bdf0ae90484" }, "downloads": -1, "filename": "sc2-env-0.11.1.2.tar.gz", "has_sig": false, "md5_digest": "827c43832b1f5fa837ae12ac0ecd2229", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 78388, "upload_time": "2019-08-02T09:44:38", "url": "https://files.pythonhosted.org/packages/65/77/29954ccd79868c61ee17fc551acf341c30175a17939401d30b72e87c2f96/sc2-env-0.11.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fbe2eb6eb35a5b0015fc8d891406080b", "sha256": "ed289b6cdb6d22e437a98eb6989ace605aef7a0a14492260b906851fe7b71a4b" }, "downloads": -1, "filename": "sc2_env-0.11.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fbe2eb6eb35a5b0015fc8d891406080b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 89862, "upload_time": "2019-08-02T09:44:37", "url": "https://files.pythonhosted.org/packages/87/84/2cb5795f110834009d75886e0df5076987ffc660dda2baefdf01acf8d229/sc2_env-0.11.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "827c43832b1f5fa837ae12ac0ecd2229", "sha256": "7c09d990e965d9262aa47b12117187ab9bf7f77f5869f399ed774bdf0ae90484" }, "downloads": -1, "filename": "sc2-env-0.11.1.2.tar.gz", "has_sig": false, "md5_digest": "827c43832b1f5fa837ae12ac0ecd2229", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 78388, "upload_time": "2019-08-02T09:44:38", "url": "https://files.pythonhosted.org/packages/65/77/29954ccd79868c61ee17fc551acf341c30175a17939401d30b72e87c2f96/sc2-env-0.11.1.2.tar.gz" } ] }