Skip to content

Commit

Permalink
fix ch13
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwang067 committed Sep 23, 2021
1 parent 4b98429 commit dc86837
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/chapter13/chapter13.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AlphaStar是DeepMind公司与暴雪使用深度强化学习技术进行PC与星

AlphaStar将星际争霸2的环境状态分为四部分,分别为实体信息(Entities)、地图信息(Map)、玩家数据信息(Player data)、游戏统计信息(Game statistics)。

![img1](img\img1.png)
![img1](img\13.1.png)

- 第一部分:实体信息,例如当前时刻环境中有什么建筑、兵种等等,并且我们将每一个实体的属性信息以向量的形式表示,例如对于一个建筑,其当前时刻的向量中包含此建筑的血量、等级、位置以及冷却时间等等信息。所以对于当前帧的全部实体信息,环境会给神经网络 $N$ 个长度为 $K$ 的向量,各表示此刻智能体能够看见的 $N$ 个实体的具体信息。(向量信息)
- 第二部分:地图信息,这个比较好理解,也就是将地图中的信息以矩阵的形式送入神经网络中,来表示当前状态全局地图的信息。(向量信息或者说是图像信息)
Expand All @@ -27,7 +27,7 @@ AlphaStar将星际争霸2的环境状态分为四部分,分别为实体信息

AlphaStar的动作信息主要分为六个部分,分别为动作类型(Action type)、选中的单元(Selected units)、目标(Target)、执行动作的队列(Queued)、是否重复(Repeat)、延时(Delay),每一个部分间是有关联的。

![img2](img\img2.png)
![img2](img\13.2.png)

- 第一部分:动作类型,即下一次要进行的动作的类型是移动小兵、升级建筑还是移动小窗口的位置等等
- 第二部分:选中的单元,即承接第一部分,例如我们要进行的动作类型是移动小兵,那么我们就应该选择具体“操作”哪一个小兵
Expand All @@ -40,11 +40,11 @@ AlphaStar的动作信息主要分为六个部分,分别为动作类型(Actio

上面我们说明了AlphaStar网络的输入和输出,即状态和动作,那么从状态怎么得到动作呢?其网络结构是怎么样的呢?

![img3](img\img3.png)
![img3](img\13.3.png)

### 输入部分

![img4](img\img4.png)
![img4](img\13.4.png)

从上图的红框可以看出,模型的输入框架中主要有三个部分,即Scalar features(标量特征),例如前面叙述的玩家的等级、小窗口的位置等等信息、Entities(实体),是向量即前面所叙述的一个建筑一个兵的当前的所有属性信息、Minimap(地图),即上面说的图像的数据。

Expand All @@ -56,13 +56,13 @@ AlphaStar的动作信息主要分为六个部分,分别为动作类型(Actio

中间过程比较简单,即通过一个deep LSTM进行融合三种当前状态下的embedding进行下一时刻的embedding输出,并且将该结果分别送入ValueNetwork、Residual MLP以及Actoin type的后续的MLP中。

![img5](img\img5.png)
![img5](img\13.5.png)

### 输出部分

正如前面介绍的,输出的动作是前后有关联的,按照顺序

![img6](img\img6.png)
![img6](img\13.6.png)

- 首先是动作类型(Action type):使用Deep LSTM的embedding的向量作为输入,使用residual MLP得到Action type的softmax的输出结果,并传给下一个子模型进行embedding。
- 然后是延时(Delay):使用上一个上面的embedding的结果以及Deep LSTM的结果一起输入MLP后得到结果,并传给下一个子模型进行embedding。
Expand Down Expand Up @@ -143,7 +143,7 @@ $$

### 宏观结果

![img7](img\img7.png)
![img7](img\13.7.png)

图A为训练后的agent与人类对战的结果(天梯图),具体地,刚刚结束监督学习后的AlphaStar可以达到钻石级别,而训练到一半(20天)以及训练完结(40天)的AlphaStar可以达到GM的级别。AlphaStar已经可以击败绝大多数的普通玩家。

Expand All @@ -155,7 +155,7 @@ $$

AlphaStar的论文中也使用了消融实验,即控制变量法,来进一步分析每一个约束条件对于对战结果的影响。下面举一个特别的例子:

![img8](img\img8.png)
![img8](img\13.8.png)

上面的图片表示的是人类对局数据的使用的情况。可以看到如果没有人类对局数据的情况下,数值仅仅为149,但是只要经过了简单的监督学习,对应的数值就可以达到936,当然使用人类初始化后的强化学习可以达到更好的效果,利用强化学习加监督学习的KL Loss的话可以达到接近于完整的利用人类统计量 $Z$ 的效果。可以分析出,AlphaStar中人类对局的数据对于整个model的表现是很重要的,其并没有完全像AlphaGo一样,可以不使用人类数据的情况。

Expand Down
Binary file added docs/chapter13/img/13.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/chapter13/img/13.8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/chapter13/img/img1.png
Binary file not shown.
Binary file removed docs/chapter13/img/img2.png
Binary file not shown.
Binary file removed docs/chapter13/img/img3.png
Binary file not shown.
Binary file removed docs/chapter13/img/img4.png
Binary file not shown.
Binary file removed docs/chapter13/img/img5.png
Binary file not shown.
Binary file removed docs/chapter13/img/img6.png
Binary file not shown.
Binary file removed docs/chapter13/img/img7.png
Binary file not shown.
Binary file removed docs/chapter13/img/img8.png
Binary file not shown.

0 comments on commit dc86837

Please sign in to comment.