Machine Learning Overview
- 23Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What does the Bitter Lesson by Rich Sutton argue about AI methods?
What does the Bitter Lesson by Rich Sutton argue about AI methods?
23 questions
- 1
What does the Bitter Lesson by Rich Sutton argue about AI methods?
- A
Handcrafted prior knowledge is essential for effective AI systems.
- B
Symbolic AI approaches like search have been rendered obsolete by modern machine learning.
- C
Deep learning alone is sufficient for all AI problems without needing search.
- D
General methods that leverage computation are ultimately the most effective by a large margin.
Correct answer
DGeneral methods that leverage computation are ultimately the most effective by a large margin.
Explanation
The Bitter Lesson argues that general methods scaling with compute, such as search and learning, are most effective, not handcrafted priors.
- A
- 2
What are the three key components of a search problem?
- A
Start state, successors function, and is_end function
- B
Input, output, and training data
- C
Agent, environment, and policy
- D
States, actions, and rewards
Correct answer
AStart state, successors function, and is_end function
Explanation
A search problem is defined by a start state, a successors function returning possible steps (action, cost, next state), and an is_end function to check termination.
- A
- 3
In the travel search problem, what are the actions available from block i?
- A
Take tram to i+1 costing 1 minute, or walk to 2*i costing 2 minutes
- B
Walk to i+1 costing 1 minute, or take tram to 2*i costing 2 minutes
- C
Walk to i+1 costing 2 minutes, or take tram to 2*i costing 1 minute
- D
Walk to i-1 costing 1 minute, or take tram to i/2 costing 2 minutes
Correct answer
BWalk to i+1 costing 1 minute, or take tram to 2*i costing 2 minutes
Explanation
From block i, walking to i+1 costs 1 minute, and taking the tram to 2i costs 2 minutes, provided i+1 ≤ n and 2i ≤ n.
- A
- 4
What information must a state contain in a search problem?
- A
Only the current location
- B
The total cost incurred so far
- C
The entire history of all visited states
- D
Any information needed to evaluate future actions, costs, and successors
Correct answer
DAny information needed to evaluate future actions, costs, and successors
Explanation
A state must contain all relevant information to determine future actions, costs, and successors, such as location, tickets, or last action.
- A
- 5
To enforce a constraint that the tram cannot be taken twice in a row, what additional field should the state include?
- A
The total number of steps taken
- B
The current location modulo 2
- C
The number of tickets remaining
- D
Whether the last action was taking the tram
Correct answer
DWhether the last action was taking the tram
Explanation
To prevent two consecutive tram rides, the state must record whether the last action was a tram ride, so that the successor function can exclude tram if it was.
- A
- 6
What is the future cost of a state?
- A
The minimum total cost from that state to any end state
- B
The expected cost of a random rollout from that state
- C
The cost of the cheapest action from that state
- D
The number of steps needed to reach an end state
Correct answer
AThe minimum total cost from that state to any end state
Explanation
Future cost of a state is the cost of the minimum-cost solution from that state to an end state, defined recursively via the recurrence.
- A
- 7
What is the recurrence for future cost in exhaustive search?
- A
future_cost(S) = min over successors (cost(action) + future_cost(S'))
- B
future_cost(S) = cost(action) + future_cost(S') for the first action
- C
future_cost(S) = max over successors (cost(action) + future_cost(S'))
- D
future_cost(S) = sum over successors (cost(action) + future_cost(S'))
Correct answer
Afuture_cost(S) = min over successors (cost(action) + future_cost(S'))
Explanation
The future cost is the minimum over all possible successors of the immediate action cost plus the future cost from the resulting state.
- A
- 8
What are the time and memory complexities of exhaustive search in terms of the state space?
- A
Time: quadratic in number of states; Memory: linear in number of states
- B
Time: linear in number of states; Memory: exponential in solution length
- C
Time: exponential in number of states; Memory: linear in solution length
- D
Time: exponential in solution length; Memory: exponential in number of states
Correct answer
CTime: exponential in number of states; Memory: linear in solution length
Explanation
Exhaustive search explores all paths, leading to exponential time, but memory is linear in the depth of recursion (solution length).
- A
- 9
Why can exhaustive search fail to terminate in graphs with cycles?
- A
Because the recursion depth may exceed the maximum call stack size
- B
Because cycles create infinite paths with no end state
- C
Because the future cost recurrence becomes undefined
- D
Because the algorithm never visits the same state twice
Correct answer
BBecause cycles create infinite paths with no end state
Explanation
If cycles exist, the search may loop infinitely, never reaching an end state, unless a step limit or cycle detection is added.
- A
- 10
How does dynamic programming improve upon exhaustive search?
- A
By randomly sampling actions to reduce the search space
- B
By using a cache to avoid recomputing future cost for states already visited
- C
By using a heuristic to guide the order of exploration
- D
By pruning actions with high cost during the search
Correct answer
BBy using a cache to avoid recomputing future cost for states already visited
Explanation
Dynamic programming caches the future cost for each state, so each state is computed only once, reducing time to proportional to number of states.
- A
- 11
What is the time complexity of dynamic programming for solving a search problem?
- A
Exponential in the number of states
- B
Quadratic in the number of actions
- C
Linear in the number of states
- D
Linear in the solution length
Correct answer
CLinear in the number of states
Explanation
With caching, each state is computed exactly once, so time is O(number of states × average successors), which is typically linear in number of states.
- A
- 12
When is dynamic programming particularly advantageous over exhaustive search?
- A
When the state space is very large and does not fit in memory
- B
When there are many different paths leading to the same state
- C
When the solution length is very short
- D
When actions always lead to new, unique states
Correct answer
BWhen there are many different paths leading to the same state
Explanation
DP is useful when many paths converge to the same state, so caching avoids redundant computation. If all paths are unique, DP offers little benefit.
- A
- 13
What is a major limitation of dynamic programming?
- A
It requires all action costs to be non-negative
- B
It only works for problems with a single end state
- C
It cannot handle cycles in the state graph
- D
It needs to store solutions for all states, which may exceed memory
Correct answer
DIt needs to store solutions for all states, which may exceed memory
Explanation
DP caches solutions for every state, requiring memory proportional to the number of states, which can be infeasible for large state spaces.
- A
- 14
What does the 'best of n' algorithm do?
- A
It generates n random paths from start to end and selects the one with lowest cost
- B
It keeps the n best partial solutions at each step and expands them iteratively
- C
It runs n parallel exhaustive searches and returns the best overall solution
- D
It uses a heuristic to compare n candidate actions and picks the best one
Correct answer
AIt generates n random paths from start to end and selects the one with lowest cost
Explanation
Best of n performs n independent rollouts (random simulations) from start to end, then returns the solution with the lowest cost.
- A
- 15
What is a key advantage of best of n search?
- A
It is embarrassingly parallelizable
- B
It always produces deterministic results
- C
It guarantees finding the optimal solution
- D
It uses very little memory regardless of state space size
Correct answer
AIt is embarrassingly parallelizable
Explanation
Each rollout is independent, so best of n can be easily parallelized across multiple machines without communication.
- A
- 16
How does beam search differ from best of n?
- A
All of the above
- B
Beam search explores paths sequentially rather than in parallel
- C
Beam search is deterministic while best of n is stochastic
- D
Beam search uses a beam width to keep multiple partial solutions at each step
Correct answer
AAll of the above
Explanation
Beam search is deterministic (if ties are broken deterministically), it explores sequentially by expanding a set of candidates at each step, and it maintains a fixed number (beam width) of partial solutions.
- A
- 17
In beam search, what happens when the number of candidate solutions exceeds the beam width?
- A
Random candidates are dropped to maintain the beam width
- B
They are all kept but with lower priority
- C
The beam width is increased to accommodate all candidates
- D
The candidates are sorted by cost and only the top beam width are kept
Correct answer
DThe candidates are sorted by cost and only the top beam width are kept
Explanation
At each step, all candidates are sorted by their total cost, and only the best beam width candidates are retained for the next iteration.
- A
- 18
What is beam search equivalent to when the beam width is 1?
- A
Greedy search
- B
Dynamic programming
- C
Best of n with n=1
- D
Exhaustive search
Correct answer
AGreedy search
Explanation
With beam width 1, only the single best partial solution is kept at each step, which is the greedy algorithm.
- A
- 19
In the context of language model search, what is the cost of an action?
- A
The negative log probability of the next token
- B
The probability of the next token
- C
The number of tokens generated so far
- D
The cross-entropy loss of the model
Correct answer
AThe negative log probability of the next token
Explanation
To maximize probability, we minimize negative log probability. So the cost is defined as -log P(next token | context).
- A
- 20
In a language model search problem, what does the state represent?
- A
The current token being predicted
- B
The hidden state of the model
- C
The prompt plus the prefix of the response generated so far
- D
The entire sequence of tokens including the prompt
Correct answer
CThe prompt plus the prefix of the response generated so far
Explanation
The state is a string containing the original prompt concatenated with the partial response generated so far.
- A
- 21
What is the purpose of a verifier in the language model search example?
- A
To select the next token from the model's output distribution
- B
To tokenize the input prompt
- C
To compute the probability of a generated sequence
- D
To check if a generated response is correct and provide a cost bonus
Correct answer
DTo check if a generated response is correct and provide a cost bonus
Explanation
The verifier returns a Boolean indicating correctness, and if correct, a large negative cost bonus (e.g., -100) is added to favor that solution.
- A
- 22
How does best-of-n sampling relate to test-time compute in language models?
- A
It caches intermediate computations to speed up generation
- B
It reduces the number of parameters needed for inference
- C
It generates multiple responses at inference time and selects the best one, using more compute to improve quality
- D
It trains the model to predict multiple tokens at once
Correct answer
CIt generates multiple responses at inference time and selects the best one, using more compute to improve quality
Explanation
Test-time compute refers to spending extra computation during inference to improve results; best-of-n is a simple method that does exactly that by sampling multiple responses.
- A
- 23
In the lecture, what was the solution for the travel problem with n=10 using best-of-n?
- A
tram, tram, walk, walk (cost 7)
- B
walk, walk, tram, tram (cost 7)
- C
walk, walk, walk, walk, tram (cost 6)
- D
walk, tram, walk, tram (cost 6)
Correct answer
Dwalk, tram, walk, tram (cost 6)
Explanation
The optimal solution found was walk, tram, walk, tram with total cost 6, verified by exhaustive search and dynamic programming.
- A

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