• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MSC: A Dataset for Macro-Management in StarCraft II.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

MSC

开源软件地址:

https://gitee.com/mirrors/MSC

开源软件介绍:

MSC

MSC: A Dataset for Macro-Management in StarCraft II.

@article{wu2017msc,  title={MSC: A Dataset for Macro-Management in StarCraft II},  author={Wu, Huikai and Zhang, Junge and Huang, Kaiqi},  journal={arXiv preprint arXiv:1710.03131},  year={2017}}

Download

  • Global features are available HERE.
  • [TRAIN|VAL|TEST] split is available HERE.
  • [Stat] is available HERE. The stat files with postfix _human.json are human-readable.
  • Spatial features are NOT avaiable since I do not have any download server. Please follow the instructions to generate the spatial features by yourself.

Baselines

Global State Evaluation

MethodTvT:TTvZ:TTvZ:ZTvP:TTvP:PZvZ:ZZvP:ZZvP:PPvP:P
Baseline[Global]61.0958.8960.6157.2160.9559.9159.9559.3551.36
Baseline[Spatial]50.8552.3559.8254.9059.1554.6555.0258.7857.76

Build Order Prediction

MethodTvT:TTvZ:TTvZ:ZTvP:TTvP:PZvZ:ZZvP:ZZvP:PPvP:P
Baseline[Global]74.1273.0173.8970.2979.2876.0772.0278.0876.28
Baseline[Spatial]73.0773.7175.9264.1575.0974.8872.3276.1274.22

Dataset: Global Feature Vector

Each replay is a (T, M) matrix F, where F[t, :] is the feature vector for time step t.

Each row of F is a M-dimensional vector, with M varying as [RACE] v.s. [RACE].

The M-dimensional vector is orgnized as follows:

  1. [0]: reward, i.e. final result of the game. 0: DEFEAT, 1: WIN.
  2. [1]: ground truth action, ranging from [0, #ACTION].
  3. [2-15): cumulative score [NOT NORMALIZED], which is defined in Here.
  4. [15-M): observation feature vector, which is normalized into [0, 1].
    1. [15]: frame id.

    2. [16-27): player info, including various resources and n_power_source.

    3. [27-#1): alerts, boolean.

    4. [#1-#2): upgrades, boolean.

    5. [#2-#3): research count.

    6. [#3-#4): friendly units info, which is defined in Here.

    7. [#4-M): enemy units info, where M = #4 + #[ENEMY RACE].

      V.S.TvT:TTvZ:TTvZ:ZTvP:TTvP:PZvZ:ZZvP:ZZvP:PPvP:P
      M75311311121663653149910311031563
      RACE#1#2#3#4#ACTION#RACE
      Terran29608141775336
      Protoss29557131761246
      Zerg29557178574714

Code for loading F:

import numpy as npfrom scipy import sparseF = np.asarray(sparse.load_npz(PATH).todense())

Dataset: Spatial Feature Tensor

Each replay contains a (T, 13, 64, 64) tensor S and a (T, 26) matrix G.

The specifics for S[t, :, :, :] is as follows:

  1. S[t, 0:8, :, :]: screen features, roughly normalized into [0-1], which is defined in Here.
  2. S[t, 8:13, :, :]: minimap features, roughly normalized into [0-1], which is defined in Here.

WARNING[Cheat Layer]: The last layer S[t, 12, :, :] refers to unit_type, which could only be obtained in replays.

Code for loading S:

import numpy as npfrom scipy import sparseS = np.asarray(sparse.load_npz(PATH).todense()).reshape([-1, 13, 64, 64])

The specifics for G[t, :] is as follows:

  1. [0-11): frame id + player info, normalized into [0, 1], which is defined Here.
  2. [11-24): cumulative score [NOT NORMALIZED], which is defined in Here.
  3. [24]: reward, i.e. final result of the game. 0: DEFEAT, 1: WIN
  4. [25]: ground truth action, ranging from [0, #ACTION].

Code for loading G:

import numpy as npfrom scipy import sparseG = np.asarray(sparse.load_npz(PATH).todense())

Build the Dataset Yourself Step by Step

Install SC2LE

  1. Download and unzip (Password: iagreetotheeula) StarCraft II Linux Packages 3.16.1 into $STAR_CRAFT$.
  2. Download and unzip (Password: iagreetotheeula) Replay Packs (3.16.1 - Pack 1, 3.16.1 - Pack 2 [Currently not used]) into $STAR_CRAFT$.

After step 1 and step 2, the folder structure is as follows:

$STAR_CRAFT$    ├── Battle.net    ├── Libs    ├── Maps    ├── Replays    ├── SC2Data    └── Versions
  • NOTE:
    1. $STAR_CRAFT$/Replays contains all *.SC2Replay files from 3.16.1 - Pack 1 and 3.16.1 - Pack 2 [Currently not used]
    2. $STAR_CRAFT$/Battle.net contains all contents from the folder Battle.net in 3.16.1 - Pack 1 and 3.16.1 - Pack 2 [Currently not used]

Step-by-Step Instructions

The Easy Way

The Hard Way [Step-by-Step in Details]

Requirements

future == 0.16.0numpy == 1.13.0scipy == 0.19.0python_gflags == 3.1.1tqdm == 4.14.0protobuf == 3.4.0pystream_protobuf == 1.4.4PySC2 == 1.0s2clientprotocol == 1.1

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap