lecture 14 batch rl
play

Lecture 14: Batch RL Emma Brunskill CS234 Reinforcement Learning. - PowerPoint PPT Presentation

Lecture 14: Batch RL Emma Brunskill CS234 Reinforcement Learning. Winter 2020 Slides drawn from Philip Thomas with modifications *Note: we only went carefully through slides before slide 34. The remaining slides are kept for those interested


  1. Lecture 14: Batch RL Emma Brunskill CS234 Reinforcement Learning. Winter 2020 Slides drawn from Philip Thomas with modifications *Note: we only went carefully through slides before slide 34. The remaining slides are kept for those interested but will not be material required for the quiz. See the last slide for a summary of what you should know Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  2. Refresh Your Understanding: Fast RL III Select all that are true: • Thompson sampling for MDPs the posterior over the dynamics can be updated after each transition • When using a Beta prior for a Bernoulli reward parameter for an (s,a) pair, the posterior after N samples of that pair time steps can be the same as after N+2 samples • The optimism bonuses discussed for MBIE-EB depend on the maximum reward but not on the maximum value function • In class we discussed adding a bonus term to the policy gradient update for a (s,a,r,s’) tuple using Q-learning with function approximation. Adding this bonus term will ensure all Q estimates used to make decisions online using DQN are optimistic with respect to Q* • Not sure Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  3. Class Structure • Last time: Fast Reinforcement Learning • This time: Batch RL • Next time: Guest Lecture Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  4. A Scientific Experiment Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  5. A Scientific Experiment Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  6. What Should We Do For a New Student? Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  7. Involves Counterfactual Reasoning Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  8. Involves Generalization Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  9. Batch Reinforcement Learning Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  10. Batch RL Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  11. Batch RL Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  12. The Problem • If you apply an existing method, do you have confidence that it will work? Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  13. A property of many real applications • Deploying "bad" policies can be costly or dangerous Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  14. What property should a safe batch reinforcement learning algorithm have? • Given past experience from current policy/policies, produce a new policy • “Guarantee that with probability at least 1 − δ , will not change your policy to one that is worse than the current policy.” • You get to choose δ • Guarantee not contingent on the tuning of any hyperparameters Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  15. Table of Contents Notation 1 Create a safe batch reinforcement learning algorithm 2 Off-policy policy evaluation (OPE) Safe policy improvement (SPI) Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  16. Notation � ) = P ( a t = a � � � s t = s ) • Policy π : π ( a • Trajectory: T = ( s 1 , a 1 , r 1 , s 2 , a 2 , r 2 , · · · , s L , a L , r L ) • Historical data: D = { T 1 , T 2 , · · · , T n } • Historical data from behavior policy, π b • Objective: L V π = E [ � � π ] γ t R t � t = 1 Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  17. Safe batch reinforcement learning algorithm • Reinforcement learning algorithm, A • Historical data, D , which is a random variable • Policy produced by the algorithm, A ( D ) , which is a random variable • a safe batch reinforcement learning algorithm, A , satisfies: Pr ( V A ( D ) ≥ V π b ) ≥ 1 − δ or, in general Pr ( V A ( D ) ≥ V min ) ≥ 1 − δ Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  18. Table of Contents Notation 1 Create a safe batch reinforcement learning algorithm 2 Off-policy policy evaluation (OPE) Safe policy improvement (SPI) Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  19. Create a safe batch reinforcement learning algorithm • Off-policy policy evaluation (OPE) • For any evaluation policy, π e , Convert historical data, D , into n independent and unbiased estimates of V π e • High-confidence off-policy policy evaluation (HCOPE) • Use a concentration inequality to convert the n independent and unbiased estimates of V π e into a 1 − δ confidence lower bound on V π e • Safe policy improvement (SPI) • Use HCOPE method to create a safe batch reinforcement learning algorithm, • Methods today focused on work by Philip Thomas UAI and ICML 2015 papers. Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  20. Off-policy policy evaluation (OPE) Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  21. High-confidence off-policy policy evaluation (HCOPE) Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  22. Safe policy improvement (SPI) Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  23. Create a safe batch reinforcement learning algorithm • Off-policy policy evaluation (OPE) • For any evaluation policy, π e , Convert historical data, D , into n independent and unbiased estimates of V π e • High-confidence off-policy policy evaluation (HCOPE) • Use a concentration inequality to convert the n independent and unbiased estimates of V π e into a 1 − δ confidence lower bound on V π e • Safe policy improvement (SPI) • Use HCOPE method to create a safe batch reinforcement learning algorithm, Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  24. Monte Carlo (MC) Off Policy Evaluation • Aim: estimate value of policy π 1 , V π 1 ( s ) , given episodes generated under behavior policy π 2 • s 1 , a 1 , r 1 , s 2 , a 2 , r 2 , . . . where the actions are sampled from π 2 • G t = r t + γ r t + 1 + γ 2 r t + 2 + γ 3 r t + 3 + · · · in MDP M under policy π • V π ( s ) = E π [ G t | s t = s ] • Have data from a different policy, behavior policy π 2 • If π 2 is stochastic, can often use it to estimate the value of an alternate policy (formal conditions to follow) • Again, no requirement that have a model nor that state is Markov Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  25. Monte Carlo (MC) Off Policy Evaluation: Distribution Mismatch • Distribution of episodes & resulting returns differs between policies Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  26. Importance Sampling • Goal: estimate the expected value of a function f ( x ) under some probability distribution p ( x ) , E x ∼ p [ f ( x )] • Have data x 1 , x 2 , . . . , x n sampled from distribution q ( s ) • Under a few assumptions, we can use samples to obtain an unbiased estimate of E x ∼ q [ f ( x )] Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

  27. Importance Sampling � E x ∼ q [ f ( x )] = q ( x ) f ( x ) x Winter 2020 Slides drawn from Philip Thomas Emma Brunskill (CS234 Reinforcement Learning. )Lecture 14: Batch RL / 70

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend