Reinforcement Learning

Size: px
Start display at page:

Download "Reinforcement Learning"

Transcription

1 Reinforcement Learning Temporal Difference Learning Temporal difference learning, TD prediction, Q-learning, elibigility traces. (many slides from Marc Toussaint) Vien Ngo MLR, University of Stuttgart

2 Outline Temporal Difference Learning Q-learning Eligibility Traces 2/??

3 Learning in MDPs Assume unknown MDP {S, A,,, γ} (the agent does not know P, R). While interacting with the world, the agent collects data of the form D = {(s t, a t, r t, s t+1 )} H t=1 (state, action, immediate reward, next state) 3/??

4 Learning in MDPs Assume unknown MDP {S, A,,, γ} (the agent does not know P, R). While interacting with the world, the agent collects data of the form D = {(s t, a t, r t, s t+1 )} H t=1 (state, action, immediate reward, next state) What could we learn from that? learn to predict next state: P (s s, a) learn to predict immediate reward: P (r s, a) (or R(s, a)) learn to predict value: s, a Q(s, a) learn to predict action: π(s, a) 3/??

5 Model-based versus Model-free Edward Tolman ( ) Purposive Behavior in Animals and Men (stimulus-stimulus, non-reinforcement driven) Clark Hull ( ) Principles of Behavior (1943) learn stimulus-response mappings based on reinforcement Wolfgang Köhler ( ) learn facts about the world that they could subsequently use in a flexible manner, rather than simply learning automatic responses 4/??

6 5/??

7 6/??

8 Introduction to Model-Free Methods Monte-Carlo Methods, On-Policy MC Control Temporal Difference Learning, On-Policy SARSA Algorithm Off-Policy Q-Learning Algorithm 7/??

9 Monte-Carlo Policy Evaluation MC policy evaluation: First-visit and every-visit methods Algorithm 1 MC-PE: policy evaluation of policy π 1: Given π; Returns(s) =, s S 2: while (!converged) do 3: Generate an episode τ = (s 0, a 0, r 0,..., s T 1, a T 1, r T 1, s T ) using π 4: for each state s t in τ do 5: Compute the return of s t: R(s t) = T l=t γl t r l 6: Either: For each s t in τ, add R(s t) into Returns(s t) once, first-visit Add R(s t) into Returns(s t), every-visit 7: Return V π (s) = average ( Returns(s) ) Converge!!! as the number of visits to all s goes to infinity. (Introduction to RL, Sutton & Barto 1998) 8/??

10 Monte-Carlo Policy Evaluation Alternatively, increment updates for MC-PE when obtaining a return R(s t ): V π (s t ) = V π (s t ) + α t ( R(st ) V (s t ) ) 9/??

11 Example: MC Method for Blackjack States is 3-dimensional: current sum (12-21), dealer s one showing card (ace-10), having a usable card (1/0) Actions: stick, hit Rewards: +1.0 if current sum is better than the dealer s R(, hit) = 0.0 if current sum is equal the dealer s 1.0 if current sum is worse than the dealer s 1.0 if current sum > 21 R(, hit) = 0.0 otherwise If current sum < 12, automatically do hit. 10/??

12 Example: MC Method for Blackjack Approximate value functions for the policy that sticks only on 20 or /??

13 On-Policy MC Control Algorithm Generalized policy iteration framework Algorithm 2 On-policy MC Control Algorithm 1: Init an initial policy π 0. 2: while (!converged) do 3: Policy Evaluation: π k Q π k (s, a), s, a 4: Policy Improvement: greedy action selection π k+1 (s) = arg max Q(s, a), s a 12/??

14 ɛ-greedy Policy The ɛ-greedy policy chooses actions with probability ɛ/ A + 1 ɛ if a = arg max a π(a s) = A Q(s, a ) ɛ/ A otherwise 13/??

15 ɛ-greedy Policy The ɛ-greedy policy chooses actions with probability ɛ/ A + 1 ɛ if a = arg max a π(a s) = A Q(s, a ) ɛ/ A otherwise Policy improvement: the improvement of a new ɛ-greedy policy π k+1 that is constructed upon the value functions Q π k (s, a) of the previous policy is Q π k (s, π k+1 (s)) = π k+1 (a s)q π k (s, a) a = ɛ Q π k (s, a) + (1 ɛ) max Q π k (s, a) A a a ɛ Q π k (s, a) + (1 ɛ) π(a s) ɛ/ A Q π k (s, a) A 1 ɛ a a = π(a s)q π k (s, a) = V π k (s) a Therefore V π k+1 (s) V π k (s) 13/??

16 MC Control Algorithm with ɛ-greedy Choose actions using ɛ-greedy. Converges!!! if ɛ k decreases to zero through time, e.g. ɛ k = 1/k (GLIE policy). A policy is GLIE (Greedy in the Limit with Infinite Exploration) if All state-action pairs are visited infinitely often. In the limit (k ), the policy becomes greedy where δ is a Dirac function. lim π k(a s) = δ a(arg max Q π k (s, a )) k a 14/??

17 MC Control Algorithm: Blackjack 15/??

18 Temporal difference (TD) learning TD Prediction (TD(0)) On-policy TD Control (SARSA Algorithm) Off-policy TD Control (Q-Learning) Eligibility Traces (TD(λ)) 16/??

19 Temporal difference (TD) Prediction recall [ ] V π (s) = E R(π(s), s) + γv π (s ) 17/??

20 Temporal difference (TD) Prediction recall [ ] V π (s) = E R(π(s), s) + γv π (s ) TD learning: Given a new experience (s, a, r, s ) V new (s) = (1 α) V old (s) + α [r + γv old (s )] }{{} TD target = V old (s) + α [r V old (s) + γv old (s )]. }{{} TD error 17/??

21 Temporal difference (TD) Prediction recall [ ] V π (s) = E R(π(s), s) + γv π (s ) TD learning: Given a new experience (s, a, r, s ) V new (s) = (1 α) V old (s) + α [r + γv old (s )] }{{} TD target = V old (s) + α [r V old (s) + γv old (s )]. }{{} TD error Reinforcement: more reward than expected (r > V old (s) γv old (s )) increase V (s) less reward than expected (r < V old (s) γv old (s )) decrease V (s) 17/??

22 TD Prediction vs. MC Prediction Figure: TD backup diagram Figure: MC backup diagram 18/??

23 TD Prediction vs. MC Prediction Driving Home Example Elapsed Time Predicted Predicted State (minutes) Time to Go Total Time leaving office, friday at reach car, raining exiting highway ndary road, behind truck entering home street arrive home /??

24 TD Prediction vs. MC Prediction Monte-Carlo method TD(0) (Introduction to RL, Sutton & Barto 1998) 20/??

25 TD Prediction vs. MC Prediction TD can learns before termination of epsisodes. TD can be used for either non-episodic or episodic tasks. The update depends on single stochastic transition lower variance. Updates use bootstrapping estimate has some bias. TD updates exploit the Markov property. MC learning must wait until the end of episodes. MC only works for episodic tasks. The update depends on a sequence of many stochastic transitions much larger variance. Unbiased estimate. MC updates does not exploit the Markov property, hence it can be effective in non-markov environment. 21/??

26 TD vs. MC: A Random Walk Example 22/??

27 On-Policy TD Control: SARSA 23/??

28 On-Policy TD Control: SARSA s,a r s' Figure: Learning on tuple (s, a, r, s, a ): SARSA a' Q-value updates: Q t+1 (s, a) = Q t (s, a) + α ( r t + γq t (s, a ) Q t (s, a) ) 24/??

29 On-Policy TD Control: SARSA Algorithm 3 SARSA Algorithm 1: Init Q(s, a), s S, a A 2: while (!converged) do 3: Init a starting state s 4: Select an action a from s using a policy derived from Q (e.g. ɛ-greedy) 5: for each episode do 6: Execute a, observe r, s 7: Select an action a from s using a policy derived from Q (e.g. ɛ-greedy) ( 8: Update: Q t+1(s, a) = Q t(s, a) + α t r + γqt(s, a ) Q t(s, a) ) 9: s s ; a a 25/??

30 The SARSA s Q values converges w.p.1 to the optimal values as long as the learning rates satisfy, α t (s, a) = t αt 2 (s, a) < t the policies π t (s, a) derived from Q t (s, a) are GLIE policies. 26/??

31 SARSA on Windy Gridworld Example reward is -1.0 at non-terminal state (cell G). each move is shifted upward along the wind direction, the strength in number of cells shifted upwards is given below each column. 27/??

32 y-axis shows the accumulated number of goal reaching. 28/??

33 Off-Policy TD Control: Q-Learning 29/??

34 Off-Policy TD Control: Q-Learning Off-Policy MC? Importance sampling to estimate the following expectation of returns: [ ] E τ P (τ) ρ(τ) = ρ(τ)p (τ)dτ = ρ(τ) P (τ) P (τ)dτ P [(τ) ] = E τ P (τ) ρ(τ) P (τ) P (τ) 1 N [ N i=1 ρ(τ i ) P (τ i) P (τ i ) Denote a trajectory distribution P π (τ), where τ = {s 0, a 0, s 1, a 1, } ] P π (τ) = P 0 (s 0 ) P (s t+1 s t, a t )µ(a t s t ) 30/??

35 Assuming in MC Control, the control policy used to generate data is µ(a s) (i.e. P (τ)). The target policy is π(a s) (i.e. P (τ)) Set importance weights as: w t = P (τ t) T P (τ t ) = π(a i s i ) µ(a i s i ) The MC value update becomes (when observing a return ρ t ): i=t V (s t ) V (s t ) + α(w t ρ t V (s t )) 31/??

36 Off-Policy TD Control: Q-Learning Off-Policy TD? The term ρ = r t + γv (s t+1 ) is estimated by importance sampling. The TD value update becomes (given a transition (s t, a t, r t, s t+1 )): ( π(at s t ) ) V (s t ) V (s t ) + α µ(a t s t ) (r t + γv (s t+1 )) V (s t ) 32/??

37 Off-Policy TD Control: Q-Learning The target policy is greedy: π(s t ) = arg max a Q(s t, a) The control policy is µ, e.g. ɛ-greedy w.r.t Q(s, a) 33/??

38 Off-Policy TD Control: Q-Learning Q-learning (Watkins, 1988) Given a new experience (s, a, r, s ) Q new (s, a) = (1 α) Q old (s, a) + α [r + γmax Q old (s, a )] a = Q old (s, a) + α [r t Q old (s, a) + γ max Q old (s, a)] a Reinforcement: more reward than expected (r > Q old (s, a) γ max a Q old (s, a)) increase Q(s, a) less reward than expected (r < Q old (s, a) γ max a Q old (s, a)) decrease Q(s, a) 34/??

39 Q-Learning (Introduction to RL, Sutton & Barto 1998) 35/??

40 Q-learning convergence with prob 1 Q-learning is a stochastic approximation of Q-Iteration: Q-learning: Q new(s, a) = (1 α)q old (s, a) + α[r + γ max a Q old (s, a )] Q-Iteration: s,a : Q k+1 (s, a) = R(s, a) + γ s P (s a, s) max a Q k (s, a ) We ve shown convergence of Q-VI to Q Convergence of Q-learning: Q-Iteration is a deterministic update: Q k+1 = T (Q k ) Q-learning is a stochastic version: Q k+1 = (1 α)q k + α[t (Q k ) + η k ] η k is zero mean! 36/??

41 Q-learning convergence with prob 1 The Q-learning algorithm converges w.p.1 as long as the learning rates satisfy, α t (s, a) = t αt 2 (s, a) < t (Watkins and Dayan, Q-learning. Machine Learning 1992) 37/??

42 Q-learning vs. SARSA: The Cliff Example 38/??

43 Q-Learning impact Q-Learning was the first provably convergent direct adaptive optimal control algorithm Great impact on the field of Reinforcement Learning smaller representation than models automatically focuses attention to where it is needed, i.e., no sweeps through state space though does not solve the exploration versus exploitation issue ɛ-greedy, optimistic initialization, etc,... 39/??

44 Unified View 40/??

45 Eligibility traces Temporal Difference: based on single experience (s 0, r 0, s 1 ) V new (s 0 ) = V old (s 0 ) + α[r 0 + γv old (s 1 ) V old (s 0 )] longer experience sequence, e.g.: (s 0, r 0, r 1, r 2, s 3 ) 41/??

46 Eligibility traces Temporal Difference: based on single experience (s 0, r 0, s 1 ) V new (s 0 ) = V old (s 0 ) + α[r 0 + γv old (s 1 ) V old (s 0 )] longer experience sequence, e.g.: (s 0, r 0, r 1, r 2, s 3 ) temporal credit assignment, think further backwards: receiving r 3 also tells us something about V (s 0 ) V new (s 0 ) = V old (s 0 ) + α[r 0 + γr 1 + γ 2 r 2 + γ 3 V old (s 3 ) V old (s 0 )] 41/??

47 Eligibility trace The error of n-step TD update V n t (s) = V n t (s) + α[r n t V n t (s)] where R n t is n-step returns R n t = r t + γr t γ n 1 r t+n 1 + γ n V t (s t+n ) The offline value update up to time T Error reduction T 1 V t (s) = V t (s) + α V t (s) t=0 V n t V π γ n V t V π 42/??

48 TD(λ): Forward View TD(λ) is the averaging of n-backups with different n Look into the future, and do MC-Evaluation then averaging weightedly: R λ t = (1 λ) λ n 1 Rt n n=1 43/??

49 TD(λ): Forward View TD(λ) is the averaging of n-backups with different n Rt λ = (1 λ) λ n 1 Rt n n=1 44/??

50 TD(λ): Forward View 19-State Random Walk Task. 45/??

51 TD(λ): Backward View Each step, eligibility traces for all states are updated γλe t 1 (s) e t (s) = γλe t 1 (s) s s t s = s t 46/??

52 TD(λ): Backward View TD(λ): remember where you ve been recently ( eligibility trace ) and update those values as well: e(s t) e(s t) + 1 s : V new(s) = V old (s) + α e(s) [r t + γv old (s t+1 ) V old (s t)] s : e(s) γλe(s) 47/??

53 TD(λ): Backward View TD(λ): remember where you ve been recently ( eligibility trace ) and update those values as well: e(s t) e(s t) + 1 s : V new(s) = V old (s) + α e(s) [r t + γv old (s t+1 ) V old (s t)] s : e(s) γλe(s) 47/??

54 TD(λ): Backward View 48/??

55 TD(λ): Backward vs. Forward Two view provides equivalent offline update (see the proof in Section 7.4, Introduction to RL book, Sutton & Barto). 49/??

56 SARSA(λ) 50/??

57 SARSA(λ): Example 51/??

58 Q(λ) The n-step return r t + γr t γ n 1 r t+n 1 + γ n max Q t (s t+n, a) a Q(λ) algorithm by Watkin 52/??

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Temporal Difference Learning Temporal difference learning, TD prediction, Q-learning, elibigility traces. (many slides from Marc Toussaint) Vien Ngo Marc Toussaint University of

More information

Temporal Difference. Learning KENNETH TRAN. Principal Research Engineer, MSR AI

Temporal Difference. Learning KENNETH TRAN. Principal Research Engineer, MSR AI Temporal Difference Learning KENNETH TRAN Principal Research Engineer, MSR AI Temporal Difference Learning Policy Evaluation Intro to model-free learning Monte Carlo Learning Temporal Difference Learning

More information

Temporal difference learning

Temporal difference learning Temporal difference learning AI & Agents for IET Lecturer: S Luz http://www.scss.tcd.ie/~luzs/t/cs7032/ February 4, 2014 Recall background & assumptions Environment is a finite MDP (i.e. A and S are finite).

More information

Chapter 7: Eligibility Traces. R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1

Chapter 7: Eligibility Traces. R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 7: Eligibility Traces R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Midterm Mean = 77.33 Median = 82 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction

More information

Machine Learning I Reinforcement Learning

Machine Learning I Reinforcement Learning Machine Learning I Reinforcement Learning Thomas Rückstieß Technische Universität München December 17/18, 2009 Literature Book: Reinforcement Learning: An Introduction Sutton & Barto (free online version:

More information

Reinforcement Learning. George Konidaris

Reinforcement Learning. George Konidaris Reinforcement Learning George Konidaris gdk@cs.brown.edu Fall 2017 Machine Learning Subfield of AI concerned with learning from data. Broadly, using: Experience To Improve Performance On Some Task (Tom

More information

Grundlagen der Künstlichen Intelligenz

Grundlagen der Künstlichen Intelligenz Grundlagen der Künstlichen Intelligenz Reinforcement learning Daniel Hennes 4.12.2017 (WS 2017/18) University Stuttgart - IPVS - Machine Learning & Robotics 1 Today Reinforcement learning Model based and

More information

Chapter 6: Temporal Difference Learning

Chapter 6: Temporal Difference Learning Chapter 6: emporal Difference Learning Objectives of this chapter: Introduce emporal Difference (D) learning Focus first on policy evaluation, or prediction, methods Compare efficiency of D learning with

More information

Chapter 6: Temporal Difference Learning

Chapter 6: Temporal Difference Learning Chapter 6: emporal Difference Learning Objectives of this chapter: Introduce emporal Difference (D) learning Focus first on policy evaluation, or prediction, methods hen extend to control methods R. S.

More information

Introduction to Reinforcement Learning. Part 5: Temporal-Difference Learning

Introduction to Reinforcement Learning. Part 5: Temporal-Difference Learning Introduction to Reinforcement Learning Part 5: emporal-difference Learning What everybody should know about emporal-difference (D) learning Used to learn value functions without human input Learns a guess

More information

Reinforcement Learning. Spring 2018 Defining MDPs, Planning

Reinforcement Learning. Spring 2018 Defining MDPs, Planning Reinforcement Learning Spring 2018 Defining MDPs, Planning understandability 0 Slide 10 time You are here Markov Process Where you will go depends only on where you are Markov Process: Information state

More information

arxiv: v1 [cs.ai] 5 Nov 2017

arxiv: v1 [cs.ai] 5 Nov 2017 arxiv:1711.01569v1 [cs.ai] 5 Nov 2017 Markus Dumke Department of Statistics Ludwig-Maximilians-Universität München markus.dumke@campus.lmu.de Abstract Temporal-difference (TD) learning is an important

More information

Monte Carlo is important in practice. CSE 190: Reinforcement Learning: An Introduction. Chapter 6: Temporal Difference Learning.

Monte Carlo is important in practice. CSE 190: Reinforcement Learning: An Introduction. Chapter 6: Temporal Difference Learning. Monte Carlo is important in practice CSE 190: Reinforcement Learning: An Introduction Chapter 6: emporal Difference Learning When there are just a few possibilitieo value, out of a large state space, Monte

More information

PART A and ONE question from PART B; or ONE question from PART A and TWO questions from PART B.

PART A and ONE question from PART B; or ONE question from PART A and TWO questions from PART B. Advanced Topics in Machine Learning, GI13, 2010/11 Advanced Topics in Machine Learning, GI13, 2010/11 Answer any THREE questions. Each question is worth 20 marks. Use separate answer books Answer any THREE

More information

Reinforcement Learning. Summer 2017 Defining MDPs, Planning

Reinforcement Learning. Summer 2017 Defining MDPs, Planning Reinforcement Learning Summer 2017 Defining MDPs, Planning understandability 0 Slide 10 time You are here Markov Process Where you will go depends only on where you are Markov Process: Information state

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Markov decision process & Dynamic programming Evaluative feedback, value function, Bellman equation, optimality, Markov property, Markov decision process, dynamic programming, value

More information

Lecture 3: Policy Evaluation Without Knowing How the World Works / Model Free Policy Evaluation

Lecture 3: Policy Evaluation Without Knowing How the World Works / Model Free Policy Evaluation Lecture 3: Policy Evaluation Without Knowing How the World Works / Model Free Policy Evaluation CS234: RL Emma Brunskill Winter 2018 Material builds on structure from David SIlver s Lecture 4: Model-Free

More information

Reinforcement Learning with Function Approximation. Joseph Christian G. Noel

Reinforcement Learning with Function Approximation. Joseph Christian G. Noel Reinforcement Learning with Function Approximation Joseph Christian G. Noel November 2011 Abstract Reinforcement learning (RL) is a key problem in the field of Artificial Intelligence. The main goal is

More information

Basics of reinforcement learning

Basics of reinforcement learning Basics of reinforcement learning Lucian Buşoniu TMLSS, 20 July 2018 Main idea of reinforcement learning (RL) Learn a sequential decision policy to optimize the cumulative performance of an unknown system

More information

Notes on Reinforcement Learning

Notes on Reinforcement Learning 1 Introduction Notes on Reinforcement Learning Paulo Eduardo Rauber 2014 Reinforcement learning is the study of agents that act in an environment with the goal of maximizing cumulative reward signals.

More information

The Book: Where we are and where we re going. CSE 190: Reinforcement Learning: An Introduction. Chapter 7: Eligibility Traces. Simple Monte Carlo

The Book: Where we are and where we re going. CSE 190: Reinforcement Learning: An Introduction. Chapter 7: Eligibility Traces. Simple Monte Carlo CSE 190: Reinforcement Learning: An Introduction Chapter 7: Eligibility races Acknowledgment: A good number of these slides are cribbed from Rich Sutton he Book: Where we are and where we re going Part

More information

Christopher Watkins and Peter Dayan. Noga Zaslavsky. The Hebrew University of Jerusalem Advanced Seminar in Deep Learning (67679) November 1, 2015

Christopher Watkins and Peter Dayan. Noga Zaslavsky. The Hebrew University of Jerusalem Advanced Seminar in Deep Learning (67679) November 1, 2015 Q-Learning Christopher Watkins and Peter Dayan Noga Zaslavsky The Hebrew University of Jerusalem Advanced Seminar in Deep Learning (67679) November 1, 2015 Noga Zaslavsky Q-Learning (Watkins & Dayan, 1992)

More information

Review: TD-Learning. TD (SARSA) Learning for Q-values. Bellman Equations for Q-values. P (s, a, s )[R(s, a, s )+ Q (s, (s ))]

Review: TD-Learning. TD (SARSA) Learning for Q-values. Bellman Equations for Q-values. P (s, a, s )[R(s, a, s )+ Q (s, (s ))] Review: TD-Learning function TD-Learning(mdp) returns a policy Class #: Reinforcement Learning, II 8s S, U(s) =0 set start-state s s 0 choose action a, using -greedy policy based on U(s) U(s) U(s)+ [r

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Function approximation Daniel Hennes 19.06.2017 University Stuttgart - IPVS - Machine Learning & Robotics 1 Today Eligibility traces n-step TD returns Forward and backward view Function

More information

Machine Learning. Reinforcement learning. Hamid Beigy. Sharif University of Technology. Fall 1396

Machine Learning. Reinforcement learning. Hamid Beigy. Sharif University of Technology. Fall 1396 Machine Learning Reinforcement learning Hamid Beigy Sharif University of Technology Fall 1396 Hamid Beigy (Sharif University of Technology) Machine Learning Fall 1396 1 / 32 Table of contents 1 Introduction

More information

https://www.youtube.com/watch?v=ymvi1l746us Eligibility traces Chapter 12, plus some extra stuff! Like n-step methods, but better! Eligibility traces A mechanism that allow TD, Sarsa and Q-learning to

More information

Reinforcement Learning II

Reinforcement Learning II Reinforcement Learning II Andrea Bonarini Artificial Intelligence and Robotics Lab Department of Electronics and Information Politecnico di Milano E-mail: bonarini@elet.polimi.it URL:http://www.dei.polimi.it/people/bonarini

More information

Lecture 8: Policy Gradient

Lecture 8: Policy Gradient Lecture 8: Policy Gradient Hado van Hasselt Outline 1 Introduction 2 Finite Difference Policy Gradient 3 Monte-Carlo Policy Gradient 4 Actor-Critic Policy Gradient Introduction Vapnik s rule Never solve

More information

Introduction to Reinforcement Learning. CMPT 882 Mar. 18

Introduction to Reinforcement Learning. CMPT 882 Mar. 18 Introduction to Reinforcement Learning CMPT 882 Mar. 18 Outline for the week Basic ideas in RL Value functions and value iteration Policy evaluation and policy improvement Model-free RL Monte-Carlo and

More information

CS599 Lecture 1 Introduction To RL

CS599 Lecture 1 Introduction To RL CS599 Lecture 1 Introduction To RL Reinforcement Learning Introduction Learning from rewards Policies Value Functions Rewards Models of the Environment Exploitation vs. Exploration Dynamic Programming

More information

Open Theoretical Questions in Reinforcement Learning

Open Theoretical Questions in Reinforcement Learning Open Theoretical Questions in Reinforcement Learning Richard S. Sutton AT&T Labs, Florham Park, NJ 07932, USA, sutton@research.att.com, www.cs.umass.edu/~rich Reinforcement learning (RL) concerns the problem

More information

Reinforcement learning

Reinforcement learning Reinforcement learning Based on [Kaelbling et al., 1996, Bertsekas, 2000] Bert Kappen Reinforcement learning Reinforcement learning is the problem faced by an agent that must learn behavior through trial-and-error

More information

Lecture 23: Reinforcement Learning

Lecture 23: Reinforcement Learning Lecture 23: Reinforcement Learning MDPs revisited Model-based learning Monte Carlo value function estimation Temporal-difference (TD) learning Exploration November 23, 2006 1 COMP-424 Lecture 23 Recall:

More information

PART A and ONE question from PART B; or ONE question from PART A and TWO questions from PART B.

PART A and ONE question from PART B; or ONE question from PART A and TWO questions from PART B. Advanced Topics in Machine Learning, GI13, 2010/11 Advanced Topics in Machine Learning, GI13, 2010/11 Answer any THREE questions. Each question is worth 20 marks. Use separate answer books Answer any THREE

More information

Reinforcement Learning: An Introduction

Reinforcement Learning: An Introduction Introduction Betreuer: Freek Stulp Hauptseminar Intelligente Autonome Systeme (WiSe 04/05) Forschungs- und Lehreinheit Informatik IX Technische Universität München November 24, 2004 Introduction What is

More information

Lecture 7: Value Function Approximation

Lecture 7: Value Function Approximation Lecture 7: Value Function Approximation Joseph Modayil Outline 1 Introduction 2 3 Batch Methods Introduction Large-Scale Reinforcement Learning Reinforcement learning can be used to solve large problems,

More information

ECE276B: Planning & Learning in Robotics Lecture 16: Model-free Control

ECE276B: Planning & Learning in Robotics Lecture 16: Model-free Control ECE276B: Planning & Learning in Robotics Lecture 16: Model-free Control Lecturer: Nikolay Atanasov: natanasov@ucsd.edu Teaching Assistants: Tianyu Wang: tiw161@eng.ucsd.edu Yongxi Lu: yol070@eng.ucsd.edu

More information

This question has three parts, each of which can be answered concisely, but be prepared to explain and justify your concise answer.

This question has three parts, each of which can be answered concisely, but be prepared to explain and justify your concise answer. This question has three parts, each of which can be answered concisely, but be prepared to explain and justify your concise answer. 1. Suppose you have a policy and its action-value function, q, then you

More information

Decision Theory: Q-Learning

Decision Theory: Q-Learning Decision Theory: Q-Learning CPSC 322 Decision Theory 5 Textbook 12.5 Decision Theory: Q-Learning CPSC 322 Decision Theory 5, Slide 1 Lecture Overview 1 Recap 2 Asynchronous Value Iteration 3 Q-Learning

More information

Off-Policy Actor-Critic

Off-Policy Actor-Critic Off-Policy Actor-Critic Ludovic Trottier Laval University July 25 2012 Ludovic Trottier (DAMAS Laboratory) Off-Policy Actor-Critic July 25 2012 1 / 34 Table of Contents 1 Reinforcement Learning Theory

More information

15-889e Policy Search: Gradient Methods Emma Brunskill. All slides from David Silver (with EB adding minor modificafons), unless otherwise noted

15-889e Policy Search: Gradient Methods Emma Brunskill. All slides from David Silver (with EB adding minor modificafons), unless otherwise noted 15-889e Policy Search: Gradient Methods Emma Brunskill All slides from David Silver (with EB adding minor modificafons), unless otherwise noted Outline 1 Introduction 2 Finite Difference Policy Gradient

More information

Reinforcement Learning: the basics

Reinforcement Learning: the basics Reinforcement Learning: the basics Olivier Sigaud Université Pierre et Marie Curie, PARIS 6 http://people.isir.upmc.fr/sigaud August 6, 2012 1 / 46 Introduction Action selection/planning Learning by trial-and-error

More information

Grundlagen der Künstlichen Intelligenz

Grundlagen der Künstlichen Intelligenz Grundlagen der Künstlichen Intelligenz Reinforcement learning II Daniel Hennes 11.12.2017 (WS 2017/18) University Stuttgart - IPVS - Machine Learning & Robotics 1 Today Eligibility traces n-step TD returns

More information

Internet Monetization

Internet Monetization Internet Monetization March May, 2013 Discrete time Finite A decision process (MDP) is reward process with decisions. It models an environment in which all states are and time is divided into stages. Definition

More information

Reinforcement learning an introduction

Reinforcement learning an introduction Reinforcement learning an introduction Prof. Dr. Ann Nowé Computational Modeling Group AIlab ai.vub.ac.be November 2013 Reinforcement Learning What is it? Learning from interaction Learning about, from,

More information

Reinforcement Learning

Reinforcement Learning 1 Reinforcement Learning Chris Watkins Department of Computer Science Royal Holloway, University of London July 27, 2015 2 Plan 1 Why reinforcement learning? Where does this theory come from? Markov decision

More information

Reinforcement Learning and NLP

Reinforcement Learning and NLP 1 Reinforcement Learning and NLP Kapil Thadani kapil@cs.columbia.edu RESEARCH Outline 2 Model-free RL Markov decision processes (MDPs) Derivative-free optimization Policy gradients Variance reduction Value

More information

MARKOV DECISION PROCESSES (MDP) AND REINFORCEMENT LEARNING (RL) Versione originale delle slide fornita dal Prof. Francesco Lo Presti

MARKOV DECISION PROCESSES (MDP) AND REINFORCEMENT LEARNING (RL) Versione originale delle slide fornita dal Prof. Francesco Lo Presti 1 MARKOV DECISION PROCESSES (MDP) AND REINFORCEMENT LEARNING (RL) Versione originale delle slide fornita dal Prof. Francesco Lo Presti Historical background 2 Original motivation: animal learning Early

More information

ROB 537: Learning-Based Control. Announcements: Project background due Today. HW 3 Due on 10/30 Midterm Exam on 11/6.

ROB 537: Learning-Based Control. Announcements: Project background due Today. HW 3 Due on 10/30 Midterm Exam on 11/6. ROB 537: Learning-Based Control Week 5, Lecture 1 Policy Gradient, Eligibility Traces, Transfer Learning (MaC Taylor Announcements: Project background due Today HW 3 Due on 10/30 Midterm Exam on 11/6 Reading:

More information

Reinforcement Learning. Machine Learning, Fall 2010

Reinforcement Learning. Machine Learning, Fall 2010 Reinforcement Learning Machine Learning, Fall 2010 1 Administrativia This week: finish RL, most likely start graphical models LA2: due on Thursday LA3: comes out on Thursday TA Office hours: Today 1:30-2:30

More information

Lecture 9: Policy Gradient II 1

Lecture 9: Policy Gradient II 1 Lecture 9: Policy Gradient II 1 Emma Brunskill CS234 Reinforcement Learning. Winter 2019 Additional reading: Sutton and Barto 2018 Chp. 13 1 With many slides from or derived from David Silver and John

More information

Prof. Dr. Ann Nowé. Artificial Intelligence Lab ai.vub.ac.be

Prof. Dr. Ann Nowé. Artificial Intelligence Lab ai.vub.ac.be REINFORCEMENT LEARNING AN INTRODUCTION Prof. Dr. Ann Nowé Artificial Intelligence Lab ai.vub.ac.be REINFORCEMENT LEARNING WHAT IS IT? What is it? Learning from interaction Learning about, from, and while

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Function Approximation Continuous state/action space, mean-square error, gradient temporal difference learning, least-square temporal difference, least squares policy iteration Vien

More information

Balancing and Control of a Freely-Swinging Pendulum Using a Model-Free Reinforcement Learning Algorithm

Balancing and Control of a Freely-Swinging Pendulum Using a Model-Free Reinforcement Learning Algorithm Balancing and Control of a Freely-Swinging Pendulum Using a Model-Free Reinforcement Learning Algorithm Michail G. Lagoudakis Department of Computer Science Duke University Durham, NC 2778 mgl@cs.duke.edu

More information

CMU Lecture 12: Reinforcement Learning. Teacher: Gianni A. Di Caro

CMU Lecture 12: Reinforcement Learning. Teacher: Gianni A. Di Caro CMU 15-781 Lecture 12: Reinforcement Learning Teacher: Gianni A. Di Caro REINFORCEMENT LEARNING Transition Model? State Action Reward model? Agent Goal: Maximize expected sum of future rewards 2 MDP PLANNING

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Function approximation Mario Martin CS-UPC May 18, 2018 Mario Martin (CS-UPC) Reinforcement Learning May 18, 2018 / 65 Recap Algorithms: MonteCarlo methods for Policy Evaluation

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning RL in continuous MDPs March April, 2015 Large/Continuous MDPs Large/Continuous state space Tabular representation cannot be used Large/Continuous action space Maximization over action

More information

Lecture 3: Markov Decision Processes

Lecture 3: Markov Decision Processes Lecture 3: Markov Decision Processes Joseph Modayil 1 Markov Processes 2 Markov Reward Processes 3 Markov Decision Processes 4 Extensions to MDPs Markov Processes Introduction Introduction to MDPs Markov

More information

Chapter 3: The Reinforcement Learning Problem

Chapter 3: The Reinforcement Learning Problem Chapter 3: The Reinforcement Learning Problem Objectives of this chapter: describe the RL problem we will be studying for the remainder of the course present idealized form of the RL problem for which

More information

ARTIFICIAL INTELLIGENCE. Reinforcement learning

ARTIFICIAL INTELLIGENCE. Reinforcement learning INFOB2KI 2018-2019 Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Reinforcement learning Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html

More information

Reinforcement Learning. Value Function Updates

Reinforcement Learning. Value Function Updates Reinforcement Learning Value Function Updates Manfred Huber 2014 1 Value Function Updates Different methods for updating the value function Dynamic programming Simple Monte Carlo Temporal differencing

More information

Machine Learning. Machine Learning: Jordan Boyd-Graber University of Maryland REINFORCEMENT LEARNING. Slides adapted from Tom Mitchell and Peter Abeel

Machine Learning. Machine Learning: Jordan Boyd-Graber University of Maryland REINFORCEMENT LEARNING. Slides adapted from Tom Mitchell and Peter Abeel Machine Learning Machine Learning: Jordan Boyd-Graber University of Maryland REINFORCEMENT LEARNING Slides adapted from Tom Mitchell and Peter Abeel Machine Learning: Jordan Boyd-Graber UMD Machine Learning

More information

Real Time Value Iteration and the State-Action Value Function

Real Time Value Iteration and the State-Action Value Function MS&E338 Reinforcement Learning Lecture 3-4/9/18 Real Time Value Iteration and the State-Action Value Function Lecturer: Ben Van Roy Scribe: Apoorva Sharma and Tong Mu 1 Review Last time we left off discussing

More information

Lecture 9: Policy Gradient II (Post lecture) 2

Lecture 9: Policy Gradient II (Post lecture) 2 Lecture 9: Policy Gradient II (Post lecture) 2 Emma Brunskill CS234 Reinforcement Learning. Winter 2018 Additional reading: Sutton and Barto 2018 Chp. 13 2 With many slides from or derived from David Silver

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Policy gradients Daniel Hennes 26.06.2017 University Stuttgart - IPVS - Machine Learning & Robotics 1 Policy based reinforcement learning So far we approximated the action value

More information

Introduction. Reinforcement Learning

Introduction. Reinforcement Learning Introduction Reinforcement Learning Learn Act Sense Scott Sanner NICTA / ANU First.Last@nicta.com.au Lecture Goals 1) To understand formal models for decisionmaking under uncertainty and their properties

More information

Lecture 25: Learning 4. Victor R. Lesser. CMPSCI 683 Fall 2010

Lecture 25: Learning 4. Victor R. Lesser. CMPSCI 683 Fall 2010 Lecture 25: Learning 4 Victor R. Lesser CMPSCI 683 Fall 2010 Final Exam Information Final EXAM on Th 12/16 at 4:00pm in Lederle Grad Res Ctr Rm A301 2 Hours but obviously you can leave early! Open Book

More information

CS 287: Advanced Robotics Fall Lecture 14: Reinforcement Learning with Function Approximation and TD Gammon case study

CS 287: Advanced Robotics Fall Lecture 14: Reinforcement Learning with Function Approximation and TD Gammon case study CS 287: Advanced Robotics Fall 2009 Lecture 14: Reinforcement Learning with Function Approximation and TD Gammon case study Pieter Abbeel UC Berkeley EECS Assignment #1 Roll-out: nice example paper: X.

More information

Chapter 3: The Reinforcement Learning Problem

Chapter 3: The Reinforcement Learning Problem Chapter 3: The Reinforcement Learning Problem Objectives of this chapter: describe the RL problem we will be studying for the remainder of the course present idealized form of the RL problem for which

More information

Markov Decision Processes and Solving Finite Problems. February 8, 2017

Markov Decision Processes and Solving Finite Problems. February 8, 2017 Markov Decision Processes and Solving Finite Problems February 8, 2017 Overview of Upcoming Lectures Feb 8: Markov decision processes, value iteration, policy iteration Feb 13: Policy gradients Feb 15:

More information

Olivier Sigaud. September 21, 2012

Olivier Sigaud. September 21, 2012 Supervised and Reinforcement Learning Tools for Motor Learning Models Olivier Sigaud Université Pierre et Marie Curie - Paris 6 September 21, 2012 1 / 64 Introduction Who is speaking? 2 / 64 Introduction

More information

Marks. bonus points. } Assignment 1: Should be out this weekend. } Mid-term: Before the last lecture. } Mid-term deferred exam:

