提交 37e345b0 编写于 作者: X xiaowei_xing

test

上级 597c4b1a
......@@ -206,5 +206,35 @@ $$
$$
$$
\sum_{t=0}^{T-1} \underbrace{\nabla_{\theta}\log \pi_{\theta}(a_t|s_t)}_{\text{no dynamics model required!}}。
= \sum_{t=0}^{T-1} \underbrace{\nabla_{\theta}\log \pi_{\theta}(a_t|s_t)}_{\text{no dynamics model required!}}。
\tag{10}
$$
处理 $\log P(\tau^{(i)};\theta)$ 而不是 $P(\tau^{(i)};\theta)$ 使得我们可以在不参考初始状态,甚至不参考环境动态模型的情况下表示梯度!
将式(7)和式(10)结合,我们得到:
$$
\nabla_{\theta}V(\theta) \approx \hat{g} = \frac{1}{m}\sum_{i=1}^{m}R(\tau^{(i)}) \sum_{t=0}^{T-1}\nabla_{\theta}\log \pi_{\theta}(a_t^{(i)}|s_t^{(i)}),
$$
我们可以将其转化为优化 $\pi_{\theta}$ 的具体算法(第 5 部分)。在这之前,我们要提及这个结果的广义版本,并讨论利用将 $R(\tau^(i))$ 分解为奖励项 $r_t^{(i)}$ 之和来优化上述推导(4.3 节)。
## 4.2 策略梯度定理(The Policy Gradient Theorem)
**定理 4.1** 对于所有的可导策略 $\pi_{\theta}(a|s)$ 和所有的策略目标函数 $V(\theta)=J_1$,$J_{avR}$ 或 $\frac{1}{1-\gamma}J_{avV}$,策略梯度为:
$$
\nabla_{\theta}V(\theta)=\mathbb{E}_ {\pi_{\theta}}[Q^{\pi_{\theta}}(s,a)\nabla_{\theta}\log \pi_{\theta}(a|s)]。
$$
我们不详细讨论这个更一般的定理的推导,但本课程中讨论的相同的概念同样适用于非片段式(连续)的环境。到目前为止,我们用片段的总奖励 $R(\tau)$ 代替了这个定理中的 Q 值,但在后面的内容中,我们将使用时间结构来把我们的结果转化为更像这个定理的形式,其中未来的回报 $G_t$(即 $Q(s,a)$ 的无偏估计)将取代 $Q^{\pi_{\theta}}(s,a)$。
## 4.3 用奖励的时间形式求策略梯度(Using Temporal Structure of Rewards for the Policy Gradient)
式(6)可被表示为:
$$
\nabla_{\theta}V(\theta)=\nabla_{\theta}\mathbb{E}_ {\tau \sim \pi_{\theta}}[R(\tau)\sum_{t=0}^{T-1}\nabla_{\theta}\log \pi_{\theta}(a_t|s_t)]。
\tag{11}
$$
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册