deep reinforcement learning: Q-learning

Critic

critic evevaluates how good the actor is.

Value Function: V^{\pi}(S): using actor \pi, 在观察state s后,期望累积的reward。

Estimate V^{\pi}(S)

MC(monte carlo) based approach

actor与环境互动,critic根据游戏结束后得到的真实reward,对state最终的reward,进行预测,做回归问题求解。

image.png

Temporal-difference approach

\begin{array}{c} \cdots s_{t}, a_{t}, r_{t}, s_{t+1} \cdots \\ V^{\pi}\left(s_{t}\right)=V^{\pi}\left(s_{t+1}\right)+r_{t} \end{array}

image.png

MC方法,根据游戏结束的reward,variance较大。
TD方法,上一时刻V^{\pi}(s_{t})可能不准确。

Q fucntion: another critic

state-action value function
在给定state和action(不一定是agent选择的action)下的value。

Another way to use critic: Q-learning

image.png

\pi^{\prime}(s)=\arg \max _{a} Q^{\pi}(s, a)

对于所有的state,V^{\pi^{\prime}}(s) \geq V^{\pi}(s)
证明过程如下,详细见李宏毅课程:

\pi^{\prime}并没有实际的参数,通过Q funtion选择动作。

Tips

  • Target network

在TD方法中,
\mathrm{Q}^{\pi}\left(s_{t}, a_{t}\right) =r_{t}+\mathrm{Q}^{\pi}\left(s_{t+1}, \pi\left(s_{t+1}\right)\right)

更新式中,有两项需要调整优化,比较难以优化,因此会固定一个项为为target network。流程如下:

image.png
  • exploration
image.png
  1. epsilon greedy

  2. Boltzman exploration
    以归一化概率进行action采样。

  • Replay buffer

存储experience,可能来自多个不同的policy。
好处:

  1. 节省与环境互动的时间。
  2. 从中sample batch里多样性更强。

Q learning algorithm

image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容