Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pieter Abbeel and Andrew Y. Ng Apprenticeship Learning via Inverse Reinforcement Learning Pieter Abbeel and Andrew Y. Ng Stanford University.

Similar presentations


Presentation on theme: "Pieter Abbeel and Andrew Y. Ng Apprenticeship Learning via Inverse Reinforcement Learning Pieter Abbeel and Andrew Y. Ng Stanford University."— Presentation transcript:

1 Pieter Abbeel and Andrew Y. Ng Apprenticeship Learning via Inverse Reinforcement Learning Pieter Abbeel and Andrew Y. Ng Stanford University

2 Pieter Abbeel and Andrew Y. Ng Motivation Reinforcement learning (RL) gives powerful tools for solving MDPs. It can be difficult to specify the reward function. Example: Highway driving.

3 Pieter Abbeel and Andrew Y. Ng Apprenticeship Learning Learning from observing an expert. Previous work: –Learn to predict expert’s actions as a function of states. –Usually lacks strong performance guarantees. –(E.g.,. Pomerleau, 1989; Sammut et al., 1992; Kuniyoshi et al., 1994; Demiris & Hayes, 1994; Amit & Mataric, 2002; Atkeson & Schaal, 1997; …) Our approach: –Based on inverse reinforcement learning (Ng & Russell, 2000). –Returns policy with performance as good as the expert as measured according to the expert’s unknown reward function.

4 Pieter Abbeel and Andrew Y. Ng Preliminaries Markov Decision Process (S,A,T, ,D,R) R(s)=w T  (s),  : S  [0,1] k : k-dimensional feature vector. W.l.o.g. we assume ||w|| 2 ≤ 1. Policy  : S  A Utility of a policy  for reward R=w T  U w (  ) = E [  t  t R(s t )|  ].

5 Pieter Abbeel and Andrew Y. Ng Algorithm For t = 1,2,… Inverse RL step: Estimate expert’s reward function R(s)= w T  (s) such that under R(s) the expert performs better than all previously found policies {  i }. RL step: Compute optimal policy  t for the estimated reward w.

6 Pieter Abbeel and Andrew Y. Ng Algorithm: IRL step Maximize , w:||w|| 2 ≤ 1  s.t. U w (  E )  U w (  i ) +  i=1,…,t-1  = margin of expert’s performance over the performance of previously found policies. U w (  ) = E [  t  t R(s t )|  ] = E [  t  t w T  (s t )|  ] = w T E [  t  t  (s t )|  ] = w T  (  )  (  ) = E [  t  t  (s t )|  ] are the “feature expectations”

7 Pieter Abbeel and Andrew Y. Ng Feature Expectation Closeness and Performance If we can find a policy  such that ||  (  E ) -  (  )|| 2  , then for any underlying reward R*(s) =w* T  (s), we have that |U w* (  E ) - U w* (  )| = |w* T  (  E ) - w* T  (  )|  ||w*|| 2 ||  (  E ) -  (  )|| 2  .

8 Pieter Abbeel and Andrew Y. Ng Algorithm 11 (0)(0) w (1) w (2) (1)(1) (2)(2) 22 w (3) U w (  ) = w T  (  ) (E)(E)

9 Pieter Abbeel and Andrew Y. Ng Theoretical Results: Convergence Theorem. Let an MDP (without reward function), a k-dimensional feature vector  and the expert’s feature expectations  (  E ) be given. Then after at most k/[(1-  )  ] 2 iterations, the algorithm outputs a policy  that performs nearly as well as the expert, as evaluated on the unknown reward function R*(s)=w* T  (s), i.e., U w* (  )  U w* (  E ) - .

10 Pieter Abbeel and Andrew Y. Ng Theoretical Results: Sampling In practice, we have to use sampling to estimate the feature expectations of the expert. We still have  -optimal performance with high probability if the number of observed samples is at least O(poly(k,1/  )). Note: the bound has no dependence on the “complexity” of the policy.

11 Pieter Abbeel and Andrew Y. Ng Gridworld Experiments Reward function is piecewise constant over small regions. Features  for IRL are these small regions. 128x128 grid, small regions of size 16x16.

12 Pieter Abbeel and Andrew Y. Ng Gridworld Experiments

13 Pieter Abbeel and Andrew Y. Ng Gridworld Experiments

14 Pieter Abbeel and Andrew Y. Ng Gridworld Experiments

15 Pieter Abbeel and Andrew Y. Ng Gridworld Experiments

16 Pieter Abbeel and Andrew Y. Ng Case study: Highway driving The only input to the learning algorithm was the driving demonstration (left panel). No reward function was provided. Input: Driving demonstration Output: Learned behavior

17 Pieter Abbeel and Andrew Y. Ng More driving examples In each video, the left sub-panel shows a demonstration of a different driving “style”, and the right sub-panel shows the behavior learned from watching the demonstration.

18 Pieter Abbeel and Andrew Y. Ng Car driving results Collision Left Shoulder Left Lane Middle Lane Right Lane Right Shoulder  (expert) 00 0.130.200.600.07 1  (learned) 00 0.090.230.600.08 W (learned)-0.08-0.04 0.01 0.03-0.01  (expert) 0.120 0.060.47 0 2  (learned) 0.130 0.100.320.580 W (learned)0.23-0.11 0.010.050.06-0.01  (expert) 00 00.010.700.29 3  (learned) 00 000.740.26 W (learned)-0.11-0.01-0.06-0.040.090.01

19 Pieter Abbeel and Andrew Y. Ng Our algorithm returns a policy with performance as good as the expert as evaluated according to the expert’s unknown reward function. Algorithm is guaranteed to converge in poly(k,1/  ) iterations. Sample complexity poly(k,1/  ). The algorithm exploits reward “simplicity” (vs. policy “simplicity” in previous approaches). [Poster: dual formulation; cheaper inverse RL step without the optimization.] Conclusions

20 Pieter Abbeel and Andrew Y. Ng Additional slides for poster (slides to come are additional material, not included in the talk, in particular: projection (vs. QP) version of the Inverse RL step; another formulation of the apprenticeship learning problem, and its relation to our algorithm)

21 Pieter Abbeel and Andrew Y. Ng Simplification of Inverse RL step: QP  Euclidean projection In the Inverse RL step –set  (i-1) = orthogonal projection of  E onto line through {  (i-1),  (  (i-1) ) } –set w (i) =  E -  (i-1) Note: the theoretical results on convergence and sample complexity hold unchanged for the simpler algorithm.

22 Pieter Abbeel and Andrew Y. Ng Algorithm (projection version) 11 EE (0)(0) w (1) (1)(1) 22

23 Pieter Abbeel and Andrew Y. Ng Algorithm (projection version) 11 EE (0)(0) w (1) w (2) (1)(1) (2)(2) 22  (1)

24 Pieter Abbeel and Andrew Y. Ng Algorithm (projection version) 11 EE (0)(0) w (1) w (2) (1)(1) (2)(2) 22 w (3)  (1)  (2)

25 Pieter Abbeel and Andrew Y. Ng Appendix: Different View Bellman LP for solving MDPs Min. V c’V s.t.  s,a V(s)  R(s,a) +   s’ P(s,a,s’)V(s’) Dual LP Max.  s,a (s,a)R(s,a) s.t.  s c(s) -  a (s,a) +   s’,a P(s’,a,s) (s’,a) =0 Apprenticeship Learning as QP Min.  i (  E,i -  s,a (s,a)  i (s)) 2 s.t.  s c(s) -  a (s,a) +   s’,a P(s’,a,s) (s’,a) =0

26 Pieter Abbeel and Andrew Y. Ng Different View (ctd.) Our algorithm is equivalent to iteratively linearize QP at current point (Inverse RL step), solve resulting LP (RL step). Why not solving QP directly? Typically only possible for very small toy problems (curse of dimensionality). [Our algorithm makes use of existing RL solvers to deal with the curse of dimensionality.]

27 Pieter Abbeel and Andrew Y. Ng Slides that are different for poster (slides to come are slightly different for poster, but already “appeared” earlier)

28 Pieter Abbeel and Andrew Y. Ng Algorithm (QP version) 11 (0)(0) w (1) (1)(1) 22 U w (  ) = w T  (  ) (E)(E)

29 Pieter Abbeel and Andrew Y. Ng Algorithm (QP version) 11 (0)(0) w (1) w (2) (1)(1) (2)(2) 22 U w (  ) = w T  (  ) (E)(E)

30 Pieter Abbeel and Andrew Y. Ng Algorithm (QP version) 11 (0)(0) w (1) w (2) (1)(1) (2)(2) 22 w (3) U w (  ) = w T  (  ) (E)(E)

31 Pieter Abbeel and Andrew Y. Ng Gridworld Experiments

32 Pieter Abbeel and Andrew Y. Ng Case study: Highway driving (Videos available.) Input: Driving demonstration Output: Learned behavior

33 Pieter Abbeel and Andrew Y. Ng More driving examples (Videos available.)

34 Collision Offroad Left Left Lane Middle Lane Right Lane Offroad Right 1Feature Distr. Expert000.13250.20330.59830.0658 Feature Distr. Learned5.00E-050.00040.09040.22860.6040.0764 Weights Learned-0.0767-0.04390.00770.00780.0318-0.0035 2Feature Distr. Expert0.116700.06330.46670.470 Feature Distr. Learned0.133200.10450.31960.57590 Weights Learned0.234-0.10980.00920.04870.0576-0.0056 3Feature Distr. Expert0000.00330.70580.2908 Feature Distr. Learned00000.74470.2554 Weights Learned-0.1056-0.0051-0.0573-0.03860.09290.0081 4Feature Distr. Expert0.06000.00330.29080.7058 Feature Distr. Learned0.05690000.26660.7334 Weights Learned0.1079-0.0001-0.0487-0.06660.0590.0564 5Feature Distr. Expert0.0600100 Feature Distr. Learned0.054200100 Weights Learned0.0094-0.0108-0.27650.8126-0.51-0.0153 Car driving results (more detail)

35 Pieter Abbeel and Andrew Y. Ng Apprenticeship Learning via Inverse Reinforcement Learning Pieter Abbeel and Andrew Y. Ng Stanford University


Download ppt "Pieter Abbeel and Andrew Y. Ng Apprenticeship Learning via Inverse Reinforcement Learning Pieter Abbeel and Andrew Y. Ng Stanford University."

Similar presentations


Ads by Google