Reinforcement learning (Chapter 21)

Slides:



Advertisements
Similar presentations
Lirong Xia Reinforcement Learning (1) Tue, March 18, 2014.
Advertisements

Reinforcement Learning
Markov Decision Process
Reinforcement Learning
Eick: Reinforcement Learning. Reinforcement Learning Introduction Passive Reinforcement Learning Temporal Difference Learning Active Reinforcement Learning.
Reinforcement Learning Introduction Passive Reinforcement Learning Temporal Difference Learning Active Reinforcement Learning Applications Summary.
Ai in game programming it university of copenhagen Reinforcement Learning [Outro] Marco Loog.
Reinforcement Learning
Reinforcement learning (Chapter 21)
1 Reinforcement Learning Introduction & Passive Learning Alan Fern * Based in part on slides by Daniel Weld.
Reinforcement Learning & Apprenticeship Learning Chenyi Chen.
Markov Decision Processes
Reinforcement learning
Università di Milano-Bicocca Laurea Magistrale in Informatica Corso di APPRENDIMENTO E APPROSSIMAZIONE Lezione 6 - Reinforcement Learning Prof. Giancarlo.
Reinforcement Learning Tutorial
Reinforcement Learning
CS 182/CogSci110/Ling109 Spring 2008 Reinforcement Learning: Algorithms 4/1/2008 Srini Narayanan – ICSI and UC Berkeley.
1 Hybrid Agent-Based Modeling: Architectures,Analyses and Applications (Stage One) Li, Hailin.
1 Kunstmatige Intelligentie / RuG KI Reinforcement Learning Johan Everts.
© Daniel S. Weld 1 Reinforcement Learning CSE 473 Ever Feel Like Pavlov’s Poor Dog?
CS 188: Artificial Intelligence Fall 2009 Lecture 10: MDPs 9/29/2009 Dan Klein – UC Berkeley Many slides over the course adapted from either Stuart Russell.
Pieter Abbeel and Andrew Y. Ng Reinforcement Learning and Apprenticeship Learning Pieter Abbeel and Andrew Y. Ng Stanford University.
CS 188: Artificial Intelligence Fall 2009 Lecture 12: Reinforcement Learning II 10/6/2009 Dan Klein – UC Berkeley Many slides over the course adapted from.
Kunstmatige Intelligentie / RuG KI Reinforcement Learning Sander van Dijk.
1 Reinforcement Learning: Learning algorithms Function Approximation Yishay Mansour Tel-Aviv University.
CS Reinforcement Learning1 Reinforcement Learning Variation on Supervised Learning Exact target outputs are not given Some variation of reward is.
Utility Theory & MDPs Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart.
Reinforcement Learning
Reinforcement Learning Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart.
Reinforcement Learning
Eick: Reinforcement Learning. Reinforcement Learning Introduction Passive Reinforcement Learning Temporal Difference Learning Active Reinforcement Learning.
Reinforcement Learning
CHAPTER 10 Reinforcement Learning Utility Theory.
© D. Weld and D. Fox 1 Reinforcement Learning CSE 473.
QUIZ!!  T/F: RL is an MDP but we do not know T or R. TRUE  T/F: In model free learning we estimate T and R first. FALSE  T/F: Temporal Difference learning.
Eick: Reinforcement Learning. Reinforcement Learning Introduction Passive Reinforcement Learning Temporal Difference Learning Active Reinforcement Learning.
MDPs (cont) & Reinforcement Learning
gaflier-uas-battles-feral-hogs/ gaflier-uas-battles-feral-hogs/
CS 188: Artificial Intelligence Spring 2007 Lecture 23: Reinforcement Learning: III 4/17/2007 Srini Narayanan – ICSI and UC Berkeley.
Reinforcement Learning Based on slides by Avi Pfeffer and David Parkes.
QUIZ!!  T/F: Optimal policies can be defined from an optimal Value function. TRUE  T/F: “Pick the MEU action first, then follow optimal policy” is optimal.
Possible actions: up, down, right, left Rewards: – 0.04 if non-terminal state Environment is observable (i.e., agent knows where it is) MDP = “Markov Decision.
Reinforcement Learning
Deep Learning and Deep Reinforcement Learning. Topics 1.Deep learning with convolutional neural networks 2.Learning to play Atari video games with Deep.
REINFORCEMENT LEARNING Unsupervised learning 1. 2 So far ….  Supervised machine learning: given a set of annotated istances and a set of categories,
CS 541: Artificial Intelligence Lecture XI: Reinforcement Learning Slides Credit: Peter Norvig and Sebastian Thrun.
Def gradientDescent(x, y, theta, alpha, m, numIterations): xTrans = x.transpose() replaceMe =.0001 for i in range(0, numIterations): hypothesis = np.dot(x,
CS 188: Artificial Intelligence Fall 2007 Lecture 12: Reinforcement Learning 10/4/2007 Dan Klein – UC Berkeley.
Reinforcement Learning  Basic idea:  Receive feedback in the form of rewards  Agent’s utility is defined by the reward function  Must learn to act.
CS 188: Artificial Intelligence Fall 2008 Lecture 11: Reinforcement Learning 10/2/2008 Dan Klein – UC Berkeley Many slides over the course adapted from.
CS 5751 Machine Learning Chapter 13 Reinforcement Learning1 Reinforcement Learning Control learning Control polices that choose optimal actions Q learning.
1 Passive Reinforcement Learning Ruti Glick Bar-Ilan university.
CS 182 Reinforcement Learning. An example RL domain Solitaire –What is the state space? –What are the actions? –What is the transition function? Is it.
Reinforcement learning (Chapter 21)
Reinforcement Learning (1)
Reinforcement learning (Chapter 21)
Markov Decision Processes
Deep reinforcement learning
Reinforcement Learning
"Playing Atari with deep reinforcement learning."
CS 188: Artificial Intelligence Spring 2006
CS 188: Artificial Intelligence Fall 2008
CS 188: Artificial Intelligence Spring 2006
CS 416 Artificial Intelligence
Deep Reinforcement Learning: Learning how to act using a deep neural network Psych 209, Winter 2019 February 12, 2019.
Reinforcement Learning (2)
Reinforcement Learning (2)
CS 440/ECE448 Lecture 22: Reinforcement Learning
Presentation transcript:

Reinforcement learning (Chapter 21)

Reinforcement learning Regular MDP Given: Transition model P(s’ | s, a) Reward function R(s) Find: Policy (s) Reinforcement learning Transition model and reward function initially unknown Still need to find the right policy “Learn by doing”

Reinforcement learning: Basic scheme In each time step: Take some action Observe the outcome of the action: successor state and reward Update some internal representation of the environment and policy If you reach a terminal state, just start over (each pass through the environment is called a trial) Why is this called reinforcement learning? See http://en.wikipedia.org/wiki/Reinforcement for discussion of reinforcement learning in psychology

Applications of reinforcement learning Backgammon What is the state representation? What is the transition model? What is the reward function? http://www.research.ibm.com/massive/tdl.html http://en.wikipedia.org/wiki/TD-Gammon

Applications of reinforcement learning Learning a fast gait for Aibos Initial gait Learned gait Policy Gradient Reinforcement Learning for Fast Quadrupedal Locomotion Nate Kohl and Peter Stone. IEEE International Conference on Robotics and Automation, 2004.

Applications of reinforcement learning Stanford autonomous helicopter Pieter Abbeel et al.

Applications of reinforcement learning Playing Atari with deep reinforcement learning Video V. Mnih et al., Nature, February 2015

Applications of reinforcement learning End-to-end training of deep visuomotor policies Video Sergey Levine et al., Berkeley

Applications of reinforcement learning Active object localization with deep reinforcement learning J. Caicedo and S. Lazebnik, ICCV 2015, to appear

Review: Reinforcement learning

Reinforcement learning strategies Model-based Learn the model of the MDP (transition probabilities and rewards) and try to solve the MDP concurrently Model-free Learn how to act without explicitly learning the transition probabilities P(s’ | s, a) Q-learning: learn an action-utility function Q(s,a) that tells us the value of doing action a in state s

Model-based reinforcement learning Basic idea: try to learn the model of the MDP (transition probabilities and rewards) and learn how to act (solve the MDP) simultaneously Learning the model: Keep track of how many times state s’ follows state s when you take action a and update the transition probability P(s’ | s, a) according to the relative frequencies Keep track of the rewards R(s) Learning how to act: Estimate the utilities U(s) using Bellman’s equations Choose the action that maximizes expected future utility:

Model-based reinforcement learning Learning how to act: Estimate the utilities U(s) using Bellman’s equations Choose the action that maximizes expected future utility given the model of the environment we’ve experienced through our actions so far: Is there any problem with this “greedy” approach?

Exploration vs. exploitation Exploration: take a new action with unknown consequences Pros: Get a more accurate model of the environment Discover higher-reward states than the ones found so far Cons: When you’re exploring, you’re not maximizing your utility Something bad might happen Exploitation: go with the best strategy found so far Maximize reward as reflected in the current utility estimates Avoid bad stuff Might also prevent you from discovering the true optimal strategy

Incorporating exploration Idea: explore more in the beginning, become more and more greedy over time Standard (“greedy”) selection of optimal action: Modified strategy: Number of times we’ve taken action a’ in state s exploration function (optimistic reward estimate)

Model-free reinforcement learning Idea: learn how to act without explicitly learning the transition probabilities P(s’ | s, a) Q-learning: learn an action-utility function Q(s,a) that tells us the value of doing action a in state s Relationship between Q-values and utilities: Selecting an action: Compare with: With Q-values, don’t need to know the transition model to select the next action

Model-free reinforcement learning Q-learning: learn an action-utility function Q(s,a) that tells us the value of doing action a in state s Equilibrium constraint on Q values: What is the relationship between this constraint and the Bellman equation? The expression for U(s) has max_a on the right hand side because U(s) = max_a Q(s,a). In other words, to get from the expression for Q(s,a) (eq. 1) to the one for U(s) (eq. 2), add max_a to both sides of eq. 1 and replace max_a’ Q(s’,a’) in eq. 1 by U(s’) in eq. 2

Model-free reinforcement learning Q-learning: learn an action-utility function Q(s,a) that tells us the value of doing action a in state s Equilibrium constraint on Q values: Problem: we don’t know (and don’t want to learn) P(s’ | s, a) What is the relationship between the constraint on the Q-values and the Bellman equation?

Temporal difference (TD) learning Equilibrium constraint on Q values: Temporal difference (TD) update: Pretend that the currently observed transition (s,a,s’) is the only possible outcome and adjust the Q values towards the “local equilibrium”

Temporal difference (TD) learning At each time step t From current state s, select an action a: Get the successor state s’ Perform the TD update: Exploration function Number of times we’ve taken action a’ from state s Learning rate Should start at 1 and decay as O(1/t) e.g., (t) = 60/(59 + t)

Temporal difference (TD) learning At each time step t From current state s, select an action a: Get the successor state s’ Perform the TD update: Exploration function Number of times we’ve taken action a’ from state s Q-learning demo: http://www.cs.ubc.ca/~poole/demos/rl/q.html

TD Q-learning result Source: Berkeley CS188

Function approximation So far, we’ve assumed a lookup table representation for utility function U(s) or action-utility function Q(s,a) But what if the state space is really large or continuous? Alternative idea: approximate the utility function, e.g., as a weighted linear combination of features: RL algorithms can be modified to estimate these weights More generally, functions can be nonlinear (e.g., neural networks) Recall: features for designing evaluation functions in games Benefits: Can handle very large state spaces (games), continuous state spaces (robot control) Can generalize to previously unseen states

Other techniques Policy search: instead of getting the Q-values right, you simply need to get their ordering right Write down the policy as a function of some parameters and adjust the parameters to improve the expected reward Learning from imitation: instead of an explicit reward function, you have expert demonstrations of the task to learn from