Marks. bonus points. } Assignment 1: Should be out this weekend. } Mid-term: Before the last lecture. } Mid-term deferred exam: Marks } Assignment 1: Should be out this weekend } All are marked, I m trying to tally them and perhaps add bonus points } Mid-term: Before the last lecture } Mid-term deferred exam: } This Saturday, 9am-10.30am,

More information

Lecture 3: The Reinforcement Learning Problem

Lecture 3: The Reinforcement Learning Problem Lecture 3: The Reinforcement Learning Problem Objectives of this lecture: describe the RL problem we will be studying for the remainder of the course present idealized form of the RL problem for which

More information

, and rewards and transition matrices as shown below:

, and rewards and transition matrices as shown below: CSE 50a. Assignment 7 Out: Tue Nov Due: Thu Dec Reading: Sutton & Barto, Chapters -. 7. Policy improvement Consider the Markov decision process (MDP) with two states s {0, }, two actions a {0, }, discount

More information

Lecture 1: March 7, 2018

Lecture 1: March 7, 2018 Reinforcement Learning Spring Semester, 2017/8 Lecture 1: March 7, 2018 Lecturer: Yishay Mansour Scribe: ym DISCLAIMER: Based on Learning and Planning in Dynamical Systems by Shie Mannor c, all rights

More information

Trust Region Policy Optimization

Trust Region Policy Optimization Trust Region Policy Optimization Yixin Lin Duke University yixin.lin@duke.edu March 28, 2017 Yixin Lin (Duke) TRPO March 28, 2017 1 / 21 Overview 1 Preliminaries Markov Decision Processes Policy iteration

More information

Introduction to Reinforcement Learning. Part 6: Core Theory II: Bellman Equations and Dynamic Programming

Introduction to Reinforcement Learning. Part 6: Core Theory II: Bellman Equations and Dynamic Programming Introduction to Reinforcement Learning Part 6: Core Theory II: Bellman Equations and Dynamic Programming Bellman Equations Recursive relationships among values that can be used to compute values The tree

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning March May, 2013 Schedule Update Introduction 03/13/2015 (10:15-12:15) Sala conferenze MDPs 03/18/2015 (10:15-12:15) Sala conferenze Solving MDPs 03/20/2015 (10:15-12:15) Aula Alpha

More information

CS 234 Midterm - Winter

CS 234 Midterm - Winter CS 234 Midterm - Winter 2017-18 **Do not turn this page until you are instructed to do so. Instructions Please answer the following questions to the best of your ability. Read all the questions first before

More information

Reinforcement Learning Part 2

Reinforcement Learning Part 2 Reinforcement Learning Part 2 Dipendra Misra Cornell University dkm@cs.cornell.edu https://dipendramisra.wordpress.com/ From previous tutorial Reinforcement Learning Exploration No supervision Agent-Reward-Environment

More information

The Nature of Learning - A study of Reinforcement Learning Methodology

The Nature of Learning - A study of Reinforcement Learning Methodology The Nature of Learning - A study of Reinforcement Learning Methodology Anders Christian Kølle 1 Department of Computer Science University of Copenhagen November 21, 23 1 andersk@diku.dk One needs to explore

More information

Sequential Decision Problems

Sequential Decision Problems Sequential Decision Problems Michael A. Goodrich November 10, 2006 If I make changes to these notes after they are posted and if these changes are important (beyond cosmetic), the changes will highlighted

More information

15-780: ReinforcementLearning

15-780: ReinforcementLearning 15-780: ReinforcementLearning J. Zico Kolter March 2, 2016 1 Outline Challenge of RL Model-based methods Model-free methods Exploration and exploitation 2 Outline Challenge of RL Model-based methods Model-free

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Model-Based Reinforcement Learning Model-based, PAC-MDP, sample complexity, exploration/exploitation, RMAX, E3, Bayes-optimal, Bayesian RL, model learning Vien Ngo MLR, University

More information

An Adaptive Clustering Method for Model-free Reinforcement Learning

An Adaptive Clustering Method for Model-free Reinforcement Learning An Adaptive Clustering Method for Model-free Reinforcement Learning Andreas Matt and Georg Regensburger Institute of Mathematics University of Innsbruck, Austria {andreas.matt, georg.regensburger}@uibk.ac.at

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Dipendra Misra Cornell University dkm@cs.cornell.edu https://dipendramisra.wordpress.com/ Task Grasp the green cup. Output: Sequence of controller actions Setup from Lenz et. al.

