Policy Gradient Methods for Reinforcement Learning with Function Approximation

Policy Gradient Methods for Reinforcement Learning with Function Approximation

1 Policy Gradient Theorem

在时间 t ∈ { 0 , 1 , 2 , . . . } t\in\{0,1,2,...\} t{ 0,1,2,...}的state, action, reword表示为 s t ∈ S , a t ∈ A , r t ∈ R s_t\in \mathcal S,a_t\in \mathcal A,r_t\in \mathcal R stS,atA,rtR。环境的动态是由状态转移概率 P s s ′ a = P r { s t + 1 = s ′ ∣ s t = s , a t = a } \mathcal P^a_{ss'}=\mathcal P_r\{s_{t+1}=s'|s_t=s,a_t=a\} Pssa=Pr{ st+1=sst=s,at=a}描述,expected rewards定义为 R s a = E { r t + 1 ∣ s t = s , a t = a } , ∀ s , s ′ ∈ S , a ∈ A \mathcal R_s^a=E\{r_{t+1}|s_t=s,a_t=a\},\forall s,s'\in\mathcal S,a\in \mathcal A Rsa=E{ rt+1st=s,at=a},s,sS,aA。agent在每个时间的决策由一个policy来描述 π ( s , a , θ ) = P r { a t = a ∣ s t = s , θ } , ∀ s ∈ S , a ∈ A \pi(s,a,\theta)=P_r\{a_t=a|s_t=s,\theta\},\forall s \in \mathcal S,a\in\mathcal A π(s,a,θ)=Pr{ at=ast=s,θ},sS,aA,其中 θ \theta θ是参数。我们假说 π \pi π对其参数是可微的,KaTeX parse error: Undefined control sequence: \part at position 7: \frac{\̲p̲a̲r̲t̲\pi(s,a)}{\part…存在,一般情况下把 π ( s , a , θ ) \pi(s,a,\theta) π(s,a,θ)写成 π ( s , a ) \pi(s,a) π(s,a)

在函数近似的情况下,有两种制定agent目标的方法。一种是average reward formulation,在这种表述中,policies是根据每一步的 long-term expected reward p(rr)进行排序的。他们每一步的长期预期报酬, ρ ( π ) \rho(\pi) ρ(π)

在这里插入图片描述

在这里插入图片描述

我们讨论的第二个公式是有一个指定的起始状态 s 0 s_0 s0我们只关心从中获得的长期回报。

在这里插入图片描述

我们的第一个结果涉及到 performance metric相对于策略参数的梯度:

在这里插入图片描述

证明:

在这里插入图片描述

在这里插入图片描述

上面用到了Bellman公式:

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

2 Policy Gradient with Approximation

现在考虑 Q π Q^\pi Qπ被一个学习函数近似器近似的情况。如果这个近似值足够好,我们可能希望用它来代替(2)中的 Q π Q^\pi Qπ,并且仍然大致指向梯度的方向。

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

3 Application to Deriving Algorithms and Advantages

给定一个策略参数化,定理2可以用来推导值函数参数化的适当形式。例如,考虑一个由多个特征组成的吉布斯分布的策略:

在这里插入图片描述

其中每个 ϕ s a \phi_{sa} ϕsa是一个关于 characterizing state-action pair s, a的l维的特征向量。满足compatibility condition(4)要求

在这里插入图片描述

换句话说,fw必须是与策略相同的线性特征,只是归一化为每个状态的平均值为零。对于各种非线性策略参数化,如多层反向传播网络,可以很容易地得出其他算法。

参考链接:
https://zhuanlan.zhihu.com/p/139011267

https://zhuanlan.zhihu.com/p/104288536

https://blog.csdn.net/weixin_30530339/article/details/99306820

Guess you like

Origin blog.csdn.net/weixin_37958272/article/details/121200519