Reinforcement Learning Exercise 3.15

博客围绕强化学习的网格世界示例展开,探讨奖励正负号及间隔的重要性。通过证明得出,给所有奖励加上常数 c 会使所有状态值加上常数 vc,且不影响任何策略下状态的相对值,并推导出 vc 与 c 和 γ 的关系为 vc = 1 - γc。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Exercise 3.15 In the gridworld example, rewards are positive for goals, negative for running into the edge of the world, and zero the rest of the time. Are the signs of these rewards important, or only the intervals between them? Prove, using (3.8), that adding a constant ccc to all the rewards adds a constant, vcv_cvc, to the values of all states, and thus does not affect the relative values of any states under any policies. What is vcv_cvc in terms of ccc and γ\gammaγ?

First, for vπv_\pivπ, according to definition:
vπ(s)=Eπ(Gt∣St=s)=Eπ(∑k=0∞γk⋅Rt+k+1∣St=s) \begin{aligned} v_\pi(s) &= \mathbb E_\pi(G_t|S_t=s) \\ &= \mathbb E_\pi ( \sum_{k=0}^{\infty} \gamma^k \cdot R_{t+k+1} | S_t = s) \end{aligned} vπ(s)=Eπ(GtSt=s)=Eπ(k=0γkRt+k+1St=s)
Denote R^=R+c\hat R = R + cR^=R+c, for R^\hat RR^, there is:
v^π(s)=Eπ(G^t∣St=s)=Eπ(∑k=0∞γk⋅R^t+k+1∣St=s)=Eπ[∑k=0∞γk⋅(Rt+k+1+c)∣St=s]=Eπ(∑k=0∞γk⋅Rt+k+1∣St=s)+Eπ(∑k=0∞γk⋅c∣St=s)=Eπ(∑k=0∞γk⋅Rt+k+1∣St=s)+∑k=0∞γk⋅c=vπ(s)+c1−γ \begin{aligned} \hat {v}_\pi(s) &= \mathbb E_\pi(\hat G_t|S_t=s) \\ &= \mathbb E_\pi ( \sum_{k=0}^{\infty} \gamma^k \cdot \hat R_{t+k+1} | S_t = s) \\ &= \mathbb E_\pi \bigl [ \sum_{k=0}^{\infty} \gamma^k \cdot (R_{t+k+1} + c ) | S_t = s \bigr ] \\ &= \mathbb E_\pi ( \sum_{k=0}^{\infty} \gamma^k \cdot R_{t+k+1} | S_t = s) + \mathbb E_\pi(\sum_{k=0}^{\infty} \gamma^k \cdot c | S_t = s)\\ &= \mathbb E_\pi ( \sum_{k=0}^{\infty} \gamma^k \cdot R_{t+k+1} | S_t = s) + \sum_{k=0}^{\infty} \gamma^k \cdot c \\ &= v_\pi(s) + \frac {c}{1 - \gamma} \\ \end{aligned} v^π(s)=Eπ(G^tSt=s)=Eπ(k=0γkR^t+k+1St=s)=Eπ[k=0γk(Rt+k+1+c)St=s]=Eπ(k=0γkRt+k+1St=s)+Eπ(k=0γkcSt=s)=Eπ(k=0γkRt+k+1St=s)+k=0γkc=vπ(s)+1γc
∴vc=c1−γ \therefore v_c = \frac {c}{1-\gamma} vc=1γc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值