Velocer › Lernkarten › University of Wisconsin–Madison › CS 639: Introduction to Reinforcement Learning · UW-Madison
CS 639: Introduction to Reinforcement Learning · UW-Madison
Quizzing myself for CS 639 with these. · von nullpointer_7 · 96 Karten
- In the RL interaction loop, what happens after the agent picks action \(A_t\) in state \(S_t\)?The agent receives reward \(R_{t+1}\) and transitions to state \(S_{t+1}\).
- What is a policy \(\pi\) in reinforcement learning?A mapping from states to actions (or to distributions over actions); finding a good policy is the goal of RL.
- Write the recursive definition of the return \(G_t\).\(G_t = R_{t+1} + \gamma G_{t+1} = \sum_{k\ge 0}\gamma^k R_{t+k+1}\), where \(\gamma\) is the discount factor.
- What objective \(J(\pi)\) does RL aim to maximize?\(J(\pi) = \mathbb E_\pi[G_0]\) — the expected full return from the start, not just the next reward.
- What role does the reward signal play in RL?It defines the objective to be optimized; it is not a hint or instruction about how the agent should act.
- Why can greedy action selection be suboptimal in RL?Because of delayed consequences: accepting a worse immediate step can lead to a better overall plan, so greedy choices may lose to a long-term plan.
- State the Bellman optimality equation for shortest-path value \(V^\star(x)\).\(V^\star(x) = \min_y[c(x,y) + V^\star(y)]\); acting greedily with respect to \(V^\star\) is optimal.
- How are uncertain transitions handled in the RL formalism?By taking expectations over outcomes, which leads to the Markov decision process (MDP) framework.
- What are the two main approaches when the environment model is unknown?Model-based: estimate \(\hat P\) and then plan. Model-free: average observed returns directly.
- What limitation arises from learning only through interaction?You only learn about actions you actually try, so exploration is required to discover good actions.
- Why are parameterized functions \(f(x;\theta)\) needed in large state spaces?Because tabular representations are infeasible; a parameterized function generalizes across states.
- What are the three core challenges of reinforcement learning?Credit assignment, exploration, and generalization.
- How does the ladder from supervised learning to contextual bandit to full RL progress?Each step is more general and less tractable: supervised learning, then contextual bandits, then full RL with sequential decisions.
- What is planning in relation to reinforcement learning?Planning is RL with a known model of the environment.
- What should you identify first when approaching an RL problem?The information regime: known model, live interaction, or fixed logs.
- What components define a Markov Decision Process (MDP)?M = (S, A, P, r, γ, d0): states, actions, transition probabilities, expected reward, discount factor, and start distribution.
- How is the expected reward r(s,a) defined in an MDP?r(s,a) = E[R_{t+1} | S_t = s, A_t = a], the average reward received after taking action a in state s.
- What constraint must each row of the transition function P(·|s,a) satisfy?Each row must sum to 1, since it is a probability distribution over next states.
- What does the Markov property state?Given the full history, the next state and reward depend only on the current state and action (S_t, A_t).
- How do you repair a violation of the Markov property?Add the missing information to the state representation so that the future depends only on the current state and action.
- What is the probability of a trajectory τ under policy π?P^π(τ) = d0(s0) ∏_t π(a_t|s_t) P(s_{t+1}|s_t,a_t).
- What happens when the policy π is fixed in an MDP?It leaves a Markov chain with rewards, described by (P^π, r^π).
- What are common horizon conventions in MDPs?Random termination, discounting with γ < 1, or a fixed horizon H (which permits time-dependent policies).
- What is a terminal state, and when is γ = 1 allowed?A terminal state is absorbing with zero reward; γ = 1 is used only if every policy terminates.
- How can the discount factor γ be interpreted, and what is the effective horizon?γ can be read as a continuation probability; the effective horizon is approximately 1/(1−γ).
- Is truncating an episode the same as termination?No, truncating an episode is not the same as termination.
- What is the expected reward under a policy, r^π(s)?r^π(s) = Σ_a π(a|s) r(s,a), the policy-weighted average of immediate rewards in state s.
- Define the state-value function V^π(s).V^π(s) = E_π[G_t | S_t = s], the expected return starting from state s and following policy π.
- Define the action-value function Q^π(s,a).Q^π(s,a) = E_π[G_t | S_t = s, A_t = a], the expected return after taking action a in state s and then following π.
- How does V^π relate to Q^π?V^π(s) = Σ_a π(a|s) Q^π(s,a): the state value is the policy-weighted average of action values.
- What is the objective J(π) in policy evaluation?J(π) = Σ_s d_0(s) V^π(s), the expected value over the initial state distribution d_0.
- Is a value the return of a single run?No. A value is an average (expectation) over returns across many runs, not the return of one particular run.
- State the Bellman expectation equation for V^π in matrix form.V^π = r^π + γ P^π V^π, where P^π is the policy-induced transition matrix and r^π the policy-induced reward vector.
- How do you solve exactly for V^π?Solve the linear system (I − γP^π) V^π = r^π, which has a unique solution when γ < 1.
- What is the computational cost of exact policy evaluation?O(|S|^3), due to solving the linear system over the state space.
- What is the iterative policy evaluation update?V_{k+1} = r^π + γ P^π V_k, starting from V_0 = 0.
- What does V_k represent when starting from V_0 = 0?V_k is the k-step value: the expected return truncated after k steps.
- What happens with γ = 1 and a policy that never stops?No solution exists and the iterates diverge, since the (I − γP^π) system is not invertible.
- What is the definition of the optimal state-value function V*(s)?V*(s) = sup over policies π of V^π(s), the best expected return achievable from state s.
- What is the definition of the optimal action-value function Q*(s,a)?Q*(s,a) = sup over policies π of Q^π(s,a), the best expected return achievable from state s after taking action a.
- For a finite MDP with γ < 1, what does the optimality theorem guarantee about optimal policies?Some deterministic stationary policy attains V* in every state simultaneously. V* and Q* are unique, but the optimal policy need not be unique.
- How is V*(s) related to Q*(s,a)?V*(s) = max over a of Q*(s,a).
- How does T^π V compare to TV, and when are they equal?T^π V ≤ TV for all V, with equality if and only if π is greedy with respect to V.
- Why can't the Bellman optimality equation be solved with a single linear solve?The optimality operator T is nonlinear (it involves a max over actions), so no single linear system suffices.
- How do you extract an optimal policy from Q*?Take argmax over a of Q*(s,a); no model of the environment is needed.
- What is the optimality test for a policy π?π is optimal if and only if V^π(s) = max over a of Q^π(s,a) for every state s.
- What is the value iteration update rule?\(V_{k+1} = TV_k\), where \(T\) is the Bellman optimality operator. Stop when no entry changes by more than \(\theta\), then act greedily.
- What is the cost per sweep of value iteration?\(O(|S|^2|A|)\) per sweep.
- What does it mean that the Bellman operator \(T\) is a contraction?\(\|TV - TV'\|_\infty \le \gamma\|V - V'\|_\infty\), i.e., applying \(T\) shrinks the max-norm distance between value functions by at least a factor of \(\gamma\).
- Which two facts are used to prove the contraction property of \(T\)?The inequality \(|\max f - \max g| \le \max|f-g|\) and the fact that the rows of the transition matrix \(P\) average (sum to 1).
- What does the contraction property imply about the fixed point of \(T\)?It implies \(T\) has a unique fixed point, which is the optimal value function \(V^\star\).
- What bound describes the convergence rate of value iteration?\(\|V_k - V^\star\|_\infty \le \gamma^k \|V_0 - V^\star\|_\infty\).
- What stopping certificate follows from \(\|V_{k+1} - V_k\|_\infty \le \theta\)?It implies \(\|V_{k+1} - V^\star\|_\infty \le \gamma\theta/(1-\gamma)\).
- For any value function \(V\), how far is it from \(V^\star\) in terms of the Bellman residual?\(V\) is within \(\|TV - V\|_\infty/(1-\gamma)\) of \(V^\star\).
- Why can value iteration be stopped before the values fully converge?The greedy policy extracted from the current values is often already optimal long before the values themselves converge.
- How does the discount factor \(\gamma\) affect the number of value iteration iterations?A larger \(\gamma\) (longer horizon) requires many more iterations to converge.
- What is the policy improvement step in policy iteration?Set π_{k+1}(s) = argmax_a Q^{π_k}(s,a), keeping the old action on ties.
- When does policy iteration stop, and why is that correct?It stops when the policy is unchanged; then V^{π_k} = TV^{π_k}, so the policy is optimal.
- State the policy improvement theorem.If T^{π'}V^π ≥ V^π, then V^{π'} ≥ V^π (strict where the inequality is strict).
- Why does the greedy improvement step guarantee progress in policy iteration?The greedy step satisfies T^{π'}V^π ≥ V^π, so by the policy improvement theorem each round improves (or keeps) the value.
- Define the advantage function A^π(s,a).A^π(s,a) = Q^π(s,a) − V^π(s).
- How does the advantage function characterize policy improvement?Improvement switches the action wherever an advantage is positive; it stops when no action has positive advantage.
- How can the largest advantage δ_k certify the suboptimality of a policy?‖V^★ − V^{π_k}‖_∞ ≤ δ_k/(1−γ), where δ_k is the largest advantage.
- What is modified policy iteration?Policy iteration with m evaluation sweeps per improvement step; m = 1 gives value iteration and m = ∞ gives policy iteration.
- What is the loss bound when acting greedily on approximate values with ‖V − V^★‖_∞ ≤ ε?The loss is at most 2γε/(1−γ).
- What is generalized policy iteration (GPI)?Alternating, in any interleaving, evaluation toward V^π and improvement toward greedy(V); its only joint fixed point is (V^★, π^★).
- What is the importance ratio ρ in off-policy evaluation?ρ = π(A|s)/b(A|s), the ratio of the target policy's action probability to the behavior policy's action probability.
- What key property does the importance ratio satisfy under the behavior policy?E_b[ρ f(A)] = E_π[f(A)] and E_b[ρ] = 1.
- What coverage condition must the behavior policy satisfy for importance sampling?b must be positive wherever π is positive (b > 0 wherever π > 0).
- Why does the trajectory importance ratio product cancel the unknown transition model?The trajectory ratio ∏_t ρ_t uses only action probabilities, so the unknown dynamics P cancel out, giving E_b[ρ_{0:H-1} G_H] = J_H(π).
- What is the main drawback of trajectory importance sampling?It is unbiased but its variance explodes as the horizon grows.
- What is per-decision importance sampling and how does it compare to trajectory IS?It weights each reward by ρ_{0:t}, i.e., sum_t γ^t ρ_{0:t} R_{t+1}; it remains unbiased with lower variance than trajectory IS.
- What is weighted importance sampling and what is its tradeoff?IS weights are normalized by their sum; it is biased but bounded, reducing variance.
- What update does off-policy TD use?V(S_t) ← V(S_t) + α ρ_t [R_{t+1} + γ V(S_{t+1}) − V(S_t)], applying one importance ratio per backup.
- Why is weighted importance sampling described as bounded?Because normalizing by the sum of importance weights keeps estimates within the range of observed returns, avoiding the unbounded variance of plain IS.
- What is the linear function approximation form for a state value function?V_w(s) = w^⊤φ(s), where w is a weight vector and φ(s) is a feature vector for state s.
- What is the gradient of the linear value function V_w(s) with respect to w?∇_w V_w(s) = φ(s).
- What feature representation recovers the tabular value function in linear approximation?One-hot features (one feature per state) recover the table, since each state gets its own independent weight.
- What do group features do in linear function approximation?Group features share a single value across multiple states, generalizing the value estimate across those states.
- What is the mean-squared value error objective ̅VE(w)?̅VE(w) = Σ_s μ(s)(V^π(s) − V_w(s))², the squared error weighted by the state visit distribution μ.
- What does μ(s) represent in the ̅VE objective?μ(s) is the distribution of states visited (the on-policy state distribution) used to weight the squared errors.
- What is the Gradient Monte Carlo update for value function approximation?w ← w + α(G_t − V_w(S_t))∇_w V_w(S_t), using the full return G_t as the target.
- What is the Semi-gradient TD(0) update for value function approximation?w ← w + αδ_t∇_w V_w(S_t), where δ_t = R_{t+1} + γV_w(S_{t+1}) − V_w(S_t).
- Why is TD(0) with function approximation called 'semi-gradient'?Because the bootstrapped target is treated as fixed (not differentiated), so the update is not a true gradient of any objective.
- How does TD's fixed point differ from the Monte Carlo least-squares solution?TD solves the projected Bellman equation rather than minimizing ̅VE, so it can have higher ̅VE than Monte Carlo.
- Does on-policy linear semi-gradient TD converge?Yes, on-policy linear TD converges (to the projected Bellman fixed point), even though it may yield higher ̅VE than Monte Carlo.
- What is T^π in the projected Bellman equation?T^π is the Bellman backup operator for policy π, applied to the current value estimate V_w.
- What is the update rule for semi-gradient Q-learning?w ← w + α δ_t ∇_w Q_w(S_t, A_t), where the target uses the max over actions.
- What are the two steps of fitted Q iteration?First compute targets y_i = r_i + γ max_a Q_{w_k}(s'_i, a), then regress w_{k+1} = argmin_w Σ_i (Q_w(s_i, a_i) − y_i)².
- What does fitted Q iteration reduce to when using one-hot features?Value iteration in the empirical model of the data.
- What three ingredients make up the deadly triad?Function approximation, bootstrapping, and off-policy data.
- What classic example shows the deadly triad can diverge?Baird's counterexample.
- Why can the projection Π never cause divergence on its own?The projection Π never expands—it is a nonexpansive operator.
- Why can the composition ΠT diverge?ΠT can expand when the distribution used for projection is mismatched with the on-policy distribution.
- In semi-gradient Q-learning, what does the target use?The max over actions (a bootstrapped max target).
- What is the regression objective in fitted Q iteration?Minimize Σ_i (Q_w(s_i, a_i) − y_i)² over the weights w.
Velocer ist kostenlos: Spaced Repetition und deine eigenen Karten aus jedem Dokument.
PDF to flashcards · Lecture to flashcards · Practice exam · Syllabus study plan · Anki import
Weitere Decks von University of Wisconsin–Madison
- comp sci 240 midterm 1
- comp sci 240 midterm 2
- COMP SCI 240 Midterm 3
- COMP SCI 240 Final
- comp sci 300 full course review
- CS 839: Reinforcement Learning · UW-Madison
- CS 544: Intro to Big Data Systems · UW-Madison
- CS 580: Intelligent Robotics · UW-Madison
- CS 784: Foundations of Data Management · UW-Madison
- CS 880: Quantum Algorithms · UW-Madison
- CS 765: Data Visualization · UW-Madison
- CS 639: AI Coding · UW-Madison