More information

Replacing eligibility trace for action-value learning with function approximation

Replacing eligibility trace for action-value learning with function approximation Replacing eligibility trace for action-value learning with function approximation Kary FRÄMLING Helsinki University of Technology PL 5500, FI-02015 TKK - Finland Abstract. The eligibility trace is one

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Dynamic Programming Marc Toussaint University of Stuttgart Winter 2018/19 Motivation: So far we focussed on tree search-like solvers for decision problems. There is a second important

More information

Course basics. CSE 190: Reinforcement Learning: An Introduction. Last Time. Course goals. The website for the class is linked off my homepage.

Course basics. CSE 190: Reinforcement Learning: An Introduction. Last Time. Course goals. The website for the class is linked off my homepage. Course basics CSE 190: Reinforcement Learning: An Introduction The website for the class is linked off my homepage. Grades will be based on programming assignments, homeworks, and class participation.

More information

Week 6, Lecture 1. Reinforcement Learning (part 3) Announcements: HW 3 due on 11/5 at NOON Midterm Exam 11/8 Project draft due 11/15

Week 6, Lecture 1. Reinforcement Learning (part 3) Announcements: HW 3 due on 11/5 at NOON Midterm Exam 11/8 Project draft due 11/15 ME 537: Learning Based Control Week 6, Lecture 1 Reinforcement Learning (part 3 Announcements: HW 3 due on 11/5 at NOON Midterm Exam 11/8 Project draft due 11/15 Suggested reading : Chapters 7-8 in Reinforcement

More information

Generalization and Function Approximation

Generalization and Function Approximation Generalization and Function Approximation 0 Generalization and Function Approximation Suggested reading: Chapter 8 in R. S. Sutton, A. G. Barto: Reinforcement Learning: An Introduction MIT Press, 1998.

More information

Q-learning. Tambet Matiisen

Q-learning. Tambet Matiisen Q-learning Tambet Matiisen (based on chapter 11.3 of online book Artificial Intelligence, foundations of computational agents by David Poole and Alan Mackworth) Stochastic gradient descent Experience

More information

Machine Learning I Continuous Reinforcement Learning

Machine Learning I Continuous Reinforcement Learning Machine Learning I Continuous Reinforcement Learning Thomas Rückstieß Technische Universität München January 7/8, 2010 RL Problem Statement (reminder) state s t+1 ENVIRONMENT reward r t+1 new step r t

More information

Bias-Variance Error Bounds for Temporal Difference Updates

Bias-Variance Error Bounds for Temporal Difference Updates Bias-Variance Bounds for Temporal Difference Updates Michael Kearns AT&T Labs mkearns@research.att.com Satinder Singh AT&T Labs baveja@research.att.com Abstract We give the first rigorous upper bounds

More information

Introduction to Reinforcement Learning

Introduction to Reinforcement Learning CSCI-699: Advanced Topics in Deep Learning 01/16/2019 Nitin Kamra Spring 2019 Introduction to Reinforcement Learning 1 What is Reinforcement Learning? So far we have seen unsupervised and supervised learning.

More information

Reinforcement Learning and Deep Reinforcement Learning

Reinforcement Learning and Deep Reinforcement Learning Reinforcement Learning and Deep Reinforcement Learning Ashis Kumer Biswas, Ph.D. ashis.biswas@ucdenver.edu Deep Learning November 5, 2018 1 / 64 Outlines 1 Principles of Reinforcement Learning 2 The Q

More information

Reinforcement Learning and Control

Reinforcement Learning and Control CS9 Lecture notes Andrew Ng Part XIII Reinforcement Learning and Control We now begin our study of reinforcement learning and adaptive control. In supervised learning, we saw algorithms that tried to make

More information

Lecture 10 - Planning under Uncertainty (III)

Lecture 10 - Planning under Uncertainty (III) Lecture 10 - Planning under Uncertainty (III) Jesse Hoey School of Computer Science University of Waterloo March 27, 2018 Readings: Poole & Mackworth (2nd ed.)chapter 12.1,12.3-12.9 1/ 34 Reinforcement

More information

(Deep) Reinforcement Learning

(Deep) Reinforcement Learning Martin Matyášek Artificial Intelligence Center Czech Technical University in Prague October 27, 2016 Martin Matyášek VPD, 2016 1 / 17 Reinforcement Learning in a picture R. S. Sutton and A. G. Barto 2015

More information

Temporal Difference Learning & Policy Iteration

Temporal Difference Learning & Policy Iteration Temporal Difference Learning & Policy Iteration Advanced Topics in Reinforcement Learning Seminar WS 15/16 ±0 ±0 +1 by Tobias Joppen 03.11.2015 Fachbereich Informatik Knowledge Engineering Group Prof.

More information