强化学习-An introduction之 动态规划(DP) 个人笔记

Chapter 4 DP

上一章的 two forms of the Bellman optimality equation:

or

1 Policy Evaluation

update rule:

vk v k 收敛到 vπ v π .

常规的update使用两个数组来存放old和new values,这是two-array version;

还有一种是使用一个数组,直接在原有的array上更新,这是in-place version;

虽然第二种看起来不正规,但是有更快的收敛速度,因为它使用新更新的数据。

2 Policy Improvement

我们首先明确一点:每个policy π π 都对应自己的value function—— vπ v π ,我们为policy计算value function是为了找到更好的policy。

那么问题来了,我们怎么知道在当前policy下,在状态s下采取某个行动 a=π(s) a = π ( s ) 是最优的呢?一种检验的方法就是采取另外一个行动 aπ(s) a ≠ π ( s ) ,计算value function和 vπ(s) v π ( s ) 相比。

value function之前提到过:

policy improvement theorem:

如果对所有的状态s有:

那么就有:

证明如下:

greedy policy:

如果 vπ=vπ v π = v π ′ ,那么 π π π π ′ 都是最优策略。

3 Iteration

3.1 Policy Iteration

a sequence of monotonically improving policies and value functions:

这种找到最优策略的方式就是Policy Iteration。

Policy Iteration Algorithm:

3.2 Value Iteration

policy iteration 的缺点是它需要在policy evaluation后才能更新策略,这非常耗时。

value iteration改进了这种缺点,不再关于a求和,而是取max

value iteration:

Value Iteration Algorithm:

3.3 Asynchronous Dynamic Programming

之前的DP方法的缺点是每一次sweep都要在整个状态集合上进行操作。

Asynchronous DP 可以以任意的顺序更新状态的value。

3.4 Iteration Summary:GPI

Generalized Policy Iteration

Policy iteration有两个同时的交互的过程——policy evaluation和policy improvement。

在policy iteration中,这两个过程是交替的,一个完成才能开始另一个,但这不必要;

在value iteration中,这两个过程是结合在一起的;

在Asynchronous DP中,这两个过程是交错的,可以不按顺序。

我们用一个名词——generalized policy iteration (GPI)来形容整体的思想。

Each process drives the value function or policy toward one of the lines representing a solution to one of the two goals. The goals interact because the two lines are not orthogonal. Driving directly toward one goal causes some movement away from the other goal. Inevitably, however, the joint process is brought closer to the overall goal of optimality.

4 Efficiency of DP

A DP method is guaranteed to find an optimal policy in polynomial time even though the total number of (deterministic) policies is kn k n .

On problems with large state spaces, asynchronous DP methods are often preferred.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值