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

Study methods

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

Deep Reinforcement Learning

  • 46Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: RL Fundamentals
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is deep reinforcement learning?

Tap to flipClick to flipspace

The marriage of deep learning and reinforcement learning, where neural networks are used to approximate value functions or policies.

Or swipe the card

46 cards

  1. What is deep reinforcement learning?

    The marriage of deep learning and reinforcement learning, where neural networks are used to approximate value functions or policies.

  2. Why is supervised learning insufficient for games like Go?

    Too many possible states, ill-defined ground truth (even experts are not perfect), and lack of strategy learning (one-off decisions).

  3. What is the key difference between supervised learning and reinforcement learning?

    In supervised learning you teach by example; in reinforcement learning you teach by experience.

  4. Define agent, environment, state, and action in RL.

    Agent: the learner/decision-maker. Environment: the world the agent interacts with. State: a representation of the current situation. Action: a move the agent can take.

  5. What is the difference between observation and state in RL?

    Observation may be a partial view of the full state (e.g., fog in Starcraft). In fully observable environments, observation equals state.

  6. What is a transition in RL?

    The process of moving from state s to state s' after taking action a, observing reward r and next observation.

  7. What is a reward in RL?

    A scalar signal given by the environment to indicate how good the agent's action was at a particular state.

  8. What is a terminal state in RL?

    A state that ends an episode (e.g., finishing a game or reaching a goal). No further actions are taken.

  9. What is an episode in RL?

    One complete run from initial state to terminal state.

  10. Define return in RL.

    The discounted sum of future rewards: Rt=rt+γrt+1+γ2rt+2+…R_t = r_t + \gamma r_{t+1} + \gamma^2 r_{t+2} + \dotsRt​=rt​+γrt+1​+γ2rt+2​+….

  11. What is the purpose of the discount factor γ\gammaγ?

    It trades off immediate vs future rewards; encourages shorter strategies and accounts for uncertainty/energy.

  12. Define policy in Q-learning.

    The policy is π(s)=arg⁡max⁡aQ∗(s,a)\pi(s) = \arg\max_a Q^*(s, a)π(s)=argmaxa​Q∗(s,a), choosing the action with highest Q-value.

  13. What is a Q-table and what does each entry represent?

    A matrix of size (states × actions). Entry Q(s,a)Q(s,a)Q(s,a) represents how good it is to take action a in state s.

  14. State the Bellman optimality equation.

    Q∗(s,a)=r+γmax⁡a′Q∗(s′,a′)Q^*(s,a) = r + \gamma \max_{a'} Q^*(s', a')Q∗(s,a)=r+γmaxa′​Q∗(s′,a′)

  15. How is the Bellman equation used in Q-learning?

    It provides a target for updating Q-values: Q(s,a)←r+γmax⁡a′Q(s′,a′)Q(s,a) \leftarrow r + \gamma \max_{a'} Q(s', a')Q(s,a)←r+γmaxa′​Q(s′,a′).

  16. How does Q-learning work with backtracking in a known environment?

    Starting from terminal states, propagate discounted future rewards backward to compute Q-values for each state-action pair.

  17. Why can't Q-tables be used for large state/action spaces?

    The table would be too large to store and compute, e.g., in Go with 33613^{361}3361 possible states.

  18. How does deep Q-learning address the Q-table problem?

    Uses a neural network as a function approximator for Q(s, a), avoiding explicit storage of all states.

  19. What is the typical architecture of a deep Q-network for Atari games?

    Convolutional layers with ReLU, followed by fully connected layers, outputting Q-values for each action (e.g., 3 for Breakout).

  20. How is the target Y computed in deep Q-learning?

    Y=r+γmax⁡a′Q(s′,a′)Y = r + \gamma \max_{a'} Q(s', a')Y=r+γmaxa′​Q(s′,a′), where Q(s′,a′)Q(s', a')Q(s′,a′) is from the current Q-network.

  21. Why is the target Y in DQN treated as fixed during backpropagation?

    To avoid differentiating through the target, allowing standard supervised learning updates.

  22. What is experience replay and how does it work?

    Store transitions (s, a, r, s') in a replay buffer and sample random minibatches for training.

  23. Why is experience replay beneficial for DQN?

    It reduces sample correlation, increases data efficiency, and stabilizes training.

  24. What is epsilon-greedy exploration?

    With probability epsilon, take a random action; otherwise, take the action with highest Q-value.

  25. Why is exploration important in RL?

    To avoid local optima and discover better strategies that may not be found by always exploiting.

  26. How is terminal state handled in Q-learning target computation?

    The target is simply the immediate reward: Y=rY = rY=r (no future discount).

  27. What preprocessing steps are common for Atari games in DQN?

    Convert to grayscale, crop the score and borders, and stack the last 4 frames.

  28. Why are multiple frames stacked as input in DQN?

    To capture the velocity/direction of moving objects (e.g., the ball in Breakout).

  29. Why is deep Q-learning challenging for games like Montezuma's Revenge?

    Sparse and heavily delayed rewards; requires many correct steps without any positive reward.

  30. What is PPO (Proximal Policy Optimization)?

    A policy gradient method that learns the policy directly, using a clipped objective to stabilize updates.

  31. Why is PPO better suited for continuous action spaces than Q-learning?

    Q-learning requires discretizing continuous actions, while PPO can output continuous parameters directly.

  32. What is competitive self-play in RL?

    Multiple copies of the same agent play against each other, with the best model periodically copied to others.

  33. What insight did AlphaGo demonstrate about RL optimality?

    The agent optimizes solely for winning, not for a large margin; it may make unintuitive moves that humans consider suboptimal.

  34. What are two problems with pretrained language models?

    1. Trained on web data, not to be helpful. 2) No concept of good/polite/helpful responses.
  35. What is supervised fine-tuning (SFT) for LLMs?

    Fine-tuning a pretrained LM on human-written prompt-response pairs to make it more helpful.

  36. What are limitations of SFT?

    Costly to collect human-written data, only imitates not optimizes preferences, and may not generalize to unseen prompts.

  37. What is the goal of RLHF?

    To align language models with human preferences by optimizing for reward from a learned reward model.

  38. How does RLHF differ from SFT?

    SFT imitates human demonstrations; RLHF optimizes for human preferences via reinforcement learning from a reward model.

  39. What is the role of human demonstrations in SFT?

    They provide examples of helpful behavior that the model learns to imitate through supervised learning.

  40. What is the reward model in RLHF?

    A separate model trained to predict human preference by scoring responses; used as a proxy for human evaluators.

  41. How is the reward model trained?

    On pairwise comparisons: given a prompt and two responses, a human labeler indicates which is better; the model learns to assign higher reward to preferred responses.

  42. How is the reward model initialized?

    From the SFT model by replacing the softmax output layer with a linear layer that outputs a scalar reward.

  43. Why is a reward model used instead of direct human evaluation in RLHF?

    It scales to evaluate many responses quickly and cheaply, without needing a human for each evaluation.

  44. What constitutes an episode in RLHF for LLMs?

    One full prompt: the agent generates tokens until completion, then receives a reward from the reward model.

  45. Why is RLHF generally better than SFT for alignment?

    It directly optimizes for human preferences rather than mere imitation, leading to more helpful and preferred responses.

  46. What is the role of human feedback in RLHF?

    Humans provide pairwise comparisons to train the reward model, which then guides the RL agent to produce preferred responses.

Card 1 of 46
Card 1 of 46

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent