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

Study methods

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

Reinforcement Learning Overview

  • 20Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Reinforcement Learning Basics

What is the third paradigm of machine learning introduced in the lecture?

20 questions

  1. 1

    What is the third paradigm of machine learning introduced in the lecture?

    1. A

      Deep learning

    2. B

      Supervised learning

    3. C

      Reinforcement learning

    4. D

      Unsupervised learning

    Correct answer
    C

    Reinforcement learning

    Explanation

    The lecture explicitly introduces reinforcement learning as the third paradigm, after supervised and unsupervised learning.

  2. 2

    Which psychological concept is reinforcement learning inspired by?

    1. A

      Observational learning

    2. B

      Cognitive dissonance

    3. C

      Classical conditioning

    4. D

      Operant conditioning

    Correct answer
    D

    Operant conditioning

    Explanation

    The lecture states that reinforcement learning is inspired by operant conditioning in psychology.

  3. 3

    How does reinforcement learning primarily differ from supervised learning?

    1. A

      Reinforcement learning uses labeled data for every input

    2. B

      Reinforcement learning requires a neural network

    3. C

      Reinforcement learning only works with discrete environments

    4. D

      Reinforcement learning uses sparse reward signals and sequences of actions

    Correct answer
    D

    Reinforcement learning uses sparse reward signals and sequences of actions

    Explanation

    The lecture emphasizes that reinforcement learning learns through sparse reward signals and sequences of actions, unlike supervised learning which has labels for each data point and learns by error.

  4. 4

    In the 4x4 grid example, what is an episode?

    1. A

      A round of execution from start to one of the terminal states, after which the environment resets

    2. B

      A graphical representation of the policy

    3. C

      A single action taken by the agent

    4. D

      The entire training process of the Q-learning algorithm

    Correct answer
    A

    A round of execution from start to one of the terminal states, after which the environment resets

    Explanation

    The lecture defines an episode as a round of execution in the environment with a beginning and an end, after which the agent resets to the initial state.

  5. 5

    What makes the grid environment discrete?

    1. A

      The actions are limited to four directions

    2. B

      The agent can only move in integer steps

    3. C

      The rewards are only integers

    4. D

      The state space consists of a finite, countable set of positions (16 squares)

    Correct answer
    D

    The state space consists of a finite, countable set of positions (16 squares)

    Explanation

    The lecture states that the problem is discrete because the agent will always be in one of 16 possible states, which are finite and countable.

  6. 6

    What does it mean for an environment to be fully observable?

    1. A

      The agent has access to the entire state of the environment without hidden information

    2. B

      The rewards are visible to the agent before acting

    3. C

      The agent can see all future states

    4. D

      The environment has no randomness

    Correct answer
    A

    The agent has access to the entire state of the environment without hidden information

    Explanation

    The lecture explains that fully observable means the agent knows exactly where it is and has no hidden information.

  7. 7

    In the deterministic grid environment, what happens when the agent tries to move upward from the top row?

    1. A

      It stays in the same square

    2. B

      It moves to a random adjacent square

    3. C

      It falls into the trap

    4. D

      It wraps around to the bottom row

    Correct answer
    A

    It stays in the same square

    Explanation

    The lecture explicitly states that if the agent is at the top and tries to move upward, it stays in the same place because of a wall.

  8. 8

    What do Q-values represent?

    1. A

      The expected cumulative reward from taking that action in that state and then following the optimal policy

    2. B

      The number of times an action has been taken in a state

    3. C

      The probability of success for a given action

    4. D

      The immediate reward received for taking an action

    Correct answer
    A

    The expected cumulative reward from taking that action in that state and then following the optimal policy

    Explanation

    The lecture defines Q-values as 'how much reward the algorithm expects to accumulate from then on if it chooses that action and continues to always choose the best action.'

  9. 9

    How are Q-values initialized in the first example?

    1. A

      All zeros

    2. B

      Random values between -100 and 100

    3. C

      Optimistic values like 100

    4. D

      Based on the distance to the goal

    Correct answer
    A

    All zeros

    Explanation

    The lecture initializes all Q-values to zero in the initial example.

  10. 10

    Why is it important to randomly select among actions with tied Q-values?

    1. A

      To guarantee optimal policy

    2. B

      To speed up convergence of the algorithm

    3. C

      To ensure the agent always moves left

    4. D

      To prevent the agent from getting stuck in a loop or wall due to deterministic tie-breaking

    Correct answer
    D

    To prevent the agent from getting stuck in a loop or wall due to deterministic tie-breaking

    Explanation

    The lecture warns that if the agent always chooses the first action when tied (e.g., left), it will get stuck hitting a wall and never learn. Random selection avoids this.

  11. 11

    What is the epsilon-greedy exploration strategy?

    1. A

      Gradually decrease epsilon over time

    2. B

      With probability epsilon, choose a random action; otherwise, choose the best action

    3. C

      Always choose the best action after epsilon episodes

    4. D

      With probability epsilon, choose the best action; otherwise, choose a random action

    Correct answer
    B

    With probability epsilon, choose a random action; otherwise, choose the best action

    Explanation

    The lecture defines epsilon-greedy as: 'with an epsilon probability ... we can choose a random action' instead of the best one. So random with probability epsilon, else best.

  12. 12

    What is the exploration-exploitation dilemma?

    1. A

      The balance between learning rate and discount factor

    2. B

      The conflict between immediate and delayed rewards

    3. C

      The choice between supervised and unsupervised learning

    4. D

      The trade-off between exploring new actions to discover better rewards and exploiting known actions to maximize reward

    Correct answer
    D

    The trade-off between exploring new actions to discover better rewards and exploiting known actions to maximize reward

    Explanation

    The lecture describes exploration as trying new actions (random) and exploitation as choosing the best known action, and the dilemma is balancing them.

  13. 13

    What problem does the discount factor gamma solve?

    1. A

      It prevents the agent from overestimating Q-values

    2. B

      It eliminates the need for exploration

    3. C

      It ensures that rewards further away are valued less, so the agent learns to prefer shorter paths

    4. D

      It makes the environment deterministic

    Correct answer
    C

    It ensures that rewards further away are valued less, so the agent learns to prefer shorter paths

    Explanation

    The lecture explains that gamma makes rewards further away worth less, so the agent prefers closer rewards and learns more direct paths.

  14. 14

    If gamma = 0.9, what is the Q-value of a state that leads to a state with max future Q = 100, after one step with no immediate reward?

    1. A

      10

    2. B

      90

    3. C

      100

    4. D

      0

    Correct answer
    B

    90

    Explanation

    The lecture shows that when copying, the value is multiplied by gamma. So 100 * 0.9 = 90.

  15. 15

    What is the purpose of the learning rate alpha?

    1. A

      It determines how often the agent explores randomly

    2. B

      It controls how much the Q-value is updated towards the target; a lower alpha makes learning slower but more stable

    3. C

      It sets the initial Q-values

    4. D

      It discounts future rewards

    Correct answer
    B

    It controls how much the Q-value is updated towards the target; a lower alpha makes learning slower but more stable

    Explanation

    The lecture explains that alpha determines how much the old value moves toward the new target, and a low alpha (0.2) prevents drastic changes.

  16. 16

    In the Q-learning update formula, what is the target value that the old Q-value moves toward?

    1. A

      immediate reward only

    2. B

      reward * gamma

    3. C

      max(Q(s', a'))

    4. D

      reward + gamma * max(Q(s', a'))

    Correct answer
    D

    reward + gamma * max(Q(s', a'))

    Explanation

    The formula is new_q = old_q + alpha * (reward + gamma * max(next_q) - old_q). The term in parentheses is the target minus old_q.

  17. 17

    How does the update rule change for a terminal state?

    1. A

      alpha is set to 1

    2. B

      gamma is set to 0

    3. C

      The reward is multiplied by gamma

    4. D

      The term gamma * max(next_q) is omitted because there is no future expectation

    Correct answer
    D

    The term gamma * max(next_q) is omitted because there is no future expectation

    Explanation

    The lecture explains that for terminal states, there is no future, so the formula is modified to remove the expected future term: only the immediate reward is used.

  18. 18

    What is a policy in reinforcement learning?

    1. A

      The environment's transition probabilities

    2. B

      A table of all Q-values

    3. C

      A function that maps a state to an action to be taken

    4. D

      The sequence of rewards obtained in an episode

    Correct answer
    C

    A function that maps a state to an action to be taken

    Explanation

    The lecture defines policy as 'a function that, given a state, returns the action that should be taken.'

  19. 19

    What is optimistic initialization?

    1. A

      Using a high learning rate

    2. B

      Setting initial Q-values to high positive numbers to encourage exploration

    3. C

      Exploiting only the best actions

    4. D

      Starting the agent from a random state

    Correct answer
    B

    Setting initial Q-values to high positive numbers to encourage exploration

    Explanation

    The lecture describes optimistic initialization as putting higher initial values so the agent is curious and tries actions that seem good, thus exploring implicitly.

  20. 20

    Why did the instructor implement a 'copy of the state' in the reset function?

    1. A

      To allow multiple agents to share the same state

    2. B

      To track the history of states

    3. C

      To improve performance by reusing memory

    4. D

      To avoid bugs where state changes unexpectedly due to mutable object references

    Correct answer
    D

    To avoid bugs where state changes unexpectedly due to mutable object references

    Explanation

    The lecture mentions that forgetting to return a copy caused the state to be altered in other parts of the code, leading to bugs. A copy prevents this.

Question 1 of 20
Question 1 of 20

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent