pysc2 examples
1.0.0
此示例程序建立在
獲得PYSC2的最簡單方法是使用PIP:
$ pip install git+https://github.com/deepmind/pysc2另外,您必須安裝baselines庫。
$ pip install git+https://github.com/openai/baselines您必須購買Starcraft II並安裝它。甚至起動版也可以使用。
http://us.battle.net/sc2/en/legacy-of-the-void/
請按照暴雪的文檔獲取Linux版本。默認情況下,PYSC2期望遊戲生活在~/StarCraftII/ 。
下載梯子地圖和迷你游戲,然後將其提取到您的StarcraftII/Maps/ Directory。
$ python train_mineral_shards.py --algorithm=a2c$ python enjoy_mineral_shards.py$ python train_mineral_shards.py --algorithm=deepq --prioritized=True --dueling=True --timesteps=2000000 --exploration_fraction=0.2$ python train_mineral_shards.py --algorithm=a2c --num_agents=2 --num_scripts=2 --timesteps=2000000| 描述 | 預設 | 參數類型 | |
|---|---|---|---|
| 地圖 | 健身房環境 | collectmineralshards | 細繩 |
| 紀錄 | 記錄類型:張板,stdout | 張板 | 細繩 |
| 演算法 | 目前,支持2算法:DEEPQ,A2C | A2C | 細繩 |
| 時間段 | 總培訓步驟 | 2000000 | int |
| Exploration_Fraction | 探索部分 | 0.5 | 漂浮 |
| 優先 | 是否使用優先重播DQN | 錯誤的 | 布爾 |
| 決鬥 | 是否將決鬥網絡用於DQN | 錯誤的 | 布爾 |
| LR | 學習率(如果0集隨機E-5〜E-3) | 0.0005 | 漂浮 |
| num_agents | A2C代理數量 | 4 | int |
| num_scripts | A2C的腳本化代理數量 | 4 | int |
| nsteps | 更新策略的步驟數 | 20 | int |