Skip to content

Commit e1e6a5e

Browse files
committed
bring back two equations, which were originally exercises. Labeled them.
1 parent 698e2bc commit e1e6a5e

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

_posts/2025-08-20-finite_mdp.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ $$
259259
방금 것은 $v$에 대한 Bellman equation이다.
260260
$q$에 대해서도 Bellman equation이 있다.
261261
모든 $s\in\mathcal S$와 모든 $a\in\mathcal A$에 대하여 다음 식이 성립한다.
262-
책에는 이것이 Exercise 3.17로 되어있는 듯하고, 따로 식에 대한 라벨링이 되어 있지않은데 asterisk를 붙여 표시해보려 한다.
262+
책에는 이것이 Exercise 3.16로 되어있는 듯하고, 따로 식에 대한 라벨링이 되어 있지 않은데 e3.17로 표시해보려 한다.
263263

264264
$$
265265
\begin{align*}
@@ -270,20 +270,29 @@ q_\pi(s,a)
270270
&=\sum_{r, s'} p(s', r|s,a)\mathbb E_\pi\left[r+\gamma G_{t+1}|S_{t+1}=s'\right]\\
271271
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma\mathbb E_\pi\left[G_{t+1}|S_{t+1}=s'\right]\right)\\
272272
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma\sum_{a'}\pi(a'|s')\mathbb E_\pi\left[G_{t+1}|S_{t+1}=s', A_{t+1}=a'\right]\right)\\
273-
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma\sum_{a'}\pi(a'|s')q_\pi(s',a')\right)\tag{3.14*}
273+
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma\sum_{a'}\pi(a'|s')q_\pi(s',a')\right)\tag{e3.17}
274274
\end{align*}
275275
$$
276276

277277
이것은 변수가 $\vert\mathcal S\vert\vert\mathcal A\vert$개이고 식의 개수도 $\vert\mathcal S\vert\vert\mathcal A\vert$개인 연립일차방정식이다.
278278

279-
<!-- 그런데 증명을 하다보면 현재의 가치는 $v$로 두고 다음 상태의 가치는 $q$로 두고 싶어지고, 또 그 반대인 식도 만들어내고 싶어진다.
280-
예를 들어 위의 증명을 조금만 바꾸면 다음 두 식이 성립한다.
279+
그런데 증명을 하다보면 현재의 가치는 $v$로 두고 다음 상태의 가치는 $q$로 두고 싶어지고, 또 그 반대인 식도 만들어내고 싶어진다.
280+
예를 들어 위의 증명을 조금만 바꾸면 다음 두 식이 성립한다 (exercise 3.18, 19).
281281

282282
$$
283283
\begin{align*}
284284
v_\pi(s)
285-
&=\sum_a\pi(a|s)\sum_{r,s'}p(r,s'|s,a)\left(r+\gamma\sum_{a'}\pi(a'|s')q_\pi(s',a')\right)\tag{3.14**}\\
285+
&=\mathbb E_\pi\left[G_t|S_t=s\right]\\
286+
&=\sum_a\pi(a|s)\mathbb E_\pi\left[G_t|S_t=s,A_t=a\right]\\
287+
&=\sum_a\pi(a|s)q_\pi(s,a)
288+
\tag{e3.18}\\
286289
q_\pi(s,a)
287-
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma v_\pi(s')\right]\tag{3.14***}
290+
&=\mathbb E_\pi\left[G_t|S_t=s, A_t=a\right]\\
291+
&=\mathbb E_\pi\left[R_{t+1}+\gamma G_{t+1}|S_t=s, A_t=a\right]\\
292+
&=\sum_{r, s'} p(s', r|s,a)\mathbb E_\pi\left[R_{t+1}+\gamma G_{t+1}|S_t=s,A_t=a, R_{t+1}=r, S_{t+1}=s'\right]\\
293+
&=\sum_{r, s'} p(s', r|s,a)\mathbb E_\pi\left[r+\gamma G_{t+1}|S_{t+1}=s'\right]\\
294+
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma\mathbb E_\pi\left[G_{t+1}|S_{t+1}=s'\right]\right)\\
295+
&=\sum_{r, s'} p(s', r|s,a)\left(r+\gamma v_\pi(s')\right)
296+
\tag{e3.19}
288297
\end{align*}
289-
$$ -->
298+
$$

0 commit comments

Comments
 (0)