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

  • 31Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Machine Learning Paradigms
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What are the three paradigms of machine learning?

Tap to flipClick to flipspace

Supervised learning, unsupervised learning, and reinforcement learning.

Or swipe the card

31 cards

  1. What are the three paradigms of machine learning?

    Supervised learning, unsupervised learning, and reinforcement learning.

  2. How does reinforcement learning differ from supervised learning in terms of feedback?

    Supervised learning uses labels or correct reference values for each data point, while reinforcement learning uses sparse reward signals that occur sporadically.

  3. What psychological concept inspires reinforcement learning?

    Operant conditioning.

  4. Define sparse reward signals in reinforcement learning.

    Reward signals that occur sporadically or only at the end of an episode, making learning more difficult.

  5. In reinforcement learning, what happens to sequences of actions that lead to good results?

    They are reinforced to occur more frequently.

  6. What is an episode in reinforcement learning?

    A round of execution in the environment with a beginning and an end, after which the agent resets to the initial state.

  7. List the four characteristics of the grid world environment used in the example.

    Episodic, discrete, fully observable, and deterministic.

  8. What is a state in the grid world?

    Each square on the grid represents a state; there are 16 possible states in a 4x4 grid.

  9. What are Q-values in Q-learning?

    Quality values that represent the expected cumulative reward from taking a specific action in a given state and then following the optimal policy thereafter.

  10. How are Q-values initialized in Q-learning according to the example?

    Initially set to zero for all state-action pairs.

  11. Why is it important to randomly select among tied Q-values when choosing an action?

    To prevent the agent from getting stuck in a loop (e.g., always choosing left and hitting a wall).

  12. Write the basic Q-learning update rule (without discount or learning rate).

    Q(s,a)←Q(s,a)+α(r+γmax⁡a′Q(s′,a′)−Q(s,a))Q(s, a) \leftarrow Q(s, a) + \alpha \left( r + \gamma \max_{a'} Q(s', a') - Q(s, a) \right)Q(s,a)←Q(s,a)+α(r+γmaxa′​Q(s′,a′)−Q(s,a))

  13. What is a policy in reinforcement learning?

    A function that maps a state to the action to be taken.

  14. What is the exploration vs exploitation dilemma?

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

  15. Explain epsilon-greedy exploration.

    With probability epsilon, choose a random action; otherwise, choose the best action (highest Q-value).

  16. What is the purpose of the discount factor gamma in Q-learning?

    To make rewards further away worth less than immediate rewards, enabling the agent to prefer shorter paths.

  17. How does the discount factor gamma affect the Q-value update?

    It multiplies the maximum Q-value of the next state: r+γmax⁡a′Q(s′,a′)r + \gamma \max_{a'} Q(s', a')r+γmaxa′​Q(s′,a′) so that future rewards are discounted.

  18. What is the learning rate alpha in Q-learning?

    A parameter that controls how much new information overrides old information, typically between 0 and 1.

  19. Why is a lower alpha needed in non-deterministic (stochastic) environments?

    To average out the effects of randomness and avoid drastic updates from occasional bad outcomes.

  20. Write the full Q-learning update formula including alpha, gamma, reward, and max Q.

    Q(s,a)←Q(s,a)+α(r+γmax⁡a′Q(s′,a′)−Q(s,a))Q(s, a) \leftarrow Q(s, a) + \alpha \left( r + \gamma \max_{a'} Q(s', a') - Q(s, a) \right)Q(s,a)←Q(s,a)+α(r+γmaxa′​Q(s′,a′)−Q(s,a))

  21. What is optimistic initialization in Q-learning?

    Initializing Q-values to a high positive value (e.g., 100) instead of zero.

  22. How does optimistic initialization promote exploration?

    The agent will choose untried actions because they have high initial values; after trying, the values decrease, naturally reducing interest in poor actions.

  23. Why must terminal states be handled specially in the Q-learning update?

    Because terminal states have no future; the expected future reward should be zero, not the discounted maximum Q.

  24. What does the reset method in the environment class do?

    It places the agent back in the initial state (bottom-left corner) and returns a copy of that state.

  25. What is the purpose of the act method in the environment?

    It takes an action (0: up, 1: right, 2: down, 3: left) and updates the agent's position, applies stumble probability, enforces walls, and returns the new state, reward, and whether the state is terminal.

  26. What is the role of the epsilon parameter in the agent?

    The probability of choosing a random action (exploration) instead of the best action (exploitation).

  27. What do get_max_Q and get_best_action do?

    get_max_Q returns the highest Q-value for a given state; get_best_action returns one of the actions with the highest Q-value, breaking ties randomly.

  28. How does the update method implement the Q-learning formula?

    It calculates: self.qtable[row][col][action]+=alpha∗(reward+gamma∗maxnextq−currentq)self.q_table[row][col][action] += alpha * (reward + gamma * max_next_q - current_q)self.qt​able[row][col][action]+=alpha∗(reward+gamma∗maxn​extq​−currentq​) where max_next_q is obtained from the new state.

  29. What effect does setting alpha=1 have on learning?

    The Q-value is completely replaced by the new target (reward + gamma * max_next_q) in one step, leading to fast learning but instability in stochastic environments.

  30. What happens when exploration is insufficient?

    The agent may never discover certain states or actions, resulting in suboptimal policies or getting stuck.

  31. How can learning be improved in a stochastic (non-deterministic) environment?

    Reduce the learning rate alpha (e.g., to 0.2) and increase the number of episodes to allow more averaging.

Card 1 of 31
Card 1 of 31

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent