Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 a much larger part. pOverview of function approximation (FA) methods and how they can be adapted to RL Objectives of this chapter:

2 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 2 Value Prediction with FA As usual: Policy Evaluation (the prediction problem): for a given policy , compute the state-value function In earlier chapters, value functions were stored in lookup tables.

3 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 3 Adapt Supervised Learning Algorithms Supervised Learning System Inputs Outputs Training Info = desired (target) outputs Error = (target output – actual output) Training example = {input, target output}

4 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 4 Backups as Training Examples As a training example: inputtarget output

5 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 5 Any Function Approximation Method? pIn principle, yes: artificial neural networks decision trees multivariate regression methods etc. pBut RL has some special requirements: usually want to learn while interacting ability to handle nonstationarity other?

6 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 6 Gradient Descent Methods transpose

7 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 7 Performance Measures pMany are applicable but… pa common and simple one is the mean-squared error (MSE) over a distribution P to weight various errors: pWhy P ? pWhy minimize MSE? pLet us assume that P is always the distribution of states at which backups are done. pThe on-policy distribution: the distribution created while following the policy being evaluated. Stronger results are available for this distribution.

8 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 8 Gradient Descent Iteratively move down the gradient:

9 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 9 Gradient Descent Cont. For the MSE given above and using the chain rule:

10 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 10 Gradient Descent Cont. Assume that states appear with distribution P Use just the sample gradient instead: Since each sample gradient is an unbiased estimate of the true gradient, this converges to a local minimum of the MSE if  decreases appropriately with t.

11 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 11 But We Don’t have these Targets

12 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 12 What about TD( ) Targets?

13 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 13 On-Line Gradient-Descent TD( )

14 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 14 Linear Methods

15 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 15 Nice Properties of Linear FA Methods pThe gradient is very simple: pFor MSE, the error surface is simple: quadratic surface with a single minumum.  Linear gradient descent TD( ) converges: Step size decreases appropriately On-line sampling (states sampled from the on-policy distribution) Converges to parameter vector with property: best parameter vector (Tsitsiklis & Van Roy, 1997)

16 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 16 Coarse Coding

17 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 17 Learning and Coarse Coding

18 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 18 Tile Coding pBinary feature for each tile pNumber of features present at any one time is constant pBinary features means weighted sum easy to compute pEasy to compute indices of the features present

19 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 19 Tile Coding Cont. Irregular tilings Hashing CMAC “Cerebellar model arithmetic computer” Albus 1971

20 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 20 Radial Basis Functions (RBFs) e.g., Gaussians

21 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 21 Can you beat the “curse of dimensionality”? pCan you keep the number of features from going up exponentially with the dimension? pFunction complexity, not dimensionality, is the problem. pKanerva coding: Select a bunch of binary prototypes Use hamming distance as distance measure Dimensionality is no longer a problem, only complexity p“Lazy learning” schemes: Remember all the data To get new value, find nearest neighbors and interpolate e.g., locally-weighted regression

22 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 22 Control with Function Approximation Training examples of the form: pLearning state-action values pThe general gradient-descent rule:  Gradient-descent Sarsa( ) (backward view):

23 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 23 GPI with Linear Gradient Descent Sarsa( )

24 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 24 GPI Linear Gradient Descent Watkins’ Q( )

25 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 25 Mountain-Car Task

26 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 26 Mountain-Car Results

27 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 27 Baird’s Counterexample Reward is always zero, so the true value is zero for all s The approximate of state value function is shown in each state Updating Is unstable from some initial conditions

28 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 28 Baird’s Counterexample Cont.

29 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 29 Should We Bootstrap?

30 R. S. Sutton and A. G. Barto: Reinforcement Learning: An Introduction 30 Summary pGeneralization pAdapting supervised-learning function approximation methods pGradient-descent methods pLinear gradient-descent methods Radial basis functions Tile coding Kanerva coding pNonlinear gradient-descent methods? Backpropation? pSubtleties involving function approximation, bootstrapping and the on-policy/off-policy distinction


Download ppt "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."

Similar presentations


Ads by Google