Silver RL·Lecture 2·Question List

Silver RL Lecture 2 — Question List

Updated 2026-07-22

2026-07-22 harvest: Lecture 2 슬라이드에 남긴 하이라이트·코멘트에서 뽑은 막혔던 것 6개 + 중요 표시 요약. 아래 목차를 클릭하면 해당 질문으로 이동.
원본: David Silver - RL Course (UCL 2015) · 짝 문서: Silver RL Lecture 3 — Question List

목차

❓ 막혔던 것들

Q1. Bellman equation 유도 마지막 줄이 왜 성립하나

슬라이드: Bellman Equation for MRPs · Zotero p.19
내 코멘트: "마지막 식전개에서 왜 저렇게 가능한 이유가 뭔지 모르겠음"

Law of total expectation (tower property) 한 방이다:

E[Gt+1∣St=s]=E[ E[Gt+1∣St+1] ∣ St=s]=E[v(St+1)∣St=s]\mathbb{E}[G_{t+1} \mid S_t=s] = \mathbb{E}\big[\, \mathbb{E}[G_{t+1} \mid S_{t+1}] \,\big|\, S_t=s \big] = \mathbb{E}[v(S_{t+1}) \mid S_t=s]

안쪽 conditioning을 St+1S_{t+1}만으로 줄일 수 있는 건 Markov property 덕분 (state가 미래의 sufficient statistic이라 그 이전 이력이 불필요). "미래 전체 return의 기대"를 "다음 state의 value의 기대"로 접는 이 한 줄이 recursion 전체의 심장이고, Lecture 3의 모든 backup이 이 접기를 반복 적용하는 것.


Q2. Direct solve는 왜 n의 세제곱인가 (+ DP·MC·TD 미학습)

슬라이드: Solving the Bellman Equation · Zotero p.23
내 코멘트: "Why O(n^3)? and I don't know well about DP, Monte-Carlo eval, TD learning yet."

v=(I−γP)−1Rv = (I-\gamma\mathcal{P})^{-1}\mathcal{R}은 결국 n×nn \times n linear system (I−γP)v=R(I-\gamma\mathcal{P})v = \mathcal{R}을 푸는 것 — Gaussian elimination(LU decomposition)이 O(n3)O(n^3) flops. inverse를 명시적으로 만들든 solve만 하든 차수는 같다. 그래서 state 수가 크면 direct solve 불가 → iterative 방법이 필요하다는 게 이 슬라이드의 복선.

뒷부분은 이미 절반 해소: DP = Lecture 3에서 공부 완료 (iterative policy evaluation·policy iteration·value iteration). MC evaluation·TD learning은 Lecture 4(prediction)·5(control)에서 나옴 — 모델 P,R\mathcal{P}, \mathcal{R} 없이 sample로 같은 Bellman 구조를 돌리는 것. 축은 Model-Free vs Model-Based RL.


Q3. Optimal policy theorem — 증명을 알아야 하나

슬라이드: Optimal Policy (theorem) · Zotero p.40
내 코멘트: "I wanna know its proof and lemma like contraction theorem..? Do I need to know the proof btw"

직감이 정확했다 — 그 lemma가 바로 contraction mapping (Banach fixed-point) theorem이고, Lecture 3 마지막 섹션이 그걸 다룬다. 정식 정리: Contraction Mapping & Bellman Convergence (Silver RL Lecture 3 — Question List의 Q6도 참고).

기존 답은 T∗T^*의 unique fixed point 존재까지만 자세히 다뤘고, slide의 첫 번째 bullet에 필요한 "그 fixed point를 실제 policy가 달성한다"는 단계와 세 번째 bullet qπ∗=q∗q_{\pi_*}=q_*의 증명이 빠져 있었다.

정식 증명 (finite state·action MDP, 0≤γ<10\le\gamma<1):

Markov Decision Process (MDP) › Optimal Policy Theorem — Proof of All Three Bullets

알아야 하나: contraction 논증 하나는 알아둘 가치가 충분하다. "operator를 반복 적용하면 수렴"은 Eigenvalues and Discrete-Time Stability의 ∥Ak∥→0\|A^k\|\to 0과 같은 구조라 내 제어 배경과 직결. 그 이상의 일반화(continuous state의 measure-theoretic 논증)는 지금 단계에선 불필요.


Q4. Student MDP 슬라이드 오타 — 내 계산 9.4가 맞나

슬라이드: Example: Optimal Action-Value Function for Student MDP · Zotero p.39
내 코멘트: "typo. q_* = 9.4 = 1 + 0.26 + 0.48 + 0.4*10"

내가 맞다. γ=1\gamma=1에서

q∗(s,Pub)=1+0.2⋅6+0.4⋅8+0.4⋅10=9.4q_*(s,\text{Pub}) = 1 + 0.2\cdot 6 + 0.4\cdot 8 + 0.4\cdot 10 = 9.4

슬라이드의 8.4는 오타 (널리 알려진 erratum). Consistency check도 통과: 그 state의 v∗=max⁡{q∗(Study),q∗(Pub)}=max⁡{10,9.4}=10v_* = \max\{q_*(\text{Study}), q_*(\text{Pub})\} = \max\{10, 9.4\} = 10 ✓. 슬라이드를 의심하고 손으로 검산한 것 자체가 이 강의에서 얻은 제일 좋은 신호다.


Q5. Infinite MDPs (LQR·HJB) — 이해하고 싶은데 어렵다?

슬라이드: Infinite MDPs (no exam) · Zotero p.50

이 슬라이드는 사실 내가 이미 가진 조각들의 지도다:

  • Countably infinite state/action → 개념적으로 그대로 (straightforward)
  • Continuous state/action → 일반해는 없고, linear dynamics + quadratic cost 특수 케이스에서만 closed form = LQR → LQR and the Riccati Equation
  • Continuous time → Bellman equation의 time-step →0\to 0 극한이 HJB PDE → Hamilton-Jacobi-Bellman (HJB)

상세 유도는 LQR, Riccati, and the Bellman Bridge에 이미 만들어 뒀다. "어렵다"가 아니라 이미 절반은 아는 내용 — RL의 Bellman과 최적제어의 Riccati/HJB가 같은 방정식의 두 얼굴이라는 게 이 슬라이드의 메시지고, 정확히 내 연구 방향(MPC+RL)의 이론적 접점이다.


Q6. Ergodic MDP와 average reward는 갑자기 왜 나오나

슬라이드: Ergodic Markov Process → Ergodic MDP → Average Reward Value Function (no exam) · Zotero p.54
내 코멘트: "갑자기 왜 튀어나온 건지, 뭔말인지 하나도 모르겠음"

맥락: Extensions 섹션의 "Undiscounted, average reward MDPs" 파트. γ=1\gamma=1이고 horizon이 무한이면 return GtG_t가 발산하니까, discounted return 대신 다른 목적함수가 필요하다 → time-step당 average reward

ρπ=lim⁡T→∞1T E[∑t=1TRt]\rho^\pi = \lim_{T\to\infty}\frac{1}{T}\,\mathbb{E}\Big[\sum_{t=1}^{T} R_t\Big]

이게 well-defined이고 시작 state와 무관하려면 ergodic 가정(recurrent + aperiodic → unique stationary distribution dπd^\pi)이 필요해서, ergodicity가 먼저 "튀어나온" 것. value는 평균 대비 초과분 v~π(s)=Eπ[∑k(Rt+k−ρπ)∣St=s]\tilde v_\pi(s) = \mathbb{E}_\pi[\sum_k (R_{t+k}-\rho^\pi) \mid S_t=s]로 재정의된다.

우선순위 ⚪ — no exam 파트고, 지금은 discounted 세팅만 확실하면 된다. average-cost optimal control과 연결되는 지점이라는 것만 기억.


⭐ 중요 표시해둔 것들

  • Markov property: P[St+1∣St]=P[St+1∣S1,…,St]\mathbb{P}[S_{t+1}\mid S_t] = \mathbb{P}[S_{t+1}\mid S_1,\dots,S_t] — "state는 미래의 sufficient statistic". MDP는 environment가 fully observable일 때의 형식화
  • MDP =⟨S,A,P,R,γ⟩= \langle\mathcal{S},\mathcal{A},\mathcal{P},\mathcal{R},\gamma\rangle. Optimal control은 주로 continuous MDP, bandit은 state 1개짜리 MDP → Markov Decision Process (MDP)
  • Policy는 current state에만 의존 (history ✗) → stationary, At∼π(⋅∣St)A_t\sim\pi(\cdot\mid S_t)
  • Bellman expectation (2-step 형태): vπ(s)=∑aπ(a∣s)(Rsa+γ∑s′Pss′avπ(s′))v_\pi(s)=\sum_a \pi(a|s)\big(\mathcal{R}^a_s+\gamma\sum_{s'}\mathcal{P}^a_{ss'}v_\pi(s')\big), qπq_\pi는 대응형 — backup diagram으로 기억
  • Matrix form: vπ=Rπ+γPπvπv_\pi = \mathcal{R}^\pi + \gamma\mathcal{P}^\pi v_\pi → 작은 문제만 direct solve (Q2)
  • MDP가 "solved" = optimal value function을 아는 것. q∗q_*를 알면 optimal policy는 즉시: π∗(s)=argmax⁡aq∗(s,a)\pi_*(s)=\operatorname{argmax}_a q_*(s,a), deterministic optimal policy가 항상 존재
  • Bellman optimality: v∗(s)=max⁡a(Rsa+γ∑s′Pss′av∗(s′))v_*(s)=\max_a\big(\mathcal{R}^a_s+\gamma\sum_{s'}\mathcal{P}^a_{ss'}v_*(s')\big) — max⁡\max 때문에 non-linear, closed form 없음(일반적으로) → Value Iteration·Policy Iteration·Q-learning·Sarsa
  • POMDP: hidden state 있는 MDP. belief state를 쓰면 MDP로 변환 가능 (단, belief space는 continuous가 됨)

📌 다음 액션

  • Lecture 3 질문들은 Silver RL Lecture 3 — Question List에
  • ✅ contraction mapping explainer 생성됨 (2026-07-22) → Contraction Mapping & Bellman Convergence · Ergodic/average reward는 보류(⚪)
rlsilver-coursequestionsharvest