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 |