{"id":13417948,"url":"https://github.com/TorchCraft/TorchCraft","last_synced_at":"2025-03-15T02:32:09.971Z","repository":{"id":46073312,"uuid":"75440660","full_name":"TorchCraft/TorchCraft","owner":"TorchCraft","description":"Connecting Torch to StarCraft","archived":true,"fork":false,"pushed_at":"2021-08-30T19:19:38.000Z","size":8339,"stargazers_count":1379,"open_issues_count":32,"forks_count":206,"subscribers_count":92,"default_branch":"main","last_synced_at":"2024-07-31T22:40:02.717Z","etag":null,"topics":["bwapi","deep-learning","machine-learning","reinforcement-learning","starcraft","torch","torchcraft"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TorchCraft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-03T00:04:58.000Z","updated_at":"2024-07-20T12:41:05.000Z","dependencies_parsed_at":"2022-09-13T08:00:43.434Z","dependency_job_id":null,"html_url":"https://github.com/TorchCraft/TorchCraft","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorchCraft%2FTorchCraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorchCraft%2FTorchCraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorchCraft%2FTorchCraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorchCraft%2FTorchCraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TorchCraft","download_url":"https://codeload.github.com/TorchCraft/TorchCraft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221532180,"owners_count":16838913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bwapi","deep-learning","machine-learning","reinforcement-learning","starcraft","torch","torchcraft"],"created_at":"2024-07-30T22:00:55.995Z","updated_at":"2025-03-15T02:32:09.964Z","avatar_url":"https://github.com/TorchCraft.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","C++","Platforms","Open Source Reinforcement Learning Platforms"],"sub_categories":["Code for Starcraft: Brood War","Human Computer Interaction"],"readme":"# TorchCraft\n\nA bridge between [Torch](http://torch.ch/) and [StarCraft](http://us.blizzard.com/en-us/games/sc/).\n\nA general overview of the system (and motivations for using TorchCraft) can be found in:\n\nSynnaeve, G., Nardelli, N., Auvolat, A., Chintala, S., Lacroix, T., Lin, Z.,\nRichoux, F. and Usunier, N., 2016. _TorchCraft: a Library for Machine Learning Research\non Real-Time Strategy Games_ - [arXiv:1611.00625](https://arxiv.org/abs/1611.00625).\n\n\n## [Installation](docs/user/starcraft_in_windows.md)\n\nPlease follow the [installation instructions](docs/user/starcraft_in_windows.md). \n\nYou will need to have a license of StarCraft: Brood War. \n\nTorchCraft is a BWAPI module that sends StarCraft data out over a ZMQ\nconnection. This lets you parse StarCraft data and interact with BWAPI from\nanywhere. The TorchCraft client should be installed from C++, Python, or Lua.\nWe provide off the shelf solutions for Python and Lua:\n\nRequirements:\n  - zstd-devel 1.1.4\n  - zeromq 4+\n\nRemember to init submodules: `git submodule update --init --recursive`\u003cbr/\u003e\nPython setup: `pip install pybind11 \u0026\u0026 pip install .`\u003cbr/\u003e\nLua setup (depends on [torch7](http://torch.ch/docs/getting-started.html)): `luarocks make *.rockspec`\u003cbr/\u003e\n\nWe provide an example C++ CMake project in `examples/cpp/`\n\nThe hardest part of installing the server is actually setting up starcraft.\nWe detail three ways of doing this:\n  - [Use the standard Windows + StarCraft route, perhaps with a VM](/docs/user/starcraft_in_windows.md)\n  - [Use WINE](/docs/user/starcraft_in_wine.md)\n  - [Use OpenBW](/docs/user/openbw.md)\n\n\n## Running TorchCraft\n\nSee [`examples/`](examples/) for a list of scripts that you can try.\nIn all cases, the `$server_ip` is the ip address of the machine running\nStarCraft.\n\n### StarCraft Server\n\nDo whichever was installed:\n\n#### Windows / WINE\n\n1. Open `bwapi.ini` and set `ai = PATH\\TO\\BWEnv.dll` (or copy\n   ours from `config/bwapi.in`)\n2. Start ChaosLauncher, enable `BWAPI DLL Injector [Release]`.\n3. Press `Start`.\n\n\n#### WINE\n\n1. Open `bwapi.ini` and set `ai = PATH\\TO\\BWEnv.dll` (or copy\n1. `wine bwheadless.exe -e $STARCRAFT/StarCraft.exe -l $STARCRAFT/bwapi-data/BWAPI.dll --headful` as detailed in the [WINE docs](/docs/user/starcraft_in_wine.md)\n\n\n#### OpenBW\n\nSomething like:\n`OPENBW_ENABLE_UI=0 BWAPI_CONFIG_AI__RACE=Terran BWAPI_CONFIG_AI__AI=\"BWEnv/build/BWEnv.so\" BWAPI_CONFIG_AUTO_MENU__AUTO_MENU=\"SINGLE_PLAYER\" BWAPI_CONFIG_AUTO_MENU__MAP=maps/micro/m5v5_c_far.scm BWAPI_CONFIG_AUTO_MENU__GAME_TYPE=\"USE MAP SETTINGS\" TORCHCRAFT_PORT=11111 BWAPILauncher`\n\n### TorchCraft Client\n\n```bash\n$ cd examples\n$ th lua/simple_dll.lua -t $server_ip\n$ python py/example.py -t $server_ip\n```\n\n## Other Documentation\n\n- [Lua Replayer](/docs/user/replayer.md)\n\n## Citation\n\nPlease cite the arXiv paper if you use TorchCraft in your work:\n\n```\n@article{synnaeve2016torchcraft,\n  title={TorchCraft: a Library for Machine Learning Research on Real-Time Strategy Games},\n  author={Synnaeve, Gabriel and Nardelli, Nantas and Auvolat, Alex and Chintala, Soumith and Lacroix, Timoth{\\'e}e and Lin, Zeming and Richoux, Florian and Usunier, Nicolas},\n  journal={arXiv preprint arXiv:1611.00625},\n  year={2016}\n}\n```\n\n## Contributing\n\nSee [Contributing](CONTRIBUTING.md)\n\nAlso check out the [code structure](/docs/contributor/code_structure.md)\nand [PR process](/docs/contributor/pr_process.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTorchCraft%2FTorchCraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTorchCraft%2FTorchCraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTorchCraft%2FTorchCraft/lists"}