RL3 - 贝尔曼最优公式
约 624 字大约 2 分钟
- Core concepts: optimal state value and optimal policy
- A fundamental tool: the Bellman optimality equation (BOE)
1. Optimal policy
最优策略的定义:
A policy is optimal if for all s and for any other policy .
需要确定几件事:
- 最优策略是否存在 存在,根据 the contraction mapping Theorem.
- 最优策略是否唯一 唯一,根据 the contraction mapping Theorem.
- 最优策略是 stochastic 还是 deterministic deterministic 且 greedy
- 如何得到最优策略 选取状态中最大的 action value 作为下一步的 action
2. Bellman optimality equation (BOE)
2.1 基本形式
对于贝尔曼最优公式而言,其策略表示的是最优策略,除了需要求解 state value 外,还需要求解最优策略.
elementwise form:
matrix-vector foem:
2.2 如何求解
对于贝尔曼最优公式而言,区别于贝尔曼公式,只是求解各状态的 state value, 我们还需要理解其所描述的最优策略
具体分两步:
2.2.1 如何处理等式右边的 (最优策略)
, 为了让右边取到最大值的情况,我们只需要在当前状态下,保证选取最大的 action value 即可,对应策略表示为:
其中表示在该状态下计算出来的最大 action value 对应的动作,即
2. 求解 state value
将 BOE 转换为 的形式,其中
对应一个向量,
求解方法:
- Fix point:
- Contraction mapping(contractive function):
由此可以根据Contraction Mapping Theorem:
For any equation that has the form of , if is a contraction mapping, then
- Existence: 存在不动点,满足
- Uniqueness: 不动点是唯一的
- Algorithm: Consider a sequence where , then as . Moreover, the convergence rate is exponentially fast.
因此,可以通过Contraction Mapping Theorem来求解贝尔曼最优公式,因为其满足该理论,即是一个contraction mapping。
