{"id":16948219,"url":"https://github.com/dentosal/sc2-bot-match-runner","last_synced_at":"2025-09-21T00:26:12.434Z","repository":{"id":83101280,"uuid":"118626278","full_name":"Dentosal/sc2-bot-match-runner","owner":"Dentosal","description":"Automatically run matches between StarCraft 2 bots","archived":false,"fork":false,"pushed_at":"2018-09-20T12:07:47.000Z","size":40,"stargazers_count":17,"open_issues_count":4,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T16:11:10.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dentosal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-23T15:06:24.000Z","updated_at":"2022-03-14T09:36:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c32598c-7435-40d9-b7ea-f0f0c660d09d","html_url":"https://github.com/Dentosal/sc2-bot-match-runner","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentosal%2Fsc2-bot-match-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentosal%2Fsc2-bot-match-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentosal%2Fsc2-bot-match-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentosal%2Fsc2-bot-match-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dentosal","download_url":"https://codeload.github.com/Dentosal/sc2-bot-match-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473127,"owners_count":21109628,"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":[],"created_at":"2024-10-13T21:50:00.487Z","updated_at":"2025-09-21T00:26:07.376Z","avatar_url":"https://github.com/Dentosal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SC2 Bot Match Runner\n\nTournament runner scripts for running Starcraft II Bots in different Git repos\nagainst each other. The repos are expected to contain a fork of the\n[`python-sc2-bot-template`](https://github.com/Dentosal/python-sc2-bot-template). Runs matches in parallel \nusing docker containers.\n\n### Setup\n\n```\npip3 install -r requirements.txt\n```\n\n### Running a match\n\nRun the runner script like this:\n\n```\npython3 rungame.py \u003cmap_name\u003e \u003crepo1\u003e \u003crepo2\u003e --step-time-limit 2.0 --game-time-limit 1200\n```\n\nFor example\n\n```\nexport REPO1=\"https://github.com/dentosal/python-sc2-bot-template.git\"\nexport REPO2=\"https://github.com/dentosal/python-sc2-bot.git\"\npython3 rungame.py \"Abyssal Reef LE\" $REPO1 $REPO2\n```\n\nYou can run multiple pairs at once too! The matches will be run in parallel in separate docker containers.\n\nResults will be stored under the `results/\u003ctimestamp\u003e` directory. \n\nBot logs will be produced into files in this directory in realtime.\n\nEach bot client will create its replay file into this directory after the match is over.\nThis means that for each match there will be two essentially identical replay files. The runner verifies that\nthe replays contain the same result.\n\nAfter all matches have finished, a `results.json` file will be created. It contains the result of all matches.\n\n### Debugging\n\nIf running gets stuck, you may want to\n\n```\n    docker ps\n    docker logs \u003ccontainer_id\u003e\n```\n\nTo clean unused docker images and containers\n\n```\n   ./cleanup.sh\n```\n\nYou can also deleted cached repositories, in case there's an issue with pulling automatically:\n\n```\n    rm -fr repocache\n```\n\nCleaning up created containers:\n\n```\n    rm -fr containers\n```\n\n### Generating match list from list of repo URLs\n\n```\npython3 make_matches.py --type round-robin $REPO1 $REPO2 $REPO3\n```\n\n### Viewing match replays\n\nThe runner stores match results under `results/\u003ctimestamp\u003e` directories. You can easily copy all the match replays\ninto your StarCraft II installation directory using\n\n```\n    python3 copy_result_replays.py \u003caccountid\u003e \u003cserverid\u003e\n```\n\nYou can find your accountid and serverid as directory names under `~/Library/Application Support/Blizzard/StarCraft II/Accounts`.\n\nNow you can open the replays using the Starcraft UI: they can be found in Replays.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdentosal%2Fsc2-bot-match-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdentosal%2Fsc2-bot-match-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdentosal%2Fsc2-bot-match-runner/lists"}