CMSC 471 Fall 2009 Temporal Difference Learning Prof. Marie desJardins Class #25 – Tuesday, 11/24 Thanks to Rich Sutton and Andy Barto for the use of their.

Slides:



Advertisements
Similar presentations
Lecture 18: Temporal-Difference Learning
Advertisements

Programming exercises: Angel – lms.wsu.edu – Submit via zip or tar – Write-up, Results, Code Doodle: class presentations Student Responses First visit.
TEMPORAL DIFFERENCE LEARNING Mark Romero – 11/03/2011.
Monte-Carlo Methods Learning methods averaging complete episodic returns Slides based on [Sutton & Barto: Reinforcement Learning: An Introduction, 1998]
11 Planning and Learning Week #9. 22 Introduction... 1 Two types of methods in RL ◦Planning methods: Those that require an environment model  Dynamic.
Computational Modeling Lab Wednesday 18 June 2003 Reinforcement Learning an introduction part 3 Ann Nowé By Sutton.
INTRODUCTION TO MACHINE LEARNING 3RD EDITION ETHEM ALPAYDIN © The MIT Press, Lecture.
1 Monte Carlo Methods Week #5. 2 Introduction Monte Carlo (MC) Methods –do not assume complete knowledge of environment (unlike DP methods which assume.
1 Reinforcement Learning Introduction & Passive Learning Alan Fern * Based in part on slides by Daniel Weld.
1 Temporal-Difference Learning Week #6. 2 Introduction Temporal-Difference (TD) Learning –a combination of DP and MC methods updates estimates based on.
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 4: Dynamic Programming pOverview of a collection of classical solution.
Reinforcement Learning
Adapted from R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction From Sutton & Barto Reinforcement Learning An Introduction.
Università di Milano-Bicocca Laurea Magistrale in Informatica Corso di APPRENDIMENTO E APPROSSIMAZIONE Lezione 6 - Reinforcement Learning Prof. Giancarlo.
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 9: Planning and Learning pUse of environment models pIntegration of planning.
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 4: Dynamic Programming pOverview of a collection of classical solution.
Chapter 8: Generalization and Function Approximation pLook at how experience with a limited part of the state set be used to produce good behavior over.
Application of Reinforcement Learning in Network Routing By Chaopin Zhu Chaopin Zhu.
Reinforcement Learning Mitchell, Ch. 13 (see also Barto & Sutton book on-line)
Chapter 5: Monte Carlo Methods
Persistent Autonomous FlightNicholas Lawrance Reinforcement Learning for Soaring CDMRG – 24 May 2010 Nick Lawrance.
Chapter 6: Temporal Difference Learning
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 From Sutton & Barto Reinforcement Learning An Introduction.
Chapter 6: Temporal Difference Learning
Chapter 6: Temporal Difference Learning
Reinforcement Learning: Learning algorithms Yishay Mansour Tel-Aviv University.
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 4: Dynamic Programming pOverview of a collection of classical solution.
Reinforcement Learning
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 9: Planning and Learning pUse of environment models pIntegration of planning.
INTRODUCTION TO Machine Learning ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
1 Tópicos Especiais em Aprendizagem Prof. Reinaldo Bianchi Centro Universitário da FEI 2006.
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Formulating MDPs pFormulating MDPs Rewards Returns Values pEscalator pElevators.
Chapter 8: Generalization and Function Approximation pLook at how experience with a limited part of the state set be used to produce good behavior over.
1 ECE-517 Reinforcement Learning in Artificial Intelligence Lecture 11: Temporal Difference Learning (cont.), Eligibility Traces Dr. Itamar Arel College.
1 ECE-517 Reinforcement Learning in Artificial Intelligence Lecture 7: Finite Horizon MDPs, Dynamic Programming Dr. Itamar Arel College of Engineering.
Learning Theory Reza Shadmehr & Jörn Diedrichsen Reinforcement Learning 2: Temporal difference learning.
Introduction to Reinforcement Learning
Bayesian Reinforcement Learning Machine Learning RCC 16 th June 2011.
Decision Making Under Uncertainty Lec #8: Reinforcement Learning UIUC CS 598: Section EA Professor: Eyal Amir Spring Semester 2006 Most slides by Jeremy.
Reinforcement Learning
INTRODUCTION TO Machine Learning
Computational Modeling Lab Wednesday 18 June 2003 Reinforcement Learning an introduction part 4 Ann Nowé By Sutton.
Reinforcement Learning Eligibility Traces 主講人:虞台文 大同大學資工所 智慧型多媒體研究室.
CHAPTER 16: Reinforcement Learning. Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2 Introduction Game-playing:
Schedule for presentations. 6.1: Chris? – The agent is driving home from work from a new work location, but enters the freeway from the same point. Thus,
Off-Policy Temporal-Difference Learning with Function Approximation Doina Precup McGill University Rich Sutton Sanjoy Dasgupta AT&T Labs.
CS 188: Artificial Intelligence Spring 2007 Lecture 23: Reinforcement Learning: III 4/17/2007 Srini Narayanan – ICSI and UC Berkeley.
Retraction: I’m actually 35 years old. Q-Learning.
CMSC 471 Fall 2009 MDPs and the RL Problem Prof. Marie desJardins Class #23 – Tuesday, 11/17 Thanks to Rich Sutton and Andy Barto for the use of their.
R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1 Chapter 5: Monte Carlo Methods pMonte Carlo methods learn from complete sample.
Reinforcement Learning Elementary Solution Methods
Reinforcement Learning: Learning algorithms Yishay Mansour Tel-Aviv University.
TD(0) prediction Sarsa, On-policy learning Q-Learning, Off-policy learning.
Chapter 6: Temporal Difference Learning
Chapter 5: Monte Carlo Methods
CMSC 471 – Spring 2014 Class #25 – Thursday, May 1
Reinforcement Learning
CMSC 671 – Fall 2010 Class #22 – Wednesday 11/17
Reinforcement learning
CMSC 471 Fall 2009 RL using Dynamic Programming
Chapter 4: Dynamic Programming
Chapter 4: Dynamic Programming
یادگیری تقویتی Reinforcement Learning
October 6, 2011 Dr. Itamar Arel College of Engineering
Chapter 6: Temporal Difference Learning
Chapter 9: Planning and Learning
CMSC 471 – Fall 2011 Class #25 – Tuesday, November 29
Chapter 7: Eligibility Traces
Chapter 4: Dynamic Programming
Presentation transcript:

CMSC 471 Fall 2009 Temporal Difference Learning Prof. Marie desJardins Class #25 – Tuesday, 11/24 Thanks to Rich Sutton and Andy Barto for the use of their slides! R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 1

2 Chapter 6: Temporal Difference Learning pIntroduce Temporal Difference (TD) learning pFocus first on policy evaluation, or prediction, methods pThen extend to control methods Objectives of this chapter:

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 3 Simple Monte Carlo TTTTTTTTTT

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 4 TD Prediction Policy Evaluation (the prediction problem): for a given policy , compute the state-value function Recall: target: the actual return after time t target: an estimate of the return

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 5 Simplest TD Method TTTTTTTTTT

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 6 cf. Dynamic Programming T T T TTTTTTTTTT

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 7 TD Bootstraps and Samples pBootstrapping: update involves an estimate MC does not bootstrap DP bootstraps TD bootstraps pSampling: update does not involve an expected value MC samples DP does not sample TD samples

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 8 Example: Driving Home

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 9 Driving Home Changes recommended by Monte Carlo methods  =1) Changes recommended by TD methods (  =1)

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 10 Advantages of TD Learning pTD methods do not require a model of the environment, only experience p TD, but not MC, methods can be fully incremental You can learn before knowing the final outcome –Less memory –Less peak computation You can learn without the final outcome –From incomplete sequences pBoth MC and TD converge (under certain assumptions to be detailed later), but which is faster?

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 11 Random Walk Example Values learned by TD(0) after various numbers of episodes

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 12 TD and MC on the Random Walk Data averaged over 100 sequences of episodes

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 13 Optimality of TD(0) Batch Updating : train completely on a finite amount of data, e.g., train repeatedly on 10 episodes until convergence. Compute updates according to TD(0), but only update estimates after each complete pass through the data. For any finite Markov prediction task, under batch updating, TD(0) converges for sufficiently small . Constant-  MC also converges under these conditions, but to a difference answer!

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 14 Random Walk under Batch Updating After each new episode, all previous episodes were treated as a batch, and algorithm was trained until convergence. All repeated 100 times.

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 15 You are the Predictor Suppose you observe the following 8 episodes: A, 0, B, 0 B, 1 B, 0

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 16 You are the Predictor

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 17 You are the Predictor pThe prediction that best matches the training data is V(A)=0 This minimizes the mean-square-error on the training set This is what a batch Monte Carlo method gets pIf we consider the sequentiality of the problem, then we would set V(A)=.75 This is correct for the maximum likelihood estimate of a Markov model generating the data i.e, if we do a best fit Markov model, and assume it is exactly correct, and then compute what it predicts (how?) This is called the certainty-equivalence estimate This is what TD(0) gets

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 18 Learning An Action-Value Function

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 19 Sarsa: On-Policy TD Control Turn this into a control method by always updating the policy to be greedy with respect to the current estimate:

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 20 Windy Gridworld undiscounted, episodic, reward = –1 until goal

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 21 Results of Sarsa on the Windy Gridworld

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 22 Q-Learning: Off-Policy TD Control

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 23 Cliffwalking  greedy  = 0.1

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 24 Actor-Critic Methods pExplicit representation of policy as well as value function pMinimal computation to select actions pCan learn an explicit stochastic policy pCan put constraints on policies pAppealing as psychological and neural models

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 25 Actor-Critic Details

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 26 Dopamine Neurons and TD Error W. Schultz et al. Universite de Fribourg

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 27 Average Reward Per Time Step the same for each state if ergodic

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 28 R-Learning

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 29 Access-Control Queuing Task pn servers pCustomers have four different priorities, which pay reward of 1, 2, 3, or 4, if served pAt each time step, customer at head of queue is accepted (assigned to a server) or removed from the queue pProportion of randomly distributed high priority customers in queue is h pBusy server becomes free with probability p on each time step pStatistics of arrivals and departures are unknown n=10, h=.5, p=.06 Apply R-learning

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 30 Afterstates pUsually, a state-value function evaluates states in which the agent can take an action. pBut sometimes it is useful to evaluate states after agent has acted, as in tic-tac-toe. pWhy is this useful? pWhat is this in general?

R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 31 Summary pTD prediction pIntroduced one-step tabular model-free TD methods pExtend prediction to control by employing some form of GPI On-policy control: Sarsa Off-policy control: Q-learning and R-learning pThese methods bootstrap and sample, combining aspects of DP and MC methods