State-value Function 状态价值函数,衡量在给定策略下从某状态出发的长期优劣。

基本定义

对一个满足马尔可夫性质的 MDP,考虑时间步序列 ,在时间步 智能体处于状态 ,按策略 选择动作 ,得到下一状态 和即时回报 :

都是随机变量。从 出发的状态-动作-回报轨迹为:

折扣回报(return)定义为:

其中 是折扣率。 是随机变量。随机变量

Since is a random variable, we can calculate its expected value (also called the expectation or mean): 期望

Here, is called the state-value function 状态价值函数 or simply the state value of . Some important remarks are given below.

  • depends on . This is because its definition is a conditional expectation with the condition that the agent starts from . 状态为 时的期望
  • depends on . This is because the trajectories are generated by following the policy . For a different policy, the state value may be different.
  • does not depend on . If the agent moves in the state space, represents the current time step. The value of is determined once the policy is given.

形式化定义(式 3.12):

其中 表示在策略 下的期望。终态的价值始终为零。

动作价值函数

类似地,动作价值函数(action-value function)定义为在状态 采取动作 后、遵循策略 的期望回报:

与 的关系

状态价值是动作价值关于策略 的期望:

反之,动作价值可用状态价值和动力学函数表示:

Bellman 方程的推导

将回报递推 代入 的定义(式 3.14 的完整推导):

这就是 Bellman 方程。它将一个状态的价值表示为后继状态价值的递推关系,是 动态规划、TD 学习 和 MC 方法 的理论基础。

的 Bellman 方程为:

最优价值函数

最优状态价值函数 和最优动作价值函数 对应所有策略中能取得的最大期望回报:

对给定的 MDP, 和 是唯一的,但最优策略可能有多个。 与 的关系:

最优价值函数满足 Bellman 最优方程:

对有限 MDP,Bellman 最优方程有唯一解。任何关于 或 的贪心策略都是最优策略。

与回报的关系

  • 当策略和系统模型都是确定性的:从某状态出发总是产生相同的轨迹,回报等于状态价值
  • 当策略或系统模型是随机的:从同一状态出发可能产生不同轨迹,状态价值是这些回报的均值

状态价值比回报更正式地用于评估策略:产生更大状态价值的策略更优。Bellman 方程 提供了计算状态价值的核心工具。

相关概念