In the stated gridworld convention, attempting to move outside the grid keeps the state unchanged and costs -1. Which target is correct for this action?
Distinguish iterative policy evaluation, policy iteration and value iteration. Explain what is fixed during evaluation, what changes during improvement and what k counts. [5 points]
下面跟着题目逐步算
先把名字对应到任务
① 迭代策略评估:固定 π,用 Bellman 期望备份反复更新 V,直到足够接近 vπ。(1 分)
② 策略迭代:评估当前策略,再贪心改进,重复这两阶段。(1 分)
③ 价值迭代:每轮直接执行 Bellman 最优备份,对动作取最大,可视作每次只做有限评估再改进的紧密结合。(1 分)
④ 评估时动作概率 π 不变;改进时用当前价值改变动作选择规则。(1 分)
⑤ k 是计算扫描轮数;同步 Vₖ₊₁ 读取完整 Vₖ,不表示智能体已经在环境走了 k 步。(1 分)
B2. Exploration and tie handling [5 points]
先把题目读懂
m 个动作中 g 个并列最高,写 ε-greedy 的概率,再解释为什么衰减 ε 还不自动等于 GLIE。
第一步该想什么?
先把总概率分成利用1−ε与探索ε,再分别分配给 g 个或 m 个动作。最后再问:这些概率安排是否确保必要状态动作会反复出现。
Give the ε-greedy probabilities for m actions with g tied greedy actions, using uniform exploration over all m actions. Explain why greedy actions also receive exploration probability and why GLIE needs more than a decaying ε. [5 points]
下面跟着题目逐步算
五个得分点
① 贪心动作公式;② 非贪心动作公式;③ 探索从全部动作均匀抽取,因此也可能抽中贪心动作;④ GLIE 要求无限探索以及极限贪心;⑤ ε→0 只直接支持后一方向,是否充分访问还取决于衰减速度、可达性与状态访问。
Explain maximization bias using noisy Q estimates. Give the Double DQN target, identify the roles of the online and target networks, and state one limitation of the method. [5 points]
Three transitions have absolute TD errors (0,1,3). Set εₚ=1, αₚ=1 and β=1. Find priorities, sampling probabilities and unnormalized importance weights. Explain why transition 1 can still be sampled. [5 points]
下面跟着题目逐步算
按三个公式依次算
① 优先级 p=|δ|+1=(1,2,4)。(1 分)② 总优先级为 7,所以 P=(1/7,2/7,4/7)。(1 分)
For an undiscounted REINFORCE update, explain the role of ∇θ log πθ(Aₜ|Sₜ). If Gₜ=3 and b(Sₜ)=5, what is the weight on this gradient, and what is the usual local effect on the selected action probability? Explain why the baseline must not depend on the sampled action in the simple unbiased-baseline argument. [5 points]
下面跟着题目逐步算
把梯度看作一个方向
① ∇logπ 指向增加该采样动作对数概率的局部方向。(1 分)② 回报减基线为 3−5=−2。(1 分)③ 梯度上升更新乘上负权重,会沿反方向移动,通常局部降低该动作概率。(1 分)
There is one nonterminal state S and one terminal state T. From S, with probability 0.5 the process returns to S and receives reward 2; with probability 0.5 it enters T and receives reward 6. γ=0.5.
(a) Find the expected immediate reward at S and write the Bellman equation. [2]
(b) Solve for v(S). [2]
(c) For S --2→ S --6→ T, compute both visit returns. [2]
(d) From V₀(S)=0, compute V₁,V₂,V₃ synchronously. [2]
γ=0.5. At A, fast gives reward 1 and terminates; support gives reward 0 and moves to B. At B, finish gives reward 3 and terminates; repeat gives reward 1 and returns to B. π(fast|A)=0.25, π(support|A)=0.75; π chooses each B action with probability 0.5.
(a) Write Bellman expectation equations. [2]
(b) Solve for vπ(A),vπ(B). [2]
(c) Find all four qπ values and a greedy policy π′. [2]
(d) Evaluate π′ and verify whether another improvement is possible. [2]
Five locations lie on a line: Tₗ — L — M — R — Tᵣ. Both end locations are terminal. At each nonterminal state, left and right are chosen with probability 0.5 and move to the adjacent location. Every move costs -1, including entry into a terminal. γ=1.
(a) From V₀=0, give V₁ for (L,M,R). [1]
(b) Compute V₂ synchronously. [2]
(c) Compute V₃ synchronously. [2]
(d) Solve for the exact random-policy values. [2]
(e) Using those exact values, list all greedy actions in each state. [2]
Observed episodes are (1) A --0→ B --2→ T; (2) A --2→ T. γ=1. For constant-step updates initialize V(A)=1,V(B)=0 and α=0.5. Treat methods independently.
(a) List all visit returns. [2]
(b) Compute first-visit sample-mean MC estimates from these episodes with fresh counts. [2]
(c) Process both episodes with online TD(0), showing all three updates. [3]
(d) Starting from the original values, perform ONLY the two-step update for the first visit to A in episode 1. [2]
(e) Why does this two-step target equal the MC return for that visit? [1]
下面跟着题目逐步算
(a) 完整回报(2 分)
第一回合 A 得 0+2=2,B 得 2;第二回合 A 得 2。因此 A 的两个回报均为 2,B 的回报为 2。
Q(S,A)=0, r=2, γ=1, α=0.5 and the transition is nonterminal. Online next-state values are (3,3,1); the actual next action is a₃. Behaviour uses ε=0.3, splitting exploitation equally among tied maxima. Target-network values are (4,1,5). For Double DQN only, break online argmax ties by choosing the lowest action index.
(a) Compute the behaviour probabilities. [2]
(b) Compute SARSA's target and update. [2]
(c) Compute Q-learning's target and update. [2]
(d) Compute DQN and Double DQN targets, applying the stated tie rule. [3]
(e) Give the target and tabular update for a terminal version of this transition. [1]
At S, exit gives reward 2 and terminates; work gives reward 1.5, then moves to S or T with probability 0.5 each. At U, stop gives reward 1.5 and terminates; join gives reward 0 and goes to S. For (a)–(c), γ=0.8 and π₀=(exit,stop).
(a) Evaluate π₀. [2]
(b) Compute all qπ₀ values and improve the policy. [3]
(c) Evaluate the improved policy and verify optimality. [3]
(d) Let γ vary in [0,1). At S, for which γ is work strictly better than exit when followed optimally? State the tie value. [2]