update 2 images (#319)

* fix chap12 render

* add distributed rl chapter

* fix bug

* fix issue #212

* fix typo

* update imgs

* fix chinese

* fix svg img

Co-authored-by: Dalong <39682259+eedalong@users.noreply.github.com>
This commit is contained in:
Zihan Ding
2022-05-02 09:54:06 -04:00
committed by GitHub
parent 5ed8999b71
commit 78ce50db9a
8 changed files with 1671 additions and 5 deletions

View File

@@ -20,7 +20,7 @@
以上是两个著名的分布式强化学习算法A3C和IMPALA最近研究中还有许多其他成果如SEED :cite:`espeholt2019seed`、Ape-X :cite:`horgan2018distributed`等都对分布式强化学习有更好的效果,我们不再做过多介绍。下面我们将讨论几个典型的分布式强化学习算法库。
![RLlib系统架构](../img/ch12/ch12-rllib-arch.png)
![RLlib系统架构](../img/ch12/ch12-rllib-arch.svg)
:width:`800px`
@@ -28,7 +28,7 @@
Ray :cite:`moritz2018ray`是由伯克利大学几名研究人员发起的一个分布式计算框架基于Ray之上构建了一个专门针对强化学习的系统RLlib :cite:`liang2017ray`。RLlib是一个面向工业级应用的开源强化学习框架同时包含了强化学习的算法库它对非强化学习专家使用也很方便。
![RLlib分布式训练](../img/ch12/ch12-rllib-distributed.png)
![RLlib分布式训练](../img/ch12/ch12-rllib-distributed.svg)
:width:`800px`

View File

@@ -2,7 +2,7 @@
上述的简单例子只是为了帮助读者理解强化学习在多智能体问题里的角色而如今前沿的多智能体强化学习算法已经能够解决相当大规模的复杂多智能体问题如星际争霸StarCraft II、Dota 2等游戏已相继被DeepMind、OpenAI等公司所研究的智能体AlphaStar :cite:`vinyals2019grandmaster`和OpenAI Five :cite:`berner2019dota`攻克达到超越人类顶级玩家的水平。国内公司如腾讯、启元世界等也提出了星际争霸游戏的多智能体强化学习解决方案TStarBot-X :cite:`han2020tstarbot`和SCC :cite:`wang2021scc`。对于这类高度复杂的游戏环境整个训练过程对分布式计算系统的要求更高而整个训练过程可能需要分为多个阶段。以AlphaStar为例它训练的智能体采用了监督学习与强化学习结合的方式。在训练早期往往先采用大量的人类专业玩家标定数据进行有监督的学习从而使智能体快速获得较好的能力随后训练会切换到强化学习过程使用前面介绍的虚构自学习的算法进行训练即自我博弈。为了得到一个表现最好的智能体算法需要充分探索整个策略空间从而在训练中不止对一个策略进行训练而是对一个策略集群League进行训练并通过类似演化算法的方式对策略集群进行筛选得到大量策略中表现最好的策略。如 :numref:`ch12/ch12-marl_train`所示在训练过程中每个智能体往往需要和其他智能体以及剥削者Exploiter进行博弈剥削者是专门针对某一个智能体策略的最佳对手策略与之对抗可以提高策略自身的防剥削能力。通过对大量智能体策略进行训练并筛选的这类方法称为集群式训练Population-based Training/League Training是一种通过分布式训练提高策略种群多样性进而提升模型表现的方式。可见在实践中这类方法自然需要分布式系统支持来实现多个智能体的训练和相互博弈这很好地体现了多智能体强化学习对分布式计算的依赖性。
![集群式多智能体强化学习训练示意图](../img/ch12/ch12-marl-train.png)
![集群式多智能体强化学习训练示意图](../img/ch12/ch12-marl-train.svg)
:width:`800px`
@@ -10,7 +10,7 @@
我们将对构建多智能体强化学习系统中的困难分为以下几点进行讨论:
* **智能体个数带来的复杂度**从单智能体系统到多智能体系统最直接的变化就是智能体个数从1变为大于1个。对于一个各个智能体独立的$N$智能体系统而言,这种变化带来的策略空间表示复杂度是指数增加的,即$\tilde{O}(e^N)$。举个简单的例子,对于一个离散空间的单智能体系统,假设其状态空间大小为$S$, 动作空间大小为$A$,游戏步长为$H$,那么这个离散策略空间的大小为$O(HSA)$;而直接将该游戏扩展为$N$玩家游戏后,所有玩家策略的联合分布空间大小为$O((HSA)^N)$。这是因为每个独立玩家的策略空间构成联合策略空间是乘积关系$\mathcal{A}=\mathcal{A}_1\times\dots\mathcal{A}_N$。而这将直接导致算法搜索复杂度提升。
* **智能体个数带来的复杂度**从单智能体系统到多智能体系统最直接的变化就是智能体个数从1变为大于1个。对于一个各个智能体独立的$N$智能体系统而言,这种变化带来的策略空间表示复杂度是指数增加的,即$\tilde{O}(e^N)$。举个简单的例子,对于一个离散空间的单智能体系统,假设其状态空间大小为$S$, 动作空间大小为$A$,游戏步长为$H$,那么这个离散策略空间的大小为$O(HSA)$;而直接将该游戏扩展为$N$玩家游戏后,所有玩家策略的联合分布空间大小为$O(HSA^N)$。这是因为每个独立玩家的策略空间构成联合策略空间是乘积关系$\mathcal{A}=\mathcal{A}_1\times\dots\mathcal{A}_N$。而这将直接导致算法搜索复杂度提升。
* **游戏类型带来的复杂度**:从博弈论的角度,多智能系统所产生的游戏类型是复杂的。从最直接的分类角度,有竞争型、合作型、混合型。在混合型游戏中,部分智能体之间为合作关系,部分智能体或智能体的集合间为竞争关系。复杂的关系需要更普适的系统进行表达,这也对多智能体系统的构建提出了挑战。多智能体游戏类型也有许多其他的分类角度,如单轮进行的游戏、多轮进行的游戏、多智能体同时决策的、多智能体序贯决策等等,每一类不同的游戏都有相应不同的算法。而现有的多智能体系统往往针对单一类型游戏或者单一算法,缺少普适性多智能体强化学习系统,尤其是分布式的系统。

View File

@@ -5,7 +5,7 @@
我们先对单节点强化学习系统进行介绍。
在这里我们以RLzoo :cite:`ding2020efficient`为例,讲解一个单节点强化学习系统构建所需要的基本模块。如 :numref:`ch12/ch12-rlzoo`所示是RLzoo中采用的一个典型的单节点强化学习系统它包括几个基本的组成部分神经网络、适配器、策略网络和价值网络、环境实例、模型学习器、经验回放缓存Experience Replay Buffer等。
我们先对前三个神经网络、适配器、策略网络和价值网络进行介绍。神经网络即一般深度学习中使用的神经网络用于实现基于数据的函数拟合特点是可以用梯度下降的方法更新。我们在图中简单列出常见的三类神经网络全连接网络卷积网络和循环网络。策略网络和价值网络是一般深度强化学习的常见组成部分分别是对策略函数和价值函数的近似表示。策略网络即一个由参数化深度神经网络表示的动作策略而价值网络为神经网络表示的状态价值State-Value或状态-动作价值State-Action Value函数。这里我们不妨称全连接网络卷积网络和循环网络为一般神经网络它们常作为基本构建模块而被用来搭建强化学习中的策略网络和价值网络。在RLzoo中适配器则是为实现强化学习特定函数近似而选配一般神经网络的功能模块每个适配器是一个根据网络输入输出格式决定的网络格式选择函数。如 :numref:`ch12/ch12-rlzoo`所示RLzoo在实现中使用了三个不类型的适配器来使得强化学习算法构建过程有自适应能力。首先根据不同的观察量类型强化学习智能体所用的神经网络头部会有不同的结构这一选择可以由一个基于观察量的适配器来实现其次根据所采用的强化学习算法类型相应的策略网络尾部需要有不同的输出类型包括确定性策略和随机性策略RLzoo中使用一个策略适配器来进行选择最后根据不同的动作输出如离散型、连续型、类别型等需要使用一个动作适配器来选择。介绍完这些我们已经有了可用的策略网络和价值网络这构成了强化学习智能体核心学习模块。除此之外还需要一个学习器Learner来更新这些学习模块更新的规则就是强化学习算法给出的损失函数。而要想实现学习模块的更新最重要的是输入的学习数据即智能体跟环境交互过程中所采集的样本。对于**离线**Off-Policy强化学习这些样本通常被存储于一个称为经验回放缓存的地方学习器在需要更新模型时从该缓存中采得一些样本来进行更新。这里说到的离线强化学习是强化学习算法中的一类强化学习算法可以分为**在线**On-Policy强化学习和离线强化学习两类按照某个特定判据。这个判据是用于更新的模型和用于采样的模型是否为同一个如果是则称在线强化学习算法否则为离线强化学习算法。因而离线强化学习通常允许与环境交互的策略采集的样本被存储于一个较大的缓存内从而允许在许久之后再从这个缓存中抽取样本对模型进行更新。而对于在线强化学习这个“缓存”有时其实也是存在的只不过它所存储的是非常近期内采集的数据从而被更新模型和用于采样的模型可以近似认为是同一个。从而这里我们简单表示RLzoo的强化学习系统统一包括这个经验回放缓存模块。有了以上策略和价值网络、经验回放缓存、适配器、学习器我们就得到了RLzoo中一个单节点的强化学习智能体将这个智能体与环境实例交互并采集数据进行模型更新我们就得到了一个完整的单节点强化学习系统。这里的环境实例化我们允许多个环境并行采样。
我们先对前三个神经网络、适配器、策略网络和价值网络进行介绍。神经网络即一般深度学习中使用的神经网络用于实现基于数据的函数拟合特点是可以用梯度下降的方法更新。我们在图中简单列出常见的三类神经网络全连接网络卷积网络和循环网络。策略网络和价值网络是一般深度强化学习的常见组成部分分别是对策略函数和价值函数的近似表示。策略网络即一个由参数化深度神经网络表示的动作策略而价值网络为神经网络表示的状态价值State-Value或状态-动作价值State-Action Value函数。这里我们不妨称全连接网络卷积网络和循环网络为一般神经网络它们常作为基本构建模块而被用来搭建强化学习中的策略网络和价值网络。在RLzoo中适配器则是为实现强化学习特定函数近似而选配一般神经网络的功能模块每个适配器是一个根据网络输入输出格式决定的网络格式选择函数。如:numref:`ch12/ch12-rlzoo`所示RLzoo在实现中使用了三个不类型的适配器来使得强化学习算法构建过程有自适应能力。首先根据不同的观察量类型强化学习智能体所用的神经网络头部会有不同的结构这一选择可以由一个基于观察量的适配器来实现其次根据所采用的强化学习算法类型相应的策略网络尾部需要有不同的输出类型包括确定性策略和随机性策略RLzoo中使用一个策略适配器来进行选择最后根据不同的动作输出如离散型、连续型、类别型等需要使用一个动作适配器来选择。介绍完这些我们已经有了可用的策略网络和价值网络这构成了强化学习智能体核心学习模块。除此之外还需要一个学习器Learner来更新这些学习模块更新的规则就是强化学习算法给出的损失函数。而要想实现学习模块的更新最重要的是输入的学习数据即智能体跟环境交互过程中所采集的样本。对于**离线**Off-Policy强化学习这些样本通常被存储于一个称为经验回放缓存的地方学习器在需要更新模型时从该缓存中采得一些样本来进行更新。这里说到的离线强化学习是强化学习算法中的一类强化学习算法可以分为**在线**On-Policy强化学习和离线强化学习两类按照某个特定判据。这个判据是用于更新的模型和用于采样的模型是否为同一个如果是则称在线强化学习算法否则为离线强化学习算法。因而离线强化学习通常允许与环境交互的策略采集的样本被存储于一个较大的缓存内从而允许在许久之后再从这个缓存中抽取样本对模型进行更新。而对于在线强化学习这个“缓存”有时其实也是存在的只不过它所存储的是非常近期内采集的数据从而被更新模型和用于采样的模型可以近似认为是同一个。从而这里我们简单表示RLzoo的强化学习系统统一包括这个经验回放缓存模块。有了以上策略和价值网络、经验回放缓存、适配器、学习器我们就得到了RLzoo中一个单节点的强化学习智能体将这个智能体与环境实例交互并采集数据进行模型更新我们就得到了一个完整的单节点强化学习系统。这里的环境实例化我们允许多个环境并行采样。
![RLzoo算法库中使用的强化学习系统](../img/ch12/ch12-rlzoo.png)

1202
img/ch12/ch12-marl-train.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 291 KiB

View File

@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="415.78836mm"
height="227.97214mm"
viewBox="0 0 415.78836 227.97214"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (1:1.1+202109281949+c3084ef5ed)"
sodipodi:docname="rllib1.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.45291836"
inkscape:cx="606.06949"
inkscape:cy="780.49386"
inkscape:window-width="1848"
inkscape:window-height="1136"
inkscape:window-x="72"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="layer1-2" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(74.471364,125.55213)">
<g
inkscape:label="Layer 1"
id="layer1-2"
transform="translate(-56.466556,-170.91559)">
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439"
width="196.35287"
height="51.963364"
x="-16.031324"
y="46.388351"
ry="7.2835722" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="82.013535"
y="66.777641"
id="text3865"><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="82.013535"
y="66.777641"
id="tspan3867">内置环境适配器</tspan><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="82.013542"
y="81.279243"
id="tspan3869">(如gym.Env, OpenSpiel, Unity3D)</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-4"
width="411.53979"
height="45.594776"
x="-16.918701"
y="181.33687"
ry="6.3909035" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="176.1823"
y="200.71672"
id="text3865-4"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
x="176.1823"
y="200.71672"
id="tspan3869-3">RLlib内核抽象</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="176.1823"
y="215.21832"
id="tspan86060">环境,工作者,输入阅读器,训练器,策略</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:0.826335;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-4-5"
width="411.71347"
height="31.120325"
x="-17.59164"
y="241.80211"
ry="4.3620567" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="175.59619"
y="261.2688"
id="text3865-4-9"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
x="175.59619"
y="261.2688"
id="tspan3869-3-6">@ray.remote: <tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif"
id="tspan71205">任务和行动者</tspan></tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="175.59619"
y="274.49792"
id="tspan86060-2" /></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-9"
width="196.35287"
height="51.963364"
x="200.93066"
y="45.863461"
ry="7.2835722" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="300.61472"
y="67.605286"
id="text3865-3"><tspan
sodipodi:role="line"
id="tspan3863-9"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="300.61472"
y="67.605286">内置算法</tspan><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="300.61472"
y="82.106888"
id="tspan3869-8">(如PPOTrainer)</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-8"
width="144.96021"
height="52.102989"
x="-16.117212"
y="111.84494"
ry="7.303143" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="56.822338"
y="127.51099"
id="text3865-5"><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="56.822338"
y="127.51099"
id="tspan3867-9">内置客户端/服务器支持</tspan><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="56.822342"
y="142.01259"
id="tspan3869-6">(用于外部模拟器)</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-8-1"
width="144.96021"
height="52.102989"
x="249.19214"
y="112.4102"
ry="7.303143" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="322.29852"
y="131.36505"
id="text3865-5-5"><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="322.29852"
y="131.36505"
id="tspan3867-9-8">内置默认模型</tspan><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="322.29852"
y="145.86665"
id="tspan3869-6-4">(包括LSTM+注意力机制)</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-8-3"
width="91.98288"
height="52.304867"
x="141.09564"
y="112.26492"
ry="7.33144" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="189.86104"
y="129.81113"
id="text3865-5-8"><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="189.86104"
y="129.81113"
id="tspan55122">内置策略和</tspan><tspan
sodipodi:role="line"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
x="189.86104"
y="144.31273"
id="tspan33591">损失函数</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

@@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="272.17957mm"
height="140.78094mm"
viewBox="0 0 272.17956 140.78095"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (1:1.1+202109281949+c3084ef5ed)"
sodipodi:docname="rllib_dist1.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.45291836"
inkscape:cx="442.68464"
inkscape:cy="325.66576"
inkscape:window-width="1848"
inkscape:window-height="1136"
inkscape:window-x="72"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="layer1-2" />
<defs
id="defs2">
<marker
style="overflow:visible"
id="Arrow2Mend"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow2Mend"
inkscape:isstock="true">
<path
transform="scale(-0.6)"
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:0.625;stroke-linejoin:round"
id="path17874" />
</marker>
<marker
style="overflow:visible"
id="Arrow1Lend"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend"
inkscape:isstock="true">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path17850" />
</marker>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-2.8301877,53.170878)">
<g
inkscape:label="Layer 1"
id="layer1-2"
transform="translate(27.267558,-90.996319)">
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439"
width="117.86252"
height="67.372093"
x="-23.93737"
y="79.646179"
ry="7.9062257" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="-17.67737"
y="117.43518"
id="text3785"><tspan
sodipodi:role="line"
id="tspan3783"
style="stroke-width:0.264583"
x="-17.67737"
y="117.43518">训练器</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-8"
width="54.641663"
height="25.560568"
x="30.502342"
y="82.889626"
ry="2.9995747" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="46.489758"
y="98.735794"
id="text3785-5"><tspan
sodipodi:role="line"
id="tspan3783-0"
style="stroke-width:0.264583"
x="46.489758"
y="98.735794">拼接</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2439-8-9"
width="54.641663"
height="25.560568"
x="30.239189"
y="117.45507"
ry="2.9995747" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="41.634937"
y="133.92754"
id="text3785-5-6"><tspan
sodipodi:role="line"
id="tspan3783-0-3"
style="stroke-width:0.264583"
x="41.634937"
y="133.92754">学习器</tspan></text>
<rect
style="fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:1;stroke-linejoin:round"
id="rect2439-9-8"
width="89.30571"
height="38.476437"
x="146.70959"
y="72.034241"
ry="4.5152731" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round"
id="rect2439-9-0"
width="89.30571"
height="38.476437"
x="152.25026"
y="78.543053"
ry="4.5152731" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:round"
id="rect2439-9"
width="89.30571"
height="38.476437"
x="157.93648"
y="85.490364"
ry="4.5152731" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="175.90797"
y="108.62353"
id="text3785-3"><tspan
sodipodi:role="line"
id="tspan3783-9"
style="stroke-width:0.264583"
x="175.90797"
y="108.62353">采样工作者</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
d="m 59.266346,143.17388 -0.137708,18.93118 146.731042,1.06734 0.17197,-37.75235"
id="path17845"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 59.75092,108.92605 0.03189,8.81987"
id="path18293" />
<path
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)"
d="M 205.96492,71.048464 206.19379,39.397006 58.50728,38.32907 58.51278,81.318156"
id="path18295"
sodipodi:nodetypes="cccc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="19.942596"
y="69.28083"
id="text19014"><tspan
sodipodi:role="line"
id="tspan19012"
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
x="19.942596"
y="69.28083">批样本</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="158.9675"
y="140.5659"
id="text19014-1"><tspan
sodipodi:role="line"
id="tspan19012-1"
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Italic';stroke-width:0.264583"
x="158.9675"
y="140.5659">新的权重</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="109.50063"
y="157.80412"
id="text19014-1-5"><tspan
sodipodi:role="line"
id="tspan19012-1-9"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;fill:#008000;stroke-width:0.264583"
x="109.50063"
y="157.80412">同步广播</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="109.03542"
y="51.166973"
id="text19014-1-5-8"><tspan
sodipodi:role="line"
id="tspan19012-1-9-4"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;fill:#008000;stroke-width:0.264583"
x="109.03542"
y="51.166973">同步采样</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="63.407452"
y="177.3765"
id="text19014-8"><tspan
sodipodi:role="line"
id="tspan19012-5"
style="stroke-width:0.264583"
x="63.407452"
y="177.3765">同步采样如A2C, PG, PPO</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB