Robot learning engineer: Reinforcement Learning and Credit Assignment
Original robot learning interviews on return boundaries, Bellman targets, shaping, temporal credit, policy gradients, off-policy support, replay corrections, and objective assumptions. Each finite model or estimator states its governing contract.
These prompts are original practice. They are not questions from a named employer or a live hiring loop.
1.A finite rollout has rewards 4, −2, 8 in that order and then ends. Define return as r[0]+γr[1]+γ²r[2], with γ=0.5. What is the return?
Show answer and explanation
- 5
- 7
- 3
- 10
Answer: 5
Apply the stated discount to each reward:4+0.5×(−2)+0.25×8=4−1+2=5.
2.Return satisfies G[t]=r[t+1]+γG[t+1]. With r[t+1]=3, γ=0.8 and G[t+1]=5, what is G[t]?
Show answer and explanation
- 6.4
- 8
- 7
- 4
Answer: 7
The recursive definition gives 3+0.8×5=7. Discounting applies to the later return, not to the immediately received reward.
3.A two-step target is r1+γr2+γ²V(s2), with no termination in the two steps. Let r1=1, r2=3, γ=0.5, V(s2)=8. What target follows?
Show answer and explanation
- 9
- 3
- 6.5
- 4.5
Answer: 4.5
The two rewards contribute 1+1.5, and the bootstrap contributes 0.25×8=2. Their total is 4.5.
4.A transition ends at a task-defined terminal state. The target contract sets all future return after that transition to zero. Reward is 5, and a stale network outputs 999 at the terminal observation. What target respects the contract?
Show answer and explanation
- 5
- 0
- 999
- 1004
Answer: 5
The terminal continuation is zero under the supplied task definition. The stale network value must not contribute to this target.
5.A continuing task is stopped only by an external collection limit. Its final transition is not terminal. The specified target remains r+γV(next), with r=2, γ=0.9, V(next)=10. What target should be used?
Show answer and explanation
- 12
- 2
- 9
- 11
Answer: 11
External collection cutoff does not change this continuing-task target. It remains 2+0.9×10=11 under the stated bootstrap convention.
6.A nonterminal transition earns 1. Its actual next observation has estimated value 6; an automatic reset instead returns a fresh initial observation with value 100. The target uses γ=0.5 and must follow the original transition. What value is correct?
Show answer and explanation
- 4
- 6
- 51
- 101
Answer: 4
Use the original transition's next observation:1+0.5×6=4. Substituting a reset state changes the transition being learned.
7.In a finite-horizon task, the same robot pose can occur with one or ten decisions remaining, and the achievable future reward differs. A value model receives pose alone. What state information is missing for this task?
Show answer and explanation
- The remaining decision horizon
- Pose-coordinate precision alone, while remaining horizon stays unobserved
- The episode identifier alone, without representing the differing decision budgets
- A guarantee that all repeated poses have equal finite-horizon continuation value
Answer: The remaining decision horizon
The horizon affects continuation opportunities. Pose alone is not a sufficient value input when remaining time changes the task's future return.
8.A discount of 0.81 applies per one second. A discretization uses half-second steps and requires multiplicative consistency across elapsed time. What discount belongs to each half-second step?
Show answer and explanation
- 0.9
- 0.405
- 1.62
- 0.81
Answer: 0.9
Two half-second discounts must multiply to 0.81. The positive factor satisfying d²=0.81 is d=0.9.
9.Two policies terminate after one and two steps respectively, with zero reward throughout and γ=1. Adding+1 to every pre-termination step produces what change?
Show answer and explanation
- The shorter policy returns 2 and the longer 1 under the stated per-step shift
- Both returns stay equal because every constant reward shift preserves every episodic objective
- Both returns increase by exactly 1 even though the counted episode lengths differ
- The longer policy now returns 2 and the shorter 1
Answer: The longer policy now returns 2 and the shorter 1
Per-step shifts accumulate over different episode lengths. A constant reward shift need not preserve preference in this episodic setting.
10.A continuing discounted task has γ=0.5 and bounded returns. Every reward gains a constant 4, with unchanged dynamics and policy. How much does each state's value increase?
Show answer and explanation
- 2
- 4
- An amount necessarily depending on the chosen action sequence
- 8
Answer: 8
The added discounted series is 4+2+1+…=4/(1−0.5)=8. These assumptions differ from variable-length undiscounted episodes.
11.A one-state continuing process returns reward 1 every step and returns to itself. With γ=0.75, its value solves V=1+0.75V. What is V?
Show answer and explanation
- 3
- 1.75
- 4
- 0.25
Answer: 4
Rearrange to 0.25V=1, giving V=4. The repeated continuation is part of the specified return.
12.A transition gives reward 1, then reaches state U with probability 1/4 and W with probability 3/4. Their fixed values are 8 and 0. With γ=0.5, what expected Bellman target follows?
Show answer and explanation
- 1
- 4
- 5
- 2
Answer: 2
Expected next value is(1/4)×8+(3/4)×0=2. The target is 1+0.5×2=2.
13.At a next state, action values are 2 and 10. A fixed policy chooses each with probability 1/2. What pair gives the policy's expected next action value and the maximum next action value?
Show answer and explanation
- (2, 10)
- (6, 6)
- (10, 6)
- (6, 10)
Answer: (6, 10)
Policy expectation averages to(2+10)/2=6; maximization gives 10. Evaluation and optimality backups are different operators.
14.At the next state, Q(A)=2 and Q(B)=10. The recorded next action is A. With reward 0 and γ=0.9, compare a sampled-action target with a max-action target. What are they?
Show answer and explanation
- (2, 10)
- (9, 1.8)
- (9, 9)
- (1.8, 9)
Answer: (1.8, 9)
The sampled-action target uses A:0.9×2=1.8. The maximization target instead uses B:0.9×10=9.
15.A target maximizes Q only over legally available actions. Actions A, B have values 3, 7 and are available; C has value 100 but is unavailable. What next-action value should enter that maximum?
Show answer and explanation
- 3
- 7
- 110
- 100
Answer: 7
The declared maximum ranges over A and B only. An unavailable action's estimate cannot determine this constrained target.
16.Two action estimates independently equal+1 or−1 with equal probabilities. Each has mean 0. What is the expected maximum of the two estimates?
Show answer and explanation
- 0.5
- 0
- 1
- −0.5
Answer: 0.5
The four equally likely pairs have maxima 1, 1, 1, −1. Their mean is 0.5, illustrating maximization bias without requiring nonzero individual means.
17.A target selects the larger online estimate, then evaluates that selected action with a separate target table. Online Q(A)=5, Q(B)=4; target Q(A)=1, Q(B)=9. With r=1, γ=0.5, what target follows?
Show answer and explanation
- 5
- 1.5
- 5.5
- 3.5
Answer: 1.5
Online selection chooses A. Its target-table value is 1, so the result is 1+0.5×1=1.5; do not reselect B using the evaluation table.
18.A one-step target is r+γV(next), and γ=0. What objective information can this target use about that transition?
Show answer and explanation
- All future rewards with no discount regardless of their timing
- The final task reward independent of how many discounted steps precede it
- Its immediate reward only
- Only next-state value, suppressing the immediate reward instead
Answer: Its immediate reward only
With γ=0, the continuation term vanishes. This is a particular immediate-reward objective, not a guarantee that delayed task outcomes are irrelevant in other objectives.
19.A fixed-policy Bellman operator has discount 0.8 and common bounded rewards/dynamics. Two input value functions differ by at most 5 everywhere. What sup-norm difference bound is guaranteed for their backed-up values?
Show answer and explanation
- At most 1
- Exactly 0 for every pair
- At most 4
- Exactly 5 at every state
Answer: At most 4
Averaging cannot increase the uniform difference, and discounting multiplies it by 0.8. Thus the output difference is bounded by 0.8×5=4, not necessarily equal to 4.
20.A nonterminal one-step target is r+γV(next). Every next-state estimate is too high by exactly 2, and γ=0.8. With reward unchanged, what bias does this introduce into the target?
Show answer and explanation
- +2.8
- +1.6
- −1.6
- +2
Answer: +1.6
Only the discounted continuation changes:0.8×2=1.6. This calculation concerns target bias under the supplied uniform value error.
21.At θ=0, compare gradients of L=0.5(θ−y)² with y=2+0.5θ. First treat y as frozen at its current value; then differentiate through y. What ordered pair of gradients results?
Show answer and explanation
- (−1, −2)
- (−2, −1)
- (−2, −2)
- (2, 1)
Answer: (−2, −1)
Frozen-target differentiation gives θ−y=−2. Full differentiation multiplies that residual by 1−0.5, giving−1. The two update definitions are not interchangeable.
22.A scalar table entry is updated as Q_new=Q_old+α(target−Q_old). Let Q_old=2, target=6, α=0.25. What is Q_new?
Show answer and explanation
- 4
- 1
- 3
- 6
Answer: 3
The residual is 6−2=4; adding 0.25×4=1 to the old 2 gives 3.
23.For a fixed scalar target y, updates use
q_new=q+3(y−q). If error is e=q−y, what happens to the error after one update?Show answer and explanation
- It becomes −2e
- It becomes zero for every e
- It becomes 2e without changing sign
- It becomes e/3
Answer: It becomes −2e
Subtract y from the update: e_new=(1−3)e=−2e. Nonzero errors alternate sign and double in magnitude in this fixed-target model.
24.Using a task’s known discount, only a rollout’s reward prefix is recorded; its continuation is unobserved. No later rewards or continuation-value assumption are available. What can be computed exactly from that prefix alone?
Show answer and explanation
- Exact equality between the observed prefix and the unobserved full episode return
- The observed prefix contribution, not the full eventual return
- The full return by assigning every missing reward its largest possible value
- The full return by treating unobserved future rewards as measured zeros
Answer: The observed prefix contribution, not the full eventual return
Unobserved continuation is missing information. A bootstrap may define an estimate under added assumptions, but does not turn the prefix into a known full return.
25.A discounted return is cut after rewards at indices 0, 1, 2. Every later reward has absolute value≤2 and γ=0.5. What upper bound applies to the absolute omitted tail?
Show answer and explanation
- 2
- 0.5
- 1
- 0.25
Answer: 0.5
The tail starts with factorγ³. Its absolute sum is at most 2×0.5³/(1−0.5)=0.5 by the geometric-series bound.
26.A two-transition rollout uses shaping F(s, s')=γΦ(s')−Φ(s), with γ=0.5. Potentials are 2 at start, 10 at the middle state and 0 at the end. What is F(first)+γF(second)?
Show answer and explanation
- 3
- 8
- −2
- −7
Answer: −2
The shaping terms are 3 and−10. Their discounted sum is 3+0.5×(−10)=−2, equal to the negative initial potential because the final potential is zero.
27.Two one-step terminal choices have original return 0 and start potential 0. With γ=0.5, their terminal potentials are 0 and 6. The recorded return stops immediately after adding γΦ(next)−Φ(start). What shaped returns result?
Show answer and explanation
- (3, 0)
- (0, 6)
- (0, 3)
- (0, 0)
Answer: (0, 3)
The finite recorded returns retain the terminal boundary term. They become 0 and 0.5×6=3, so this convention does not preserve the original tie.
28.A continuing discounted shaping argument needs γ^TΦ(s[T])→0 as T grows. Which supplied condition is sufficient?
Show answer and explanation
- Potential growing exactly asγ^(−T), leaving the product nonvanishing
- 0≤γ<1 and a uniform finite bound on absolute potential
- γ=1 and arbitrary unbounded potential along the trajectory
- Only finite initial potential, with no bound on later potential values
Answer: 0≤γ<1 and a uniform finite bound on absolute potential
A bounded potential multiplied by a geometric factor tending to zero has a vanishing boundary term. The other conditions do not supply that guarantee.
29.A two-step cycle has potentials 0→2→0. A mistaken shaping rule uses Φ(next)−Φ(current), while returns use γ=0.5. What discounted shaping contribution does this cycle add?
Show answer and explanation
- 1
- 0
- 2
- −1
Answer: 1
The unscaled differences are+2 and−2. Discounting gives 2+0.5×(−2)=1; mismatching the shaping and return discount prevents the intended cancellation.
30.A shaping rollout switches potential definitions midway, but its report assumes one fixed potential telescopes across all transitions. What must the analysis account for?
Show answer and explanation
- Only the initial potential, ignoring changed intermediate definitions
- Every potential-version change preserving cancellation without checking intermediate values
- All potential versions being identical merely because they use the same field name
- Possible uncancelled boundary terms from the version change
Answer: Possible uncancelled boundary terms from the version change
Cancellation relies on matching intermediate terms from the same potential definition. A changed definition can add boundary differences that must be retained, even if they happen to be zero on a particular path.
31.Action A gives 2 then terminates. Action B gives−1, followed one step later by 8 and termination. With γ=0.5, which action maximizes the stated return from the first decision?
Show answer and explanation
- Both, with return 2
- B, whose return is 7 without discounting
- A, because 2 exceeds−1
- B, whose return is 3
Answer: B, whose return is 3
A returns 2. B returns−1+0.5×8=3, so immediate-reward greed misses the better discounted sequence.
32.A differentiable finite-action policy assigns positive probabilities. Given the current history, a previously received reward cannot depend on the new action being sampled. Why does its score-function contribution have zero conditional expectation?
Show answer and explanation
- Dropping arbitrary future rewards always preserving every policy objective
- Every already received reward being physically zero by definition
- The current sampled action causally determining all past rewards
- The expected policy score is zero over the current action distribution
Answer: The expected policy score is zero over the current action distribution
An action-independent past quantity multiplies a zero-mean policy score. This uses the causal conditioning premise, not a claim that arbitrary future rewards can be dropped.
33.A scalar eligibility trace follows
e_new=γλe_old+1 for an active feature. Let γ=0.9, λ=0.5,e_old=2. What ise_new?Show answer and explanation
- 0.9
- 3
- 2.4
- 1.9
Answer: 1.9
The decayed prior trace is 0.9×0.5×2=0.9. Adding the active feature's1 gives 1.9.
34.Independent episodes reset the task. An eligibility trace from episode A is carried into episode B, so B's error updates A-only features. What credit boundary is violated?
Show answer and explanation
- A physical reset automatically erasing the software trace without any corresponding reset
- Credit is crossing the declared episode reset
- The two reset-separated episodes necessarily being one uninterrupted task
- Eligibility traces being unable to contain any earlier active feature
Answer: Credit is crossing the declared episode reset
Under independent episode semantics, old eligibility must not attribute a new episode's error to an unrelated prior history.
35.A finite target mixture is defined as(1−λ)G1+λG2. Here G1=2, G2=10, λ=0.25. What target does that definition produce?
Show answer and explanation
- 3
- 8
- 4
- 12
Answer: 4
The weights are 0.75 and 0.25. The mixture is 0.75×2+0.25×10=1.5+2.5=4.
36.A finite generalized-advantage estimator is δ0+(γλ)δ1+(γλ)²δ2. With λ=0, what information remains in this estimator?
Show answer and explanation
- The complete Monte Carlo return regardless of the residuals
- Only δ2
- Only δ0
- The sum of all three residuals
Answer: Only δ0
Setting λ=0 removes every later-residual term. This is the estimator's stated algebraic limit, not a guarantee of an accurate critic.
37.An advantage estimate is δ0+cδ1+c²δ2, with c=0.5 and residuals 1, 2, −1. What value results?
Show answer and explanation
- 2
- 2.5
- 0.75
- 1.75
Answer: 1.75
The weighted sum is 1+0.5×2+0.25×(−1)=1.75. The negative residual remains negative after weighting.
38.In a finite Markov task, a bootstrap uses the exact fixed-policy continuation value; a full rollout samples continuation from that same policy. What explains a possible target-variance reduction here?
Show answer and explanation
- An exact conditional mean requiring the particular future random outcomes to be recorded
- Replacing sampled continuation noise with its known conditional mean
- Every full rollout return being deterministic whenever the policy is fixed
- Every arbitrary bootstrap critic removing bias as well as continuation variance
Answer: Replacing sampled continuation noise with its known conditional mean
In this supplied case the bootstrap is the correct conditional expectation. An approximate critic can change the bias tradeoff, so this is not a universal variance-and-accuracy guarantee.
39.In a one-step task, πθ(A)=θ, πθ(B)=1−θ, with deterministic rewards 4 and 0. At θ=1/4, the reward-weighted score sample for A is 16. What is the expected score estimator over both actions?
Show answer and explanation
- 16
- 8
- 0
- 4
Answer: 4
A occurs with probability 1/4 and contributes 4×(1/θ)=16. B's reward-weighted contribution is 0, so expectation is(1/4)×16=4, matching d(4θ)/dθ.
40.At a fixed state, a differentiable normalized finite-action policy assigns positive probabilities. A baseline b is independent of the sampled action and is treated as fixed in the score estimator. What is E[b∇logπ(A)]?
Show answer and explanation
- The largest action value
- 0
- Always a strictly positive variance
- b
Answer: 0
Summing over actions gives bΣ∇π(a)=b∇1=0. This is an expectation identity under the stated baseline and differentiation conditions.
41.Let πθ(A)=θ, πθ(B)=1−θ and rewards be 4, 0. An action-dependent baseline sets b(A)=4, b(B)=0, making every sampled advantage zero. What happens to the score estimate for this task?
Show answer and explanation
- The modified estimate remaining unbiased for derivative 4 despite always being zero
- It becomes zero despite the true objective derivative being 4
- Both actions being proved to have equal true rewards because their modified advantages match
- A positive update necessarily remaining because no baseline can cancel any learning signal
Answer: It becomes zero despite the true objective derivative being 4
The baseline exactly cancels each reward, so the estimator is zero. Action dependence invalidates the usual zero-mean-baseline cancellation in this example.
42.At state S, both available actions return to S with probability 1. State T is unreachable from S. A policy has maximum action entropy at S. What does that fail to establish?
Show answer and explanation
- The positive probabilities of the randomized actions at S
- Any visitation of T from this start
- The fact that both available actions can be sampled at S
- The specified equality of their next state S
Answer: Any visitation of T from this start
Local action entropy does not overcome the supplied reachability graph. Exploration coverage depends on transitions as well as action randomness.
43.A scalar policy parameter θ lies in[0, 1]. Pure task objective is J=2θ; an added regularization term is−3θ. Maximizing the combined objective chooses what, compared with maximizing J alone?
Show answer and explanation
- θ=0 instead of θ=1
- θ=1/2 for both objectives
- θ=1 for both objectives
- Every θ is equally optimal for both
Answer: θ=0 instead of θ=1
The combined objective is−θ, maximized at 0. The original 2θ is maximized at 1. Regularization changes the objective rather than merely rescaling its gradient.
44.For πθ(A)=θ, πθ(B)=1−θ at θ=1/2, rewards are 1, 0. With fixed baseline b=1/2, reward-minus-baseline score samples are 1 for both actions. What estimator variance follows?
Show answer and explanation
- 1/2
- 0
- 1/4
- 1
Answer: 0
Both possible estimator values equal 1, so there is no sampling variance in this specific example. This does not imply one baseline eliminates variance in every task.
45.The only θ-dependent reward occurs at decision time 1 and has expectationθ. An initial-state objective discounts that reward by γ=0.5, with no other rewards. What is its derivative with respect to θ?
Show answer and explanation
- 2
- 0
- 0.5
- 1
Answer: 0.5
The declared objective is J(θ)=0.5θ. Its derivative is 0.5; omitting the time discount would optimize a different weighting.
46.An unmasked action distribution is P(A)=0.2, P(B)=0.3, P(C)=0.5. Only A and B are legal, and masking renormalizes their probabilities. What distribution results?
Show answer and explanation
- (0.4, 0.6, 0)
- (0.5, 0.5, 0)
- (0.2, 0.3, 0)
- (0.2, 0.3, 0.5)
Answer: (0.4, 0.6, 0)
Legal probability mass is 0.5. Dividing 0.2 and 0.3 by 0.5 gives 0.4 and 0.6, with zero on C.
47.A one-step deterministic actor uses action a=2θ, and its exact objective is Q(a)=a³. At θ=1, what is dQ(2θ)/dθ?
Show answer and explanation
- 12
- 8
- 24
- 4
Answer: 24
The action is 2. The chain rule gives 3a²×2=3×4×2=24. Q's value 8 is not its actor gradient.
48.A sampled action is A if a fixed uniform draw U<θ, otherwise B. Rewards are 1 for A and 0 for B. For almost every fixed U, the sample reward's ordinary derivative is 0, but expected reward isθ. What does this illustrate?
Show answer and explanation
- A naive derivative through the discrete sample misses the expectation derivative
- The action distribution being independent ofθ despite its threshold probability
- Every possible estimator for a discrete policy necessarily vanishing
- The true derivative of expected reward being zero because fixed samples are locally constant
Answer: A naive derivative through the discrete sample misses the expectation derivative
The thresholded sample is locally constant almost everywhere, while its outcome probabilities change with θ. An appropriate score or other justified estimator is needed for the expectation gradient.
49.A batch contains one sampled return G. An estimator subtracts that same sample as its baseline, giving ∇logπ(A)(G−G). What issue can this create when the true gradient is nonzero?
Show answer and explanation
- An unbiased zero-variance estimate of any nonzero task gradient
- The sampled reward necessarily being zero before subtraction
- Every baseline being invalid, including fixed action-independent baselines
- The data-dependent subtraction makes this estimator identically zero
Answer: The data-dependent subtraction makes this estimator identically zero
This baseline depends on the sampled outcome and cancels all signal. A constant within a realized batch need not be action-independent in the expectation argument.
50.A stored action was drawn with probability 0.2 under its behavior policy; the current policy assigns it 0.6. A ratio estimator needs current/behavior probability but recomputes both sides using the current policy. What ratio should it have used?
Show answer and explanation
- 1 instead of 3
- 0.12 instead of 1
- 3 instead of the erroneous 1
- 1/3 instead of 1
Answer: 3 instead of the erroneous 1
The denominator belongs to the policy that generated the sample. The required ratio is 0.6/0.2=3; substituting 0.6 in both places erases the policy difference.
51.At an encountered state, the target policy assigns positive probability to action C, but the behavior policy assigns C probability 0. What obstacle affects ordinary action-likelihood importance weighting there?
Show answer and explanation
- The target value of C necessarily being zero because behavior never takes it
- The required target action has no behavior support
- Sampling other action names establishing support for C too
- A finite weight on another action creating the absent C outcomes
Answer: The required target action has no behavior support
A likelihood ratio cannot recover outcomes on an event with zero behavior probability and positive target probability. Additional assumptions or data are required.
52.A two-action trajectory has target/behavior action-probability ratios 2 and 0.5. Dynamics and initial-state distribution match. What is its trajectory likelihood ratio?
Show answer and explanation
- 1
- 2.5
- 0.25
- 4
Answer: 1
The per-decision ratios multiply along the trajectory:2×0.5=1. Adding ratios does not give a trajectory likelihood ratio.
53.An off-policy calculation cancels transition probabilities using a same-environment assumption. The logged data actually use dynamics P0, while the target task uses different dynamics P1. What remains unaccounted for by action ratios alone?
Show answer and explanation
- Equal action names forcing identical environmental transition likelihoods
- Transition terms cancelling under any two different dynamics models
- The change in transition likelihoods
- Only missing action probabilities, despite their already being included
Answer: The change in transition likelihoods
Action-likelihood correction does not automatically correct a different environment. The cancellation premise must hold or the changed dynamics need a justified treatment.
54.Two returns are 6 and 2, with importance weights 2 and 0.5. Define ordinary estimate as
mean(wG), and normalized estimate assum(wG)/sum(w). What pair results?Show answer and explanation
- (6.5, 5.2)
- (4, 4)
- (13, 2.5)
- (5.2, 6.5)
Answer: (6.5, 5.2)
Weighted sum is 12+1=13. Divide by sample count 2 for 6.5, or by weight sum 2.5 for 5.2; these are distinct finite-sample estimators.
55.A normalized weighted estimate is
sum(wG)/sum(w). Every retained sample has weight 0, and no fallback convention is specified. What does the formula provide?Show answer and explanation
- All unobserved target-policy returns being proved zero
- The target-policy return being exactly zero
- An undefined 0/0 ratio, not a determined return estimate
- The unweighted mean following automatically from 0/0
Answer: An undefined 0/0 ratio, not a determined return estimate
Zero total weight leaves no denominator. A declared fallback may define behavior, but it is additional to this formula.
56.A behavior policy chooses A or B equally; rewards are 1 and 0. The target chooses A with probability 0.9. With just one sample, self-normalized weighting returns that sample's reward because both action weights are positive. What is this estimator's expectation?
Show answer and explanation
- 1 exactly
- 0.5, despite target value 0.9
- 0.1 exactly
- 0.9 exactly
Answer: 0.5, despite target value 0.9
With one positive-weight sample, its weight cancels. The behavior-sampled reward has mean 0.5, illustrating finite-sample bias of this normalized estimator.
57.A likelihood weight equals 16 with probability 1/16 and 0 otherwise. What are its mean and variance?
Show answer and explanation
- (1, 16)
- (16, 0)
- (0, 15)
- (1, 15)
Answer: (1, 15)
The mean is 16/16=1. The second moment is 256/16=16, so variance is 16−1²=15; unit mean does not imply low variance.
58.A per-decision return estimator uses ρ0r0+ρ0ρ1r1, with γ=1. Let ratiosρ0=2, ρ1=3 and rewards r0=1, r1=4. What value does this estimator produce?
Show answer and explanation
- 30
- 10
- 26
- 14
Answer: 26
The first reward receives only its prefix ratio:2×1. The second gets 2×3×4=24. Total 26 differs from weighting both rewards by the full product.
59.A behavior-likelihood model is fitted approximately and used in a denominator. No bound or correctness result is available for its errors. What guarantee cannot be inherited merely from exact importance-sampling identities?
Show answer and explanation
- An approximate denominator having been computed
- Exact unbiasedness under the true behavior distribution
- Denominator error being a valid subject of further analysis
- The exact identity applying when the required true likelihoods are supplied
Answer: Exact unbiasedness under the true behavior distribution
The mathematical identity assumes the relevant likelihoods. Estimated denominators need their own error and support analysis rather than automatic inheritance of exact guarantees.
60.At points with positive behavior density, a continuous action is reparameterized by u=2a. Both densities are transformed correctly, each gaining factor 1/2 at corresponding points. What happens to their target/behavior density ratio?
Show answer and explanation
- It is halved
- It necessarily becomes 1
- It is doubled
- It is unchanged
Answer: It is unchanged
The common Jacobian factor cancels in the ratio. Density values depend on coordinates, while the consistently transformed ratio at corresponding actions is unchanged.
61.A marginal behavior policy mixes two controllers equally. Their probabilities of action A at the same state are 0.9 and 0.1. An estimator explicitly uses the marginal mixture probability, and target P(A)=0.75. What ratio applies to A?
Show answer and explanation
- 1.5
- 1
- 0.75/0.9
- 7.5
Answer: 1.5
The marginal behavior probability is 0.5×0.9+0.5×0.1=0.5. The declared marginal ratio is 0.75/0.5=1.5.
62.Behavior P(A)=0.25; target P(A)=1. For f(A)=1 and f(other)=0, the exact importance weight on A is 4. An estimator clips it to 2. What expectation does the clipped weighted sample have?
Show answer and explanation
- 0.5 instead of target expectation 1
- 1 exactly
- 2 exactly
- 0.25 instead of 1
Answer: 0.5 instead of target expectation 1
Only A contributes, with behavior probability 0.25 and clipped value 2. Expected contribution is 0.25×2=0.5, showing the correction was changed by clipping.
63.Behavior P(A given S1)=0.9 and P(A given S2)=0.1. Target P(A given S)=0.5 at both states. An estimator needs conditional action ratios. What ratios belong to A at S1 and S2?
Show answer and explanation
- (1.8, 0.2)
- (5/9, 5)
- (1, 1)
- (0.5, 0.5)
Answer: (5/9, 5)
Use the state-conditional denominator:0.5/0.9=5/9 and 0.5/0.1=5. A pooled action frequency does not replace these conditional probabilities.
64.A demonstrator observes hidden load H and chooses commands using H. Logged observation O omits H, which also affects outcomes. A learner uses only pooled P(command given O) to claim a causal effect of commanding differently. What assumption needs review?
Show answer and explanation
- Hidden load being unable to affect behavior whenever it affects outcomes
- A larger file automatically recovering all omitted conditioning variables
- Whether logged conditioning information removes the action-outcome confounding
- Matching command names proving equal outcomes despite hidden load
Answer: Whether logged conditioning information removes the action-outcome confounding
Observational action frequencies can reflect private information that also drives outcomes. The stated causal claim needs adequate conditioning or another justified identification argument.
65.Two finite environment models agree on every logged state-action outcome. They differ only on an untried action, whose reward is 0 in one model and 100 in the other. What can the logged outcomes alone identify?
Show answer and explanation
- The untried action having reward 100 with certainty
- They cannot determine that untried action's reward between the two models
- Identical observed outcomes forcing identical optimal policies in both models
- The untried action having reward 0 with certainty
Answer: They cannot determine that untried action's reward between the two models
Agreement on observed support leaves this counterfactual unresolved. Choosing between these models requires additional data or assumptions.
66.An observed transition has reward 1 and discount 0.5. A max backup uses next-action estimates 0 and 100, but the 100-valued action has never been sampled. What does the resulting target 51 establish?
Show answer and explanation
- The unseen action truly returning 100 because the network assigns it that estimate
- Its arithmetic, not correctness of the unsupported 100 estimate
- Repeated updates to this same row independently validating the unseen action’s value
- The current policy’s true value being 51 by virtue of that one arithmetic backup
Answer: Its arithmetic, not correctness of the unsupported 100 estimate
The backup can propagate an unsupported estimate through an otherwise observed transition. Repeated fitting to that target does not independently validate its source.
67.A replay objective is mean of two item gradients, (g1+g2)/2. Items are drawn with probabilities 3/4 and 1/4. Which per-draw weights make the expected weighted gradient equal that mean?
Show answer and explanation
- (3/4, 1/4)
- (1, 1)
- (4/3, 4)
- (2/3, 2)
Answer: (2/3, 2)
Each expected coefficient must be 1/2. Thus(3/4)w1=1/2 and(1/4)w2=1/2, giving 2/3 and 2.
68.Two fixed item gradients are+1 and−2. Uniform averaging gives−0.5. Sampling them with probabilities 0.9 and 0.1 without correction gives what expected gradient?
Show answer and explanation
- +0.7
- +1.8
- −1.9
- −0.5
Answer: +0.7
The uncorrected expectation is 0.9×1+0.1×(−2)=0.7. Nonuniform replay can change even the expected direction under this supplied gradient population.
69.A replay batch is {A, B} with probability 1/2 or {A, C} with probability 1/2. The reference objective is(gA+gB+gC)/3. Which estimator for a sampled {A, B} batch is consistent with inverse-inclusion correction?
Show answer and explanation
- gA+gB
- 2gA/3+gB/3
- gA/3+2gB/3
- gA/2+gB/2
Answer: gA/3+2gB/3
A is always included; B and C each have inclusion probability 1/2. The analogous corrected batch estimators average to the reference three-item mean.
70.A trainer collects one new transition, then performs 10 updates using batches of 32 replayed transitions. What are the new environment-transition count and replay sample uses for that cycle?
Show answer and explanation
- (1, 320)
- (10, 32)
- (321, 0)
- (320, 1)
Answer: (1, 320)
Only one new interaction was collected. The optimizer consumes 10×32=320 sample uses, which can repeatedly refer to older interactions.
71.A multi-step rollout follows behavior actions that differ from the fixed target policy. A report treats the raw observed return as an unbiased target-policy sample without correction or an equality assumption. What gap remains?
Show answer and explanation
- The recorded rollout having no rewards by definition
- No off-policy data ever being usable by any learning method
- Target and behavior continuation choices necessarily being equal despite the stated difference
- The return's generating policy differs from the claimed evaluation policy
Answer: The return's generating policy differs from the claimed evaluation policy
The raw return belongs to the policy that generated its continuation. A target-policy interpretation needs applicable correction, matching behavior, or another justified argument.
72.The only requested commands are−2, −1, +1, clipped to [−1, 1]. Behavior probabilities for−2, −1 are 0.2, 0.3; target probabilities are 0.1, 0.6. An estimator compares distributions of applied actions. What ratio applies to applied−1?
Show answer and explanation
- 0.1/0.2
- 2
- 1.4
- 0.5
Answer: 1.4
Sum request probabilities mapping to the same applied action. Target mass is 0.7 and behavior mass 0.5, so the pushforward ratio is 0.7/0.5=1.4.
73.Replay stores only an old scalar reward, but a new task's reward depends on a contact event never retained in the log. What is needed to recompute the new reward exactly?
Show answer and explanation
- Every new task reward being uniquely recoverable from any one old reward summary
- The required contact evidence or additional justified information
- Multiplying the old scalar by an arbitrary constant without the missing event evidence
- Renaming the old reward field while retaining no contact information
Answer: The required contact evidence or additional justified information
A reward summary can discard facts needed by a different objective. Relabeling requires sufficient transition evidence, not just a new reward function name.
74.A replay transition is relabeled to a new goal. The new goal changes whether its next state is terminal, but the old terminal mask is retained. What target inconsistency can result?
Show answer and explanation
- Old and new goal objectives being identical because they share a physical transition
- All relabeled transitions being terminal regardless of the new goal
- Bootstrapping or stopping according to the wrong goal's terminal rule
- Changing the goal never affecting any learning target
Answer: Bootstrapping or stopping according to the wrong goal's terminal rule
Reward and termination semantics must agree with the relabeled task. An old mask can suppress valid continuation or add continuation after new-goal completion.
75.A robot's next motion depends on both the latest requested command and an older command waiting in an actuator-delay queue. A value model's state omits that queue. What Markov-state issue arises?
Show answer and explanation
- Requested commands having no effect on any motion
- Pose alone determining every delayed-control continuation law
- Every repeated visible pose implying identical queued-control contents
- The same visible state/action can have different next-state laws across hidden queue states
Answer: The same visible state/action can have different next-state laws across hidden queue states
The omitted queued control changes continuation dynamics. Include sufficient relevant history/state or explicitly model the partial observability.
76.A policy-improvement argument uses exact Q values for the current policy at every relevant state and a greedy choice over valid actions. A neural critic is only approximately fitted on a subset. What needs justification before transferring that argument?
Show answer and explanation
- The approximation and coverage gaps relative to the exact-Q assumptions
- Lower sampled training loss supplying exact Q on all relevant states and actions
- Parameter count alone implying the exact-value and coverage assumptions
- Every greedy neural policy update necessarily improving true return
Answer: The approximation and coverage gaps relative to the exact-Q assumptions
An exact-model argument does not automatically cover approximate values on missing states or actions. State and analyze the additional conditions rather than importing the guarantee unchanged.
77.A fixed-policy two-state model has V(S)=1+0.5V(T) and V(T)=2+0.5V(S). What solution satisfies both equations?
Show answer and explanation
- (8/3, 10/3)
- (10/3, 8/3)
- (3, 4)
- (2, 3)
Answer: (8/3, 10/3)
Substitute the second equation into the first:V(S)=2+0.25V(S), giving 8/3. Then V(T)=2+4/3=10/3.
78.An undiscounted process never terminates and receives reward 1 at every step. Return is the infinite sum of those rewards. What assumption about a finite scalar value fails?
Show answer and explanation
- The return is necessarily 0 because γ=1
- An infinite number of positive rewards cancels to a finite total
- The return diverges instead of having a finite value
- The value is exactly 1 because every reward is 1
Answer: The return diverges instead of having a finite value
The partial sums grow without bound. A finite-value equation cannot represent this specified return without changing the task or objective.
79.An undiscounted process earns 1 for each visited step, then independently terminates with probability 1/2 or repeats with probability 1/2. What expected return solves V=1+0.5V?
Show answer and explanation
- 2
- 0.5
- An infinite value in every undiscounted task
- 1
Answer: 2
Here termination makes expected episode length finite. The equation gives 0.5V=1, so V=2 despite the absence of reward discounting.
80.A nonterminal target takes max Q over available actions, but its availability mask is empty. The task defines no empty-action convention. What must be resolved?
Show answer and explanation
- An empty feasible mask proving the recorded immediate reward was zero
- Selecting an unavailable action while claiming the legal-action contract is unchanged
- The task/target semantics for that empty feasible set
- A maximum over an empty set automatically being the finite value 0
Answer: The task/target semantics for that empty feasible set
The maximum over an empty set does not supply an ordinary finite action value under this formula. Define a valid terminal or failure convention rather than silently inventing one.
81.At S, action A loops with reward 0; B terminates with reward 1. A fixed policy always selects A, so Vπ(S)=0 and its policy-evaluation Bellman residual is 0. What does this fail to prove?
Show answer and explanation
- The fact that the supplied policy selects A
- Its zero policy-evaluation Bellman residual
- Correctness of the supplied policy’s own value 0
- Optimality, since choosing B has higher return
Answer: Optimality, since choosing B has higher return
A correct value for a particular policy need not be the optimal value. Evaluation consistency and policy optimality are different claims.
82.Two states have different true fixed-policy values, 0 and 5. A critic architecture forces one shared scalar output for both. Can it represent both values exactly at once?
Show answer and explanation
- No; the representation ties outputs that must differ
- No value representation ever being able to distinguish two states
- More optimization steps removing the architecture’s tied-output constraint
- A shared scalar equaling both 0 and 5 simultaneously
Answer: No; the representation ties outputs that must differ
This is a representational constraint, not a universal failure of value learning. Separate inputs/features or another representation would be needed to express both distinct values exactly.
83.A scalar predictionθ has two equiprobable sampled targets 1+0.5θ and 1. Compare minimizing the full-gradient mean squared sampled residual with solving θ=E[target]. What pair of solutions results?
Show answer and explanation
- (2, 2)
- (6/5, 4/3)
- (4/3, 6/5)
- (1, 1)
Answer: (6/5, 4/3)
The squared-residual objective is proportional to(0.5θ−1)²+(θ−1)², minimized at 6/5. The mean fixed-point equation isθ=1+0.25θ, giving 4/3. These objectives differ.
84.A target parameter update is
target_new=(1−τ)target_old+τonline, with τ=0.1,target_old=10, online=2. What istarget_new?Show answer and explanation
- 2.8
- 12
- 8
- 9.2
Answer: 9.2
The stated averaging rule gives 0.9×10+0.1×2=9.2. Reversing which parameter receives weightτ would define a different update.
85.A critic's target network changes between two reported loss values. The second loss is lower, but the prediction function is unchanged. What can that decrease establish by itself?
Show answer and explanation
- A guaranteed improvement in actual task return without any predictor change
- The prediction function necessarily having changed despite the premise
- Only improvement relative to the changed targets, not an improved predictor
- Exact equality of the unchanged predictor with true environmental values
Answer: Only improvement relative to the changed targets, not an improved predictor
A moving target can change measured residuals without changing predictions. Preserve target identity when interpreting training-loss trends.
86.A model predicts next scalar state−1 or+1 with equal probabilities. V(x)=x², reward 0 and γ=0.5. What are the correct expected-value target and the target using only the mean predicted state?
Show answer and explanation
- (0.5, 0)
- (1, 0)
- (0.5, 0.5)
- (0, 0.5)
Answer: (0.5, 0)
E[V(next)]=1, while V(E[next])=V(0)=0. A nonlinear value function cannot generally be applied after collapsing the transition distribution to its mean.
87.Two equiprobable outcomes
have(reward, next value)=(0, 4)and(4, 0). With γ=0.5, what expected target follows, despite reward and next value being dependent?Show answer and explanation
- 3
- 0
- 2
- 4
Answer: 3
Targets are 2 and 4, averaging 3. Equivalently E[r]+γE[V]=2+0.5×2=3; linearity of expectation does not require independence between these terms.
88.Replay draws states S, T with probabilities 0.9, 0.1; the target objective weights them 0.1, 0.9. Action distributions match within each state, so every action-only likelihood ratio is 1. What mismatch remains?
Show answer and explanation
- The state-distribution weighting
- An action-distribution difference within each state, contrary to the premise
- Replay containing no S or T data despite their positive sampling probabilities
- Ratio 1 guaranteeing that all possible state weightings define the same objective
Answer: The state-distribution weighting
Conditional action correction does not by itself change which states receive weight. Analyze the occupancy/reference distribution required by the objective.
89.A finite episode uses γ=1, terminates, and every terminal potential is 0. Shaping isΦ(next)−Φ(current). What is the total shaping sum from a fixed start?
Show answer and explanation
- The sum of every intermediate potential
- −Φ(start)
- Always 0 regardless of the initial potential
- An undefined quantity merely because γ=1
Answer: −Φ(start)
For the stated finite episode, the sum telescopes to Φ(terminal)−Φ(start)=−Φ(start). Discount below 1 is not necessary for this finite zero-terminal-boundary calculation.
90.Policy A returns total 6 over 3 steps; B returns total 5 over 1 step. A curator replaces total return with return per step. How does the preferred policy change for these deterministic episodes?
Show answer and explanation
- Both criteria prefer B
- Total return prefers A; return per step prefers B
- Both criteria prefer A
- The criteria must tie because both episodes terminate
Answer: Total return prefers A; return per step prefers B
Totals 6>5 favor A. Rates are 6/3=2 and 5/1=5, favoring B. Length normalization changes the objective.
91.Policy A receives reward 10 with probability 1/2 and 0 otherwise. Policy B always receives 4. If success means a nonzero terminal reward, which pair correctly compares expected reward and success probability?
Show answer and explanation
- Expected reward and success probability necessarily tie
- Both criteria favor B
- Expected reward favors A; success probability favors B
- Both criteria favor A
Answer: Expected reward favors A; success probability favors B
A has expected reward 5 and success probability 0.5. B has expected reward 4 and success probability 1. The two criteria need not rank policies alike.
92.Policy A returns 0 on 90 percent of trials and 10 on 10 percent. B always returns 0.9. Compare mean return with the average of the worst 10 percent of outcomes. Which preference pair follows?
Show answer and explanation
- Mean prefers A; worst-tail average prefers B
- The two criteria are equal for both policies
- Both prefer B
- Both prefer A
Answer: Mean prefers A; worst-tail average prefers B
A's mean is 1, above B's0.9, but A's worst-tail average is 0 versus B's0.9. The specified risk-sensitive criterion changes the ranking.
93.A one-step stochastic policy picks the rewarded action with probability p. Its objective is J(p)=2p−p ln(p)−(1−p)ln(1−p), for 0<p<1. What p maximizes this entropy-regularized objective?
Show answer and explanation
- 2/3
- 1/2
- e²/(1+e²)
- 1
Answer: e²/(1+e²)
The derivative is 2+ln((1−p)/p). Setting it to zero gives p/(1−p)=e². Strictly negative second derivative makes this the unique interior maximum.
94.A clipped actor objective is L=min(rA,
clip(r, 0.8, 1.2)A). For ratio r=1.5 and advantage A=−2, what value follows?Show answer and explanation
- −2.4
- 3
- −1.6
- −3
Answer: −3
The two arguments are 1.5×(−2)=−3 and 1.2×(−2)=−2.4. Their minimum is−3; the advantage sign matters in this clipped objective.
95.Define KL(P, Q)=ΣP(a)ln(P(a)/Q(a)), with zero-mass terms 0 and positive mass divided by zero giving+∞. For P=(1/2, 1/2) and Q=(1, 0), what are KL(P, Q) and KL(Q, P)?
Show answer and explanation
- (+∞, ln 2)
- (0, 0)
- (ln 2, +∞)
- (ln 2, ln 2)
Answer: (+∞, ln 2)
P assigns positive mass where Q assigns zero, so the first divergence is infinite. Q's sole supported action contributes ln(1/(1/2))=ln 2 in the reverse direction.
96.From S0, action A reaches S1. At S1, A reaches a goal, while B resets to S0. An exploration schedule repeats A, B forever from S0. What does sampling both action names fail to ensure?
Show answer and explanation
- Occurrence of both action names in the supplied schedule
- Execution of the consecutive A, A sequence needed to reach the goal
- The specified reset caused by B at S1
- Repeated arrival at S1 after A from S0
Answer: Execution of the consecutive A, A sequence needed to reach the goal
Marginal action coverage is not sequence coverage. This alternating schedule repeatedly reaches S1 and resets before taking its goal-reaching A.
97.A fixed-policy Bellman operator has discount 0.5. A bounded estimate V has uniform Bellman residual at most 0.1, and the true bounded fixed point exists. What uniform value-error bound follows from E≤0.1+0.5E?
Show answer and explanation
- E≥0.2 necessarily
- E≤0.1
- E≤0.2
- E=0 necessarily
Answer: E≤0.2
Rearrange the supplied inequality to 0.5E≤0.1, so E≤0.2. A small residual bounds value error under these contraction assumptions, without forcing equality.
98.An actor uses a=
tanh(θ). At a saturated output, da/dθ is near 0, while the critic's derivative dQ/da is nonzero. What can happen to the actor's parameter gradient?Show answer and explanation
- A nonzero critic action derivative being proved zero by actor saturation
- It can be small because the chain rule includes da/dθ
- A saturated tanh necessarily producing an infinite parameter gradient
- The parameter gradient equaling the action-space derivative under every parameterization
Answer: It can be small because the chain rule includes da/dθ
The parameter gradient multiplies the action derivative by the actor's Jacobian. Saturation can attenuate this gradient even when the action-space slope is nonzero.
99.For f(θ, Z)=θ+Z, a central finite difference uses the same noise Z at θ+h andθ−h, with h≠0. What value does that sample difference quotient produce?
Show answer and explanation
- 0
- Z
- 1/(2h)
- 1
Answer: 1
The shared noise cancels: [(θ+h+Z)−(θ−h+Z)]/(2h)=1. This illustrates a specific coupled estimator, not a universal guarantee for nonlinear noise dependence.
100.A cache stores only undiscounted total reward 1. It could come from rewards[1, 0] or[0, 1]. The new objective uses γ=0.5. Can that cached scalar alone determine the new return?
Show answer and explanation
- Both new returns necessarily becoming 0.5
- Discounting being impossible even when complete reward sequences are retained
- Both new returns necessarily staying 1
- No; the two sequences give 1 and 0.5 respectively
Answer: No; the two sequences give 1 and 0.5 respectively
The old total discarded reward timing. Retain sufficient trajectory information to recompute a changed discount objective.
101.A convergence result explicitly requires tabular representation and infinite supported sampling. An experiment uses neural approximation on a finite fixed dataset. What must be established before claiming that result guarantees this run's outcome?
Show answer and explanation
- A larger neural network automatically satisfying every tabular and sampling condition
- Both procedures sharing the reinforcement-learning label
- A theorem title substituting for checking its applicable assumptions
- Applicable assumptions or a justified extension to this different setting
Answer: Applicable assumptions or a justified extension to this different setting
A result's scope follows its assumptions. Different representation and data conditions need their own analysis rather than an unqualified transfer of the guarantee.