Critic
critic evevaluates how good the actor is.
Value Function: : using actor
, 在观察state s后,期望累积的reward。
Estimate
MC(monte carlo) based approach
actor与环境互动,critic根据游戏结束后得到的真实reward,对state最终的reward,进行预测,做回归问题求解。
image.png
Temporal-difference approach
image.png
MC方法,根据游戏结束的reward,variance较大。
TD方法,上一时刻可能不准确。
Q fucntion: another critic
state-action value function
在给定state和action(不一定是agent选择的action)下的value。
Another way to use critic: Q-learning
image.png
对于所有的state,。
证明过程如下,详细见李宏毅课程:
并没有实际的参数,通过Q funtion选择动作。
Tips
- Target network
在TD方法中,
更新式中,有两项需要调整优化,比较难以优化,因此会固定一个项为为target network。流程如下:
image.png
- exploration
image.png
epsilon greedy
Boltzman exploration
以归一化概率进行action采样。
- Replay buffer
存储experience,可能来自多个不同的policy。
好处:
- 节省与环境互动的时间。
- 从中sample batch里多样性更强。
Q learning algorithm
image.png