Reinforcement Learning Basics
- 79Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is generalization error in machine learning?
The error a model makes on unseen data, rather than on the training data.
Or swipe the card
79 cards
What is generalization error in machine learning?
The error a model makes on unseen data, rather than on the training data.
What are the three additive components of generalization error?
Irreducible error, bias, and variance.
What is irreducible error?
Error caused by noise in the test examples that cannot be eliminated by changing the model.
What is bias in a machine learning model?
The model's systematic error, such as consistently underpredicting or overpredicting.
What is variance in a machine learning model?
The model's sensitivity to noise or changes in the training data.
How does increasing model capacity typically affect bias and variance?
It tends to reduce bias but may increase variance.
How does increasing regularization typically affect bias and variance?
It tends to reduce variance but increase bias.
Why should model development examine training error and cross-validation error together?
Their relationship helps diagnose whether the model has a high-bias or high-variance problem.
What heuristic approximates bias and variance using training and cross-validation errors?
Training error approximates bias, while the gap between cross-validation error and training error approximates variance.
What is the main purpose of cross-validation in the bias-variance context?
To estimate how well the current model generalizes and help assess its bias-variance balance.
What is supervised learning?
Learning a hypothesis h that maps inputs x to outputs y using labeled input-output pairs.
How does supervised learning differ from reinforcement learning in its feedback signal?
Supervised learning provides the correct output, whereas reinforcement learning provides a reward.
How are classification and regression distinguished?
Classification predicts a discrete output, while regression predicts a continuous output.
What are generalized linear models designed to generalize?
They generalize the possible data types of y by modeling y∣x with a distribution from the exponential family.
What is the difference between discriminative and generative models?
Discriminative models learn p(y∣x), while generative models learn how to generate joint examples (x,y).
What are Naive Bayes and Gaussian discriminant analysis examples of?
Generative models.
What is a kernel?
A symmetric positive-definite function that implicitly represents a feature map.
How does model complexity differ between ordinary parameterized models and kernel methods?
Ordinary models scale with the number of features, whereas kernel methods scale with the number of examples.
Why can support vector machines scale well with many features?
Kernel methods can represent many features, potentially infinitely many, and SVM coefficients are sparse.
What is the key difference between reinforcement learning and standard supervised learning regarding time?
Reinforcement learning involves sequential decisions whose effects unfold over time, whereas supervised examples are typically treated as independent.
What is the goal of reinforcement learning?
To maximize accumulated long-term reward.
What properties can a reinforcement-learning reward have?
A reward is a real-valued quantity and may be positive or negative.
What is an agent in reinforcement learning?
A system that takes actions in an environment and receives rewards over time.
Why is reinforcement learning considered a long-term optimization problem?
Actions affect future states and rewards, so the agent must optimize the accumulated reward from the present into the future.
What is a Markov decision process (MDP)?
A formal model for sequential decision-making defined by states, actions, transition probabilities, a discount factor, and a reward function.
What are common applications of reinforcement learning?
Robotic control, game playing, and automated trading.
What are the five components of an MDP?
A state set S, an action set A, transition probabilities P, a discount factor γ, and a reward function R.
What does the state set S represent in an MDP?
The set of all possible states in which the agent can be.
What does the action set A represent in an MDP?
The set of actions available to the agent.
What is a transition probability P(s,a,s′)?
The probability of reaching next state s′ when taking action a from current state s.
Why are MDP transitions often stochastic?
The same action may lead to different next states because of uncertainty in the environment.
In a grid-world MDP, what does P(s,a,s′)=0.8 mean?
Starting in state s and taking action a results in state s′ with probability 0.8.
What does the discount factor γ represent?
A number between 0 and 1 that discounts future rewards.
What is the effect of a discount factor on positive rewards?
It encourages the agent to obtain positive rewards sooner rather than later.
What is the effect of a discount factor on negative rewards?
It encourages the agent to postpone negative rewards into the future.
How can the discount factor be interpreted in a financial setting?
As an interest-rate-like preference for receiving money sooner and postponing losses.
What is a reward function R(s)?
A function giving the immediate reward associated with being in state s.
Why might a reward function be written as R(s,a) instead of R(s)?
To represent action-specific costs or rewards.
What is an initial state in an MDP?
The state s0 from which an agent begins a trajectory.
What is a trajectory, episode, or trial?
A sequence of states and actions produced as an agent interacts with an environment.
How is the discounted return along a trajectory computed?
It is the sum of rewards weighted by increasing powers of the discount factor: R(s0)+γR(s1)+γ2R(s2)+⋯.
What is a policy π?
A mapping from states to actions that specifies what action to take in each state.
What is the value function Vπ(s)?
The expected discounted sum of future rewards when starting in state s and following policy π.
Why does the value function use an expectation?
Because the transition dynamics may lead to different future states and rewards on different trials.
What is the difference between immediate reward and value?
Reward is the immediate payoff from a state or action, whereas value is the long-term expected sum of discounted future rewards.
How does a policy determine a value function?
Following the policy repeatedly from each state induces the corresponding expected discounted return Vπ.
What is the Bellman equation for a policy value function?
Vπ(s)=R(s)+γ∑s′P(s,π(s),s′)Vπ(s′).
What two components make up the Bellman equation for Vπ(s)?
The immediate reward R(s) and the discounted expected future value of successor states.
What does P(s,π(s),s′) represent in the Bellman equation?
The probability of transitioning from s to s′ when taking the action prescribed by policy π.
Why is the Bellman equation recursive?
The value of the current state is expressed using the values of future states.
How can the policy value function be represented in matrix form?
Vπ=R+γPπVπ, where Pπ contains the transition probabilities under policy π.
How can Vπ be solved from the matrix Bellman equation?
Vπ=(I−γPπ)−1R.
What does the matrix Pπ contain?
The transition probabilities obtained by taking the action prescribed by policy π in each state.
What is the optimal value function V∗(s)?
V∗(s)=maxπVπ(s), the greatest achievable value from state s over all policies.
What is the Bellman optimality equation?
V∗(s)=R(s)+maxa∈Aγ∑s′P(s,a,s′)V∗(s′).
How does the Bellman optimality equation differ from the policy Bellman equation?
It maximizes over actions instead of using the single action selected by a fixed policy.
Why is the optimal value function harder to compute directly than Vπ?
The maximization over actions makes the equation nonlinear, so it cannot be solved as a single linear system.
How is the optimal policy derived from the optimal value function?
π∗(s)=argmaxa∈A∑s′P(s,a,s′)V∗(s′).
What does it mean for a policy to be greedy with respect to a value function?
At each state, it chooses the action with the highest expected next-state value.
Why can an optimal policy sacrifice immediate reward?
Because the action may lead to states with greater long-term discounted value.
What are the two central objects in reinforcement learning discussed here?
The policy and the value function.
What is value iteration?
An algorithm that repeatedly applies the Bellman optimality update to estimate the optimal value function.
How is value iteration initialized?
The value estimate is initialized, commonly with V(s)=0 for every state.
What is the value-iteration update rule?
V(s)←R(s)+maxa∈Aγ∑s′P(s,a,s′)V(s′).
When does value iteration stop?
When the value estimates have converged sufficiently.
What is a Bellman backup or Bellman update operator?
The operation that maps a current value function to a new value function using the Bellman optimality update.
Why does value iteration converge?
The Bellman backup operator is a contraction mapping with a fixed point at the optimal value function.
What is a fixed point of the Bellman backup operator?
A value function that remains unchanged after another Bellman backup.
What is the difference between synchronous and asynchronous value iteration?
Synchronous iteration updates all states using the old values before replacing them; asynchronous iteration can use newly updated values immediately.
How is a policy extracted after value iteration?
Choose, at each state, the action that maximizes the expected successor value under the final value estimates.
What is policy iteration?
An algorithm that alternates between evaluating a policy and improving it.
What are the two main steps of policy iteration?
Policy evaluation and policy improvement.
How does policy iteration perform policy evaluation?
It computes Vπ for the current policy, typically by solving Vπ=(I−γPπ)−1R.
How does policy iteration perform policy improvement?
For each state, it selects the action that maximizes the expected successor value under the current value function.
What is the stopping condition for policy iteration?
Stop when the policy no longer changes after a complete policy-improvement step.
How do the computational costs of value iteration and policy iteration compare?
Value iteration performs state-action backups, while policy iteration includes inversion or solution of an ∣S∣×∣S∣ system.
What convergence guarantee distinguishes policy iteration from value iteration?
Policy iteration reaches the exact optimal policy and corresponding value after a finite number of policy changes, whereas value iteration approaches the optimum progressively.
Can a value function be used to construct a policy?
Yes. Select, in every state, the action with the greatest expected value of the successor state.
Can a policy be used to construct a value function?
Yes. Evaluate the policy using its Bellman equations or the corresponding linear system.

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