1. Home
  2. Explore
  3. Computer Science
  4. Reinforcement Learning Basics

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Reinforcement Learning Basics

  • 60Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Bias Variance

What does generalization error measure in machine learning?

60 questions

  1. 1

    What does generalization error measure in machine learning?

    1. A

      How well a model performs on unseen data

    2. B

      How accurately a model reproduces its training labels

    3. C

      How quickly a model minimizes training loss

    4. D

      How many parameters a model contains

    Correct answer
    A

    How well a model performs on unseen data

    Explanation

    Generalization error measures performance on unseen or test data rather than only on the training examples.

  2. 2

    Which component of test error represents noise in the test examples that cannot be eliminated by changing the model?

    1. A

      Model variance

    2. B

      Optimization error

    3. C

      Irreducible error

    4. D

      Model bias

    Correct answer
    C

    Irreducible error

    Explanation

    Irreducible error is caused by noise in the test data and cannot be removed through modeling choices.

  3. 3

    What is bias most accurately described as in the bias-variance framework?

    1. A

      Systematic error made by the model across possible training sets

    2. B

      Random noise contained in the test labels

    3. C

      Sensitivity of the model to noise in one training set

    4. D

      Difference between two independently trained optimizers

    Correct answer
    A

    Systematic error made by the model across possible training sets

    Explanation

    Bias is the systematic error of a model, considered across the possible training sets that could have been sampled.

  4. 4

    What does variance measure in a machine learning model?

    1. A

      The model's sensitivity to noise in the training data

    2. B

      The unavoidable noise in the test examples

    3. C

      The average distance of parameters from zero

    4. D

      The number of classes in the output variable

    Correct answer
    A

    The model's sensitivity to noise in the training data

    Explanation

    Variance reflects how much the learned model changes in response to noise or differences in the training data.

  5. 5

    Why can increasing model capacity reduce training error without necessarily improving test error?

    1. A

      A more complex model prevents the use of cross-validation

    2. B

      A more complex model can reduce bias while increasing variance

    3. C

      A more complex model changes regression into classification

    4. D

      A more complex model always increases irreducible error

    Correct answer
    B

    A more complex model can reduce bias while increasing variance

    Explanation

    Increasing capacity generally reduces bias, but it may make the model more sensitive to training noise and therefore increase variance.

  6. 6

    A model has high variance and performs much better on training data than on cross-validation data. Which intervention is most likely to help?

    1. A

      Fit the model more closely to the training data

    2. B

      Increase model complexity

    3. C

      Increase regularization

    4. D

      Remove the cross-validation set

    Correct answer
    C

    Increase regularization

    Explanation

    Increasing regularization usually reduces variance, although it can increase bias. The training-to-cross-validation gap is a heuristic sign of high variance.

  7. 7

    What is the typical effect of increasing regularization on bias and variance?

    1. A

      It reduces bias and increases variance

    2. B

      It increases both bias and variance

    3. C

      It reduces both bias and variance in every setting

    4. D

      It increases bias and reduces variance

    Correct answer
    D

    It increases bias and reduces variance

    Explanation

    Stronger regularization constrains the model, usually reducing variance while making systematic underfitting more likely and thereby increasing bias.

  8. 8

    Why should training error and cross-validation error be examined together during model development?

    1. A

      Their relationship helps identify whether bias or variance is the larger problem

    2. B

      Their average directly equals irreducible error

    3. C

      Their difference determines the number of output classes

    4. D

      Their values eliminate the need to choose a model

    Correct answer
    A

    Their relationship helps identify whether bias or variance is the larger problem

    Explanation

    Training error and cross-validation error together provide a practical heuristic for diagnosing high bias or high variance and choosing a remedy.

  9. 9

    Which heuristic is used to estimate variance from observed model errors?

    1. A

      The sum of training error and test-label noise

    2. B

      The difference between bias and irreducible error

    3. C

      The gap between cross-validation error and training error

    4. D

      The number of parameters divided by the sample size

    Correct answer
    C

    The gap between cross-validation error and training error

    Explanation

    The lecture describes the gap between cross-validation error and training error as a heuristic estimate of variance.

  10. 10

    Why are these bias and variance estimates considered heuristic rather than fully principled in practice?

    1. A

      There is generally no direct practical decomposition that precisely estimates both contributions

    2. B

      Cross-validation error is always identical to test error

    3. C

      Irreducible error is known exactly for every dataset

    4. D

      Training error cannot be computed for any model

    Correct answer
    A

    There is generally no direct practical decomposition that precisely estimates both contributions

    Explanation

    Although the bias-variance decomposition is conceptually useful, directly obtaining the separate contributions in practice is generally difficult, so heuristics are used.

  11. 11

    What distinguishes supervised learning from reinforcement learning in the type of feedback provided?

    1. A

      Supervised learning uses sequences, whereas reinforcement learning uses independent labels

    2. B

      Supervised learning has no inputs, whereas reinforcement learning has only inputs

    3. C

      Supervised learning receives target answers, whereas reinforcement learning receives rewards

    4. D

      Supervised learning receives rewards, whereas reinforcement learning receives target labels

    Correct answer
    C

    Supervised learning receives target answers, whereas reinforcement learning receives rewards

    Explanation

    In supervised learning, the correct output for an input is provided. In reinforcement learning, the agent receives reward feedback instead of a prescribed action or answer.

  12. 12

    What is the defining objective of reinforcement learning?

    1. A

      Maximize accumulated long-term reward over time

    2. B

      Reproduce every action taken by an expert

    3. C

      Maximize only the immediate reward after each action

    4. D

      Minimize training error on independent examples

    Correct answer
    A

    Maximize accumulated long-term reward over time

    Explanation

    Reinforcement learning concerns sequential decision-making, with the goal of maximizing the accumulated reward over the future.

  13. 13

    Why is reinforcement learning different from the usual supervised-learning setting?

    1. A

      Reinforcement learning cannot use probability distributions

    2. B

      Actions in reinforcement learning never influence later decisions

    3. C

      Reinforcement learning uses only continuous outputs

    4. D

      Actions affect future states and rewards rather than each example being independent

    Correct answer
    D

    Actions affect future states and rewards rather than each example being independent

    Explanation

    Reinforcement learning involves a sequence of interdependent decisions, whereas supervised examples are typically treated as independent and identically distributed.

  14. 14

    Which task is an example of reinforcement learning?

    1. A

      Predicting a class label from a fixed labeled dataset

    2. B

      Compressing data without receiving environmental feedback

    3. C

      Training a robot to learn how to walk through repeated actions and feedback

    4. D

      Estimating a regression target from independent input-output pairs

    Correct answer
    C

    Training a robot to learn how to walk through repeated actions and feedback

    Explanation

    A walking robot repeatedly acts in an environment and receives feedback, making it a sequential reinforcement-learning problem.

  15. 15

    How is classification distinguished from regression in the discussed framework?

    1. A

      Classification requires sequential decisions, whereas regression requires rewards

    2. B

      Classification uses no loss function, whereas regression always uses one

    3. C

      Classification predicts a continuous output, whereas regression predicts a binary output

    4. D

      Classification predicts a discrete output, whereas regression predicts a continuous output

    Correct answer
    D

    Classification predicts a discrete output, whereas regression predicts a continuous output

    Explanation

    The distinction is based on the type of the output variable: discrete outputs indicate classification, while continuous outputs indicate regression.

  16. 16

    What does a supervised-learning hypothesis do?

    1. A

      It maps an input xxx to a predicted output yyy

    2. B

      It maps a reward directly to a future state

    3. C

      It maps a policy to a transition probability

    4. D

      It maps an action to every possible training set

    Correct answer
    A

    It maps an input xxx to a predicted output yyy

    Explanation

    In supervised learning, the hypothesis is a function that maps inputs to outputs and is learned to generalize to unseen data.

  17. 17

    What generalization do generalized linear models provide over ordinary classification and regression?

    1. A

      They restrict every input to be normally distributed

    2. B

      They allow the conditional distribution of yyy given xxx to come from the exponential family

    3. C

      They replace the conditional distribution with a deterministic action

    4. D

      They require every output to be binary

    Correct answer
    B

    They allow the conditional distribution of yyy given xxx to come from the exponential family

    Explanation

    Generalized linear models extend beyond ordinary regression and classification by allowing yyy given xxx to follow distributions in the exponential family, including discrete and continuous cases.

  18. 18

    What is the main difference between discriminative and generative modeling?

    1. A

      Discriminative models model p(x)p(x)p(x) only, whereas generative models model labels only

    2. B

      Discriminative models learn p(y∣x)p(y\mid x)p(y∣x), whereas generative models learn how to generate joint x,yx,yx,y pairs

    3. C

      Discriminative models learn rewards, whereas generative models learn only actions

    4. D

      Discriminative models require kernels, whereas generative models cannot use probability

    Correct answer
    B

    Discriminative models learn p(y∣x)p(y\mid x)p(y∣x), whereas generative models learn how to generate joint x,yx,yx,y pairs

    Explanation

    Discriminative models directly focus on the conditional relationship between xxx and yyy. Generative models model the joint data-generating process, often using p(y)p(x∣y)p(y)p(x\mid y)p(y)p(x∣y).

  19. 19

    Which pairing correctly matches a generative model with the type of input it was described as handling?

    1. A

      Naive Bayes with discrete inputs and GDA with real-valued inputs

    2. B

      Naive Bayes with continuous inputs and GDA with binary inputs only

    3. C

      Naive Bayes with rewards and GDA with transition matrices

    4. D

      Naive Bayes with actions and GDA with policies

    Correct answer
    A

    Naive Bayes with discrete inputs and GDA with real-valued inputs

    Explanation

    The discussed examples were Naive Bayes for discrete xxx and Gaussian discriminant analysis for real-valued xxx.

  20. 20

    What is a kernel in the discussed kernel-method framework?

    1. A

      A regularization coefficient that directly sets model bias

    2. B

      A probability distribution over actions in an MDP

    3. C

      A symmetric positive-definite function with an implicit feature map

    4. D

      A discrete label assigned to each training example

    Correct answer
    C

    A symmetric positive-definite function with an implicit feature map

    Explanation

    Kernels were described as symmetric positive-definite functions that implicitly represent a feature map.

  21. 21

    How does model complexity typically differ between ordinary feature-based models and kernel methods?

    1. A

      Neither kind of model is affected by dataset size

    2. B

      Ordinary models depend mainly on the number of examples, whereas kernel methods depend mainly on the number of labels

    3. C

      Ordinary models depend mainly on the number of features, whereas kernel methods depend mainly on the number of examples

    4. D

      Both kinds of models depend only on the number of output classes

    Correct answer
    C

    Ordinary models depend mainly on the number of features, whereas kernel methods depend mainly on the number of examples

    Explanation

    In ordinary models, parameters are associated with features. In kernel methods, coefficients are associated with training examples, so computational cost often depends on the number of examples.

  22. 22

    Why can support vector machines scale relatively well in both feature dimension and number of examples when using kernels?

    1. A

      Kernels eliminate the need for training data, while SVMs use no coefficients

    2. B

      SVMs use only one feature, while kernels remove all examples

    3. C

      Kernels can represent many features, while the learned example coefficients are sparse

    4. D

      SVMs avoid optimization by directly copying the labels

    Correct answer
    C

    Kernels can represent many features, while the learned example coefficients are sparse

    Explanation

    Kernel methods can provide an implicit, potentially very large feature space, and SVM solutions often have sparse coefficients over examples.

  23. 23

    How can a neural network be interpreted in terms of features and generalized linear models?

    1. A

      Its earlier layers perform cross-validation and its final layer computes irreducible error

    2. B

      Its earlier layers learn features and its final layer acts like a generalized linear model

    3. C

      Its earlier layers define rewards and its final layer defines transition probabilities

    4. D

      Its earlier layers are fixed kernels and its final layer is always unsupervised

    Correct answer
    B

    Its earlier layers learn features and its final layer acts like a generalized linear model

    Explanation

    The neural-network view presented treats the hidden layers as a learnable feature map and the last layer as a generalized linear model.

  24. 24

    An MDP is formally represented as which tuple?

    1. A

      (S,A,P,γ,R)(S,A,P,\gamma,R)(S,A,P,γ,R)

    2. B

      (A,P,Q,K,λ)(A,P,Q,K,\lambda)(A,P,Q,K,λ)

    3. C

      (X,Y,L,θ,N)(X,Y,L,\theta,N)(X,Y,L,θ,N)

    4. D

      (S,R,V,π,T)(S,R,V,\pi,T)(S,R,V,π,T)

    Correct answer
    A

    (S,A,P,γ,R)(S,A,P,\gamma,R)(S,A,P,γ,R)

    Explanation

    An MDP consists of a state set SSS, action set AAA, transition probabilities PPP, discount factor γ\gammaγ, and reward function RRR.

  25. 25

    What does the state set SSS represent in an MDP?

    1. A

      All possible states in which the agent can be

    2. B

      All training examples used to estimate transitions

    3. C

      All policies that the agent can follow

    4. D

      All rewards that the agent can receive

    Correct answer
    A

    All possible states in which the agent can be

    Explanation

    The state set SSS contains the possible configurations or situations occupied by the agent.

  26. 26

    What does the action set AAA represent in an MDP?

    1. A

      The possible rewards assigned to states

    2. B

      The possible values of the discount factor

    3. C

      The possible actions available to the agent

    4. D

      The possible states reached after an action

    Correct answer
    C

    The possible actions available to the agent

    Explanation

    The action set contains the choices the agent can make while in a state.

  27. 27

    What does the transition probability P(s,a,s′)P(s,a,s')P(s,a,s′) describe?

    1. A

      The probability that a policy was selected during training

    2. B

      The probability that state sss has the highest long-term value

    3. C

      The probability of reaching s′s's′ after taking action aaa in state sss

    4. D

      The reward received before entering state sss

    Correct answer
    C

    The probability of reaching s′s's′ after taking action aaa in state sss

    Explanation

    The transition model gives the probability of each successor state s′s's′ conditional on the current state sss and action aaa.

  28. 28

    Why can an action lead to different successor states in an MDP?

    1. A

      The agent is forbidden from choosing a fixed action

    2. B

      The environment may be stochastic or contain uncertainty

    3. C

      The discount factor randomly selects the next state

    4. D

      The reward function changes the definition of the state set

    Correct answer
    B

    The environment may be stochastic or contain uncertainty

    Explanation

    Transition probabilities model uncertainty in the environment, such as a robot moving a slightly different distance than intended.

  29. 29

    What is the usual role of the discount factor γ\gammaγ?

    1. A

      It converts every negative reward into a positive reward

    2. B

      It weights future rewards less heavily than earlier rewards

    3. C

      It removes stochasticity from state transitions

    4. D

      It determines which actions are legally available

    Correct answer
    B

    It weights future rewards less heavily than earlier rewards

    Explanation

    The discount factor, with values from 000 to 111, multiplies future rewards by progressively smaller powers of γ\gammaγ.

  30. 30

    What behavior is encouraged by discounting future rewards?

    1. A

      Obtaining positive rewards sooner and postponing negative rewards

    2. B

      Choosing actions uniformly regardless of their consequences

    3. C

      Making future rewards larger than immediate rewards

    4. D

      Ignoring all immediate rewards in favor of distant rewards

    Correct answer
    A

    Obtaining positive rewards sooner and postponing negative rewards

    Explanation

    Discounting makes an otherwise equal positive reward more valuable when received sooner and makes delayed negative rewards less costly.

  31. 31

    What is one financial interpretation of the discount factor?

    1. A

      It represents the probability that a trade has no risk

    2. B

      It represents the preference for receiving money sooner rather than later

    3. C

      It represents the number of actions available to an investor

    4. D

      It represents the variance of a financial dataset

    Correct answer
    B

    It represents the preference for receiving money sooner rather than later

    Explanation

    In a financial setting, discounting reflects the time value of money: receiving money sooner is preferred to receiving the same amount later.

  32. 32

    How is a reward function commonly represented in the basic formulation?

    1. A

      As a probability distribution over all policies

    2. B

      As a real-valued function of the state, such as R(s)R(s)R(s)

    3. C

      As a matrix that contains only transition probabilities

    4. D

      As a binary function of the training example index

    Correct answer
    B

    As a real-valued function of the state, such as R(s)R(s)R(s)

    Explanation

    The basic discussion represents reward as a real-valued function of the state. It may also be modeled as R(s,a)R(s,a)R(s,a) when action-specific costs matter.

  33. 33

    Why might a reward function depend on both state and action rather than state alone?

    1. A

      Transition probabilities cannot be defined for individual actions

    2. B

      The discount factor is defined only for action-state pairs

    3. C

      Different actions taken in the same state may have different costs

    4. D

      The state cannot be observed before an action is taken

    Correct answer
    C

    Different actions taken in the same state may have different costs

    Explanation

    An action-dependent reward R(s,a)R(s,a)R(s,a) can capture cases where two actions lead from the same state but incur different costs or benefits.

  34. 34

    What is a trajectory, episode, or trial in reinforcement learning?

    1. A

      A list of all actions that are impossible in an environment

    2. B

      A single reward value assigned to the initial state

    3. C

      A fixed training set of independent input-output pairs

    4. D

      A sequence of states and actions generated as the agent interacts with the environment

    Correct answer
    D

    A sequence of states and actions generated as the agent interacts with the environment

    Explanation

    These terms refer to the sequence formed as the agent takes actions and the environment produces successor states.

  35. 35

    What is a policy π\piπ?

    1. A

      A function that specifies an action for a given state

    2. B

      A function that assigns a reward to every training example

    3. C

      A distribution that describes only the initial state

    4. D

      A matrix that stores the value of every possible trajectory

    Correct answer
    A

    A function that specifies an action for a given state

    Explanation

    A policy maps states to actions, telling the agent what action to take when it is in each state.

  36. 36

    How does value differ from immediate reward?

    1. A

      Value is observed directly, whereas reward must always be estimated

    2. B

      Value is always binary, whereas reward is always continuous

    3. C

      Value is the expected discounted sum of future rewards, whereas reward is immediate

    4. D

      Value describes the current action, whereas reward describes the policy

    Correct answer
    C

    Value is the expected discounted sum of future rewards, whereas reward is immediate

    Explanation

    Reward is the immediate payoff from entering a state or taking an action, while value measures the long-term expected payoff from a state under a policy.

  37. 37

    What does Vπ(s)V^{\pi}(s)Vπ(s) represent?

    1. A

      The largest reward available from any state-action pair

    2. B

      The immediate reward obtained in sss regardless of future actions

    3. C

      The probability of selecting state sss under every possible policy

    4. D

      The expected discounted sum of future rewards starting at sss while following π\piπ

    Correct answer
    D

    The expected discounted sum of future rewards starting at sss while following π\piπ

    Explanation

    Vπ(s)V^{\pi}(s)Vπ(s) is the expected long-term discounted return when the agent starts in state sss and follows policy π\piπ thereafter.

  38. 38

    Why is an expectation needed in the definition of Vπ(s)V^{\pi}(s)Vπ(s)?

    1. A

      The reward function is never specified by the MDP

    2. B

      The policy must select every action with equal probability

    3. C

      The initial state is always chosen uniformly at random

    4. D

      Future states and rewards are random because transitions can be stochastic

    Correct answer
    D

    Future states and rewards are random because transitions can be stochastic

    Explanation

    Although the starting state is fixed when evaluating Vπ(s)V^{\pi}(s)Vπ(s), future successor states can vary according to the transition probabilities.

  39. 39

    Which equation expresses the Bellman equation for a fixed policy?

    1. A

      Vπ(s)=γR(s)+∑s′P(s,s′,π(s))V^{\pi}(s)=\gamma R(s)+\sum_{s'}P(s,s',\pi(s))Vπ(s)=γR(s)+∑s′​P(s,s′,π(s))

    2. B

      Vπ(s)=R(s)+γ∑aVπ(a)V^{\pi}(s)=R(s)+\gamma\sum_a V^{\pi}(a)Vπ(s)=R(s)+γ∑a​Vπ(a)

    3. C

      Vπ(s)=max⁡aR(s,a)−γVπ(s)V^{\pi}(s)=\max_a R(s,a)-\gamma V^{\pi}(s)Vπ(s)=maxa​R(s,a)−γVπ(s)

    4. D

      Vπ(s)=R(s)+γ∑s′P(s,π(s),s′)Vπ(s′)V^{\pi}(s)=R(s)+\gamma\sum_{s'}P(s,\pi(s),s')V^{\pi}(s')Vπ(s)=R(s)+γ∑s′​P(s,π(s),s′)Vπ(s′)

    Correct answer
    D

    Vπ(s)=R(s)+γ∑s′P(s,π(s),s′)Vπ(s′)V^{\pi}(s)=R(s)+\gamma\sum_{s'}P(s,\pi(s),s')V^{\pi}(s')Vπ(s)=R(s)+γ∑s′​P(s,π(s),s′)Vπ(s′)

    Explanation

    The Bellman equation decomposes value into the immediate reward plus the discounted expected value of successor states under the action prescribed by the policy.

  40. 40

    In the Bellman equation, what does the summation over successor states calculate?

    1. A

      The variance of the rewards across training datasets

    2. B

      The total number of actions available in the current state

    3. C

      The immediate reward accumulated before reaching the current state

    4. D

      The expected future value after taking the policy-prescribed action

    Correct answer
    D

    The expected future value after taking the policy-prescribed action

    Explanation

    The transition probabilities weight the values of possible successor states, producing the expected future value.

  41. 41

    How can the value function for a fixed policy be computed when the state space is finite?

    1. A

      By ignoring the transition probabilities

    2. B

      By maximizing over policies without evaluating any one policy

    3. C

      By solving a system of linear equations

    4. D

      By choosing the action with the largest immediate reward only

    Correct answer
    C

    By solving a system of linear equations

    Explanation

    For a fixed policy, the Bellman equations are linear in the state values and can be solved as a linear system.

  42. 42

    What does the matrix PπP^{\pi}Pπ contain?

    1. A

      The transition probabilities obtained when each state follows the action prescribed by π\piπ

    2. B

      The inverse of the state-value vector for the optimal policy

    3. C

      The probabilities of observing each training label

    4. D

      The rewards obtained from every possible policy and trajectory

    Correct answer
    A

    The transition probabilities obtained when each state follows the action prescribed by π\piπ

    Explanation

    Each row of PπP^{\pi}Pπ corresponds to a current state, and contains the transition distribution produced by taking the action π(s)\pi(s)π(s).

  43. 43

    Which matrix expression gives the value function for a fixed policy?

    1. A

      Vπ=(I+γPπ)RV^{\pi}=(I+\gamma P^{\pi})RVπ=(I+γPπ)R

    2. B

      Vπ=(I−γPπ)−1RV^{\pi}=(I-\gamma P^{\pi})^{-1}RVπ=(I−γPπ)−1R

    3. C

      Vπ=γ(I−Pπ)R−1V^{\pi}=\gamma(I-P^{\pi})R^{-1}Vπ=γ(I−Pπ)R−1

    4. D

      Vπ=R−γ(Pπ)−1V^{\pi}=R-\gamma(P^{\pi})^{-1}Vπ=R−γ(Pπ)−1

    Correct answer
    B

    Vπ=(I−γPπ)−1RV^{\pi}=(I-\gamma P^{\pi})^{-1}RVπ=(I−γPπ)−1R

    Explanation

    Writing the Bellman equations as Vπ=R+γPπVπV^{\pi}=R+\gamma P^{\pi}V^{\pi}Vπ=R+γPπVπ and rearranging yields Vπ=(I−γPπ)−1RV^{\pi}=(I-\gamma P^{\pi})^{-1}RVπ=(I−γPπ)−1R.

  44. 44

    What is the optimal value function V∗(s)V^*(s)V∗(s)?

    1. A

      The immediate reward obtained at state sss under the first policy tried

    2. B

      The value obtained by always choosing the most frequent action

    3. C

      The maximum value achievable at state sss over all policies

    4. D

      The average value of all states under a fixed policy

    Correct answer
    C

    The maximum value achievable at state sss over all policies

    Explanation

    The optimal value is defined by V∗(s)=max⁡πVπ(s)V^*(s)=\max_{\pi}V^{\pi}(s)V∗(s)=maxπ​Vπ(s), meaning the greatest long-term value attainable from state sss.

  45. 45

    Which equation characterizes the optimal value function?

    1. A

      V∗(s)=R(s)+∑πP(s,π(s),s′)Vπ(s′)V^*(s)=R(s)+\sum_{\pi}P(s,\pi(s),s')V^{\pi}(s')V∗(s)=R(s)+∑π​P(s,π(s),s′)Vπ(s′)

    2. B

      V∗(s)=γR(s)+min⁡a∑s′P(s,a,s′)V^*(s)=\gamma R(s)+\min_a\sum_{s'}P(s,a,s')V∗(s)=γR(s)+mina​∑s′​P(s,a,s′)

    3. C

      V∗(s)=max⁡aR(s,a)−γV∗(s)V^*(s)=\max_a R(s,a)-\gamma V^*(s)V∗(s)=maxa​R(s,a)−γV∗(s)

    4. D

      V∗(s)=R(s)+max⁡aγ∑s′P(s,a,s′)V∗(s′)V^*(s)=R(s)+\max_a\gamma\sum_{s'}P(s,a,s')V^*(s')V∗(s)=R(s)+maxa​γ∑s′​P(s,a,s′)V∗(s′)

    Correct answer
    D

    V∗(s)=R(s)+max⁡aγ∑s′P(s,a,s′)V∗(s′)V^*(s)=R(s)+\max_a\gamma\sum_{s'}P(s,a,s')V^*(s')V∗(s)=R(s)+maxa​γ∑s′​P(s,a,s′)V∗(s′)

    Explanation

    The optimal Bellman equation chooses the action whose expected discounted successor value is greatest.

  46. 46

    Why can the optimal Bellman equation not generally be solved as the same simple linear system as the fixed-policy equation?

    1. A

      The transition probabilities must all equal zero

    2. B

      The reward function is not allowed to be known

    3. C

      The state space disappears from the equation

    4. D

      The maximization over actions makes the equation nonlinear

    Correct answer
    D

    The maximization over actions makes the equation nonlinear

    Explanation

    The max operator over actions prevents the optimal Bellman equation from being a linear system in the same direct way as the fixed-policy equation.

  47. 47

    How is the optimal policy related to the optimal value function?

    1. A

      It chooses a random action independently of the current state

    2. B

      It chooses the action with the greatest expected successor value under V∗V^*V∗

    3. C

      It chooses the action with the smallest immediate reward

    4. D

      It chooses the action that minimizes the number of successor states

    Correct answer
    B

    It chooses the action with the greatest expected successor value under V∗V^*V∗

    Explanation

    The optimal policy is given by the action maximizing the expected value of the next state, using the optimal value function.

  48. 48

    What is the main update performed by value iteration?

    1. A

      For every state, permanently select the first available action

    2. B

      For every transition, remove all stochastic outcomes

    3. C

      For every state, replace its value with the optimal Bellman backup using the current values

    4. D

      For every policy, solve only for its immediate rewards

    Correct answer
    C

    For every state, replace its value with the optimal Bellman backup using the current values

    Explanation

    Value iteration initializes values and repeatedly applies the optimal Bellman update: V(s)←R(s)+max⁡aγ∑s′P(s,a,s′)V(s′)V(s)\leftarrow R(s)+\max_a\gamma\sum_{s'}P(s,a,s')V(s')V(s)←R(s)+maxa​γ∑s′​P(s,a,s′)V(s′).

  49. 49

    How is value iteration typically initialized in the described algorithm?

    1. A

      Set every state value using the optimal policy

    2. B

      Set every state value to its transition probability

    3. C

      Set every state value to its maximum possible reward

    4. D

      Set the value of every state to zero

    Correct answer
    D

    Set the value of every state to zero

    Explanation

    The described value-iteration procedure initializes V(s)=0V(s)=0V(s)=0 for every state before repeatedly applying Bellman updates.

  50. 50

    Why does value iteration converge to the optimal value function?

    1. A

      Every policy produces exactly the same transition matrix

    2. B

      The Bellman backup operator is a contraction mapping with a fixed point at V∗V^*V∗

    3. C

      The reward function is always positive in every state

    4. D

      The algorithm evaluates only one state and never changes it

    Correct answer
    B

    The Bellman backup operator is a contraction mapping with a fixed point at V∗V^*V∗

    Explanation

    Repeated application of the Bellman optimality operator converges because it is a contraction mapping; its fixed point is the optimal value function.

  51. 51

    What does it mean for an operator to be a contraction mapping in this context?

    1. A

      The operator maps every state to the same action in one step

    2. B

      Every output is farther from the optimal value than its input

    3. C

      Outputs produced from two inputs are closer together than the original inputs

    4. D

      The operator always returns the immediate reward unchanged

    Correct answer
    C

    Outputs produced from two inputs are closer together than the original inputs

    Explanation

    A contraction brings any two input value functions closer together after applying the operator, leading to convergence toward a unique fixed point.

  52. 52

    What is the fixed point of the optimal Bellman backup operator?

    1. A

      The first randomly selected policy

    2. B

      The optimal value function V∗V^*V∗

    3. C

      The initial zero value function only

    4. D

      The reward function RRR for every MDP

    Correct answer
    B

    The optimal value function V∗V^*V∗

    Explanation

    At the fixed point, applying the optimal Bellman operator changes nothing; this fixed point is V∗V^*V∗.

  53. 53

    What is the key distinction between synchronous and asynchronous value iteration?

    1. A

      Synchronous updates replace all state values together, whereas asynchronous updates can use newly updated values immediately

    2. B

      Synchronous iteration maximizes rewards, whereas asynchronous iteration minimizes them

    3. C

      Synchronous iteration uses policies, whereas asynchronous iteration uses no transition probabilities

    4. D

      Synchronous iteration is stochastic, whereas asynchronous iteration is always deterministic

    Correct answer
    A

    Synchronous updates replace all state values together, whereas asynchronous updates can use newly updated values immediately

    Explanation

    Synchronous value iteration computes updates using the previous full value function and replaces them together. Asynchronous versions update states individually and may use updated values during the same sweep.

  54. 54

    What is the first major step in policy iteration?

    1. A

      Initialize all values to infinity and remove the policy

    2. B

      Initialize a policy and compute its corresponding value function

    3. C

      Replace every transition probability with a deterministic transition

    4. D

      Choose the optimal action without evaluating any values

    Correct answer
    B

    Initialize a policy and compute its corresponding value function

    Explanation

    Policy iteration begins with an initial policy, evaluates it by solving the fixed-policy Bellman equations, and then improves it.

  55. 55

    How does policy iteration improve a current policy?

    1. A

      It changes actions randomly until the reward becomes positive

    2. B

      It selects the action with the smallest transition probability

    3. C

      It chooses, at each state, the action with the greatest expected successor value under the current value function

    4. D

      It keeps the policy fixed and changes only the discount factor

    Correct answer
    C

    It chooses, at each state, the action with the greatest expected successor value under the current value function

    Explanation

    After evaluating the current policy, policy iteration performs a policy-improvement step using the action that maximizes expected future value.

  56. 56

    When can policy iteration stop according to the described convergence test?

    1. A

      When the value of the initial state becomes zero

    2. B

      When a complete policy-improvement sweep leaves the policy unchanged

    3. C

      When every action has been tried exactly once

    4. D

      When the immediate reward at one state is positive

    Correct answer
    B

    When a complete policy-improvement sweep leaves the policy unchanged

    Explanation

    A stable policy that does not change during a full improvement step is the converged optimal policy under the stated finite-MDP setting.

  57. 57

    How do value iteration and policy iteration differ in their computational approach?

    1. A

      Value iteration is supervised, whereas policy iteration is an unsupervised clustering method

    2. B

      Value iteration searches only one policy, whereas policy iteration evaluates all policies simultaneously

    3. C

      Value iteration repeatedly updates values, whereas policy iteration alternates policy evaluation and policy improvement

    4. D

      Value iteration never uses rewards, whereas policy iteration never uses transition probabilities

    Correct answer
    C

    Value iteration repeatedly updates values, whereas policy iteration alternates policy evaluation and policy improvement

    Explanation

    Value iteration applies optimal Bellman backups directly. Policy iteration repeatedly evaluates a fixed policy and then improves that policy.

  58. 58

    Why can policy iteration be more expensive per iteration for a large state space?

    1. A

      Policy improvement requires enumerating every possible trajectory to infinity

    2. B

      Policy evaluation uses a separate model for every training example

    3. C

      Policy iteration must remove all stochastic transitions before proceeding

    4. D

      Policy evaluation requires solving or inverting a state-by-state linear system

    Correct answer
    D

    Policy evaluation requires solving or inverting a state-by-state linear system

    Explanation

    For a finite state space, policy evaluation involves an inverse or equivalent solution involving an S×SS\times SS×S matrix, which can be costly for large SSS.

  59. 59

    What is the important convergence distinction between the two algorithms?

    1. A

      Policy iteration reaches the exact optimum after finite policy changes, while value iteration approaches the optimum to a chosen precision

    2. B

      Value iteration always reaches the exact optimum in one step, while policy iteration never converges

    3. C

      Both algorithms necessarily require infinitely many policy changes to reach any solution

    4. D

      Neither algorithm can produce an optimal policy from its value estimates

    Correct answer
    A

    Policy iteration reaches the exact optimum after finite policy changes, while value iteration approaches the optimum to a chosen precision

    Explanation

    For the finite setting described, policy iteration converges after a finite number of policy improvements. Value iteration converges toward V∗V^*V∗ and can achieve arbitrary precision, though it may not attain the exact value in a finite number of updates.

  60. 60

    If value iteration has produced a value function that is close to V∗V^*V∗, how can a corresponding policy be obtained?

    1. A

      Choose at each state the action maximizing expected successor value under that estimated value function

    2. B

      Use the policy that was randomly initialized before value iteration

    3. C

      Average all actions and ignore their transition probabilities

    4. D

      Choose the action with the lowest immediate reward at each state

    Correct answer
    A

    Choose at each state the action maximizing expected successor value under that estimated value function

    Explanation

    A policy can be extracted from any value estimate by selecting the action that maximizes the expected successor value, using the same policy-improvement relationship.

Question 1 of 60
Question 1 of 60

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent