{"id":18672167,"url":"https://github.com/liuruoze/hiernet-sc2","last_synced_at":"2025-04-12T01:30:56.572Z","repository":{"id":85006517,"uuid":"441436753","full_name":"liuruoze/HierNet-SC2","owner":"liuruoze","description":"(AAAI'2019) The codes, models, logs, and data for an extended paper of the original paper \"On Reinforcement Learning for Full-length Game of StarCraft\". AAAI = AAAI Conference on Artificial Intelligence.","archived":false,"fork":false,"pushed_at":"2022-10-05T01:30:33.000Z","size":1196,"stargazers_count":24,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T21:15:28.131Z","etag":null,"topics":["deep-learning","deep-neural-networks","deep-reinforcement-learning","hierarchical-reinforcement-learning","reinforcement-learning","starcraft-ii","starcraft2","starcraft2-agents","starcraft2-ai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liuruoze.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}},"created_at":"2021-12-24T10:29:45.000Z","updated_at":"2025-02-09T04:10:57.000Z","dependencies_parsed_at":"2023-03-01T03:45:35.132Z","dependency_job_id":null,"html_url":"https://github.com/liuruoze/HierNet-SC2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuruoze%2FHierNet-SC2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuruoze%2FHierNet-SC2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuruoze%2FHierNet-SC2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuruoze%2FHierNet-SC2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuruoze","download_url":"https://codeload.github.com/liuruoze/HierNet-SC2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504211,"owners_count":21115134,"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":["deep-learning","deep-neural-networks","deep-reinforcement-learning","hierarchical-reinforcement-learning","reinforcement-learning","starcraft-ii","starcraft2","starcraft2-agents","starcraft2-ai"],"created_at":"2024-11-07T09:09:41.528Z","updated_at":"2025-04-12T01:30:55.523Z","avatar_url":"https://github.com/liuruoze.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HierNet-SC2\n\nThis repository contains the codes, models, training logs, and data for an extended paper of the original conference paper on AAAI 2019, \"On Reinforcement Learning for Full-length Game of StarCraft\".\n\nThe extended journal paper is named \"On Efficient Reinforcement Learning for Full-length Game of StarCraft II\", and the arxiv link is [here](https://arxiv.org/abs/2209.11553).\n\n## Codes\n\nThe below table shows the codes in the project. We provide codes for the training of agents, generating replays, and mining macro actions. \n\nContent | Description\n------------ | -------------\n./main.py | the codes for the training code\n./mine_from_replay.py | the codes for mining macro-actions\n./play_for_replay.py | the codes for generating replays \n./multi_agent.py | the codes for the agent\n./new_network.py | the codes for the neural network model\n./param.py | the hyper-parameters\n./algo/ | the algorithm of ppo\n./lib/ | the library functions\n\n\n## Data\n\nThe below table shows the data for training agent and generating macro actions.\n\nContent | Description\n------------ | -------------\n./data/replay/ | 30 replays played by the expert for generating macro actions\n./data/replay_data/ | using data mining algorithms to mine macro actions from the above replays\n\n## Logs\n\nThe below table shows the logs of training on cheating level built-in AIs.\n\nContent | Description\n------------ | -------------\n./logs/lv10-0.20_to_0.90/ | the training log in lv-10 which takes the win-rate from 0.20 to 0.90\n./logs/lv10-0.90_to_0.94/ | the training log in lv-10 which takes the  win-rate from 0.90 to 0.94\n./logs/lv8-0_to_0.960/ | the training log in lv-8 which takes the  win-rate to 0.960, restore=lv10-0.20_to_0.90\n./logs/lv9-0_to_0.967/ | the training log in lv-9 which takes the  win-rate to 0.967, restore=lv10-0.20_to_0.90\n\n## Model\n\nThe below table shows the model of a 0.94 win rate in lv-10.\n\nContent | Description\n------------ | -------------\n./model/lv10-0.94/ | the model which gets win-rate 0.94 in lv-10\n\n## Requirements\n\n- python==3.5\n- tensorflow==1.5\n- future==0.18.2\n- pysc2==1.2\n- matplotlib==3.3.4\n- scipy==1.1.0\n- prefixspan==0.5.2\n\n## Install\n\nA simple straightway is, you can first use conda like:\n```\nconda create -n tf_1_5 python=3.5 tensorflow-gpu=1.5\n```\nto install Tensorflow-gpu 1.5 (with accompanied CUDA and cudnn).\n\nNext, you should activate the conda environment, like:\n```\nconda activate tf_1_5\n```\n\nThen you can install other python packages by pip, e.g., the command is:\n```\npip install -r requirements.txt\n```\n\n## Usage\n\nRun main.py to train an agent against the most difficult built-in bot (lv-10) in StarCraft II. \n\nRun mine_from_replay.py to mine macro actions from replays. \n\nRun play_for_replay.py to generate replays by your selves. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuruoze%2Fhiernet-sc2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuruoze%2Fhiernet-sc2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuruoze%2Fhiernet-sc2/lists"}