CS 541: Artificial Intelligence Lecture X: Markov Decision Process Slides Credit: Peter Norvig and Sebastian Thrun.

Slides:



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

Value and Planning in MDPs. Administrivia Reading 3 assigned today Mahdevan, S., “Representation Policy Iteration”. In Proc. of 21st Conference on Uncertainty.
Markov Decision Process
SA-1 Probabilistic Robotics Planning and Control: Partially Observable Markov Decision Processes.
CSE-573 Artificial Intelligence Partially-Observable MDPS (POMDPs)
Announcements  Homework 3: Games  Due tonight at 11:59pm.  Project 2: Multi-Agent Pacman  Has been released, due Friday 2/21 at 5:00pm.  Optional.
Decision Theoretic Planning
Meeting 3 POMDP (Partial Observability MDP) 資工四 阮鶴鳴 李運寰 Advisor: 李琳山教授.
CS 188: Artificial Intelligence
Classical Situation hellheaven World deterministic State observable.
Markov Decision Processes
Planning under Uncertainty
POMDPs: Partially Observable Markov Decision Processes Advanced AI
Announcements Homework 3: Games Project 2: Multi-Agent Pacman
SA-1 1 Probabilistic Robotics Planning and Control: Markov Decision Processes.
91.420/543: Artificial Intelligence UMass Lowell CS – Fall 2010
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.
Markov Decision Processes Value Iteration Pieter Abbeel UC Berkeley EECS TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Department of Computer Science Undergraduate Events More
Reinforcement Learning Yishay Mansour Tel-Aviv University.
Utility Theory & MDPs Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart.
Instructor: Vincent Conitzer
MAKING COMPLEX DEClSlONS
CSE-473 Artificial Intelligence Partially-Observable MDPS (POMDPs)
Reinforcement Learning  Basic idea:  Receive feedback in the form of rewards  Agent’s utility is defined by the reward function  Must learn to act.
CSE-573 Reinforcement Learning POMDPs. Planning What action next? PerceptsActions Environment Static vs. Dynamic Fully vs. Partially Observable Perfect.
Computer Science CPSC 502 Lecture 14 Markov Decision Processes (Ch. 9, up to 9.5.3)
CSE 473Markov Decision Processes Dan Weld Many slides from Chris Bishop, Mausam, Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer.
CPSC 7373: Artificial Intelligence Lecture 10: Planning with Uncertainty Jiang Bian, Fall 2012 University of Arkansas at Little Rock.
Reinforcement Learning Yishay Mansour Tel-Aviv University.
A Tutorial on the Partially Observable Markov Decision Process and Its Applications Lawrence Carin June 7,2006.
Quiz 6: Utility Theory  Simulated Annealing only applies to continuous f(). False  Simulated Annealing only applies to differentiable f(). False  The.
INTRODUCTION TO Machine Learning
MDPs (cont) & Reinforcement Learning
gaflier-uas-battles-feral-hogs/ gaflier-uas-battles-feral-hogs/
Decision Theoretic Planning. Decisions Under Uncertainty  Some areas of AI (e.g., planning) focus on decision making in domains where the environment.
CS 188: Artificial Intelligence Spring 2007 Lecture 23: Reinforcement Learning: III 4/17/2007 Srini Narayanan – ICSI and UC Berkeley.
Announcements  Upcoming due dates  Wednesday 11/4, 11:59pm Homework 8  Friday 10/30, 5pm Project 3  Watch out for Daylight Savings and UTC.
CSE 473Markov Decision Processes Dan Weld Many slides from Chris Bishop, Mausam, Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer.
Reinforcement Learning Dynamic Programming I Subramanian Ramamoorthy School of Informatics 31 January, 2012.
Department of Computer Science Undergraduate Events More
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.
CS 188: Artificial Intelligence Spring 2007 Lecture 21:Reinforcement Learning: II MDP 4/12/2007 Srini Narayanan – ICSI and UC Berkeley.
Partial Observability “Planning and acting in partially observable stochastic domains” Leslie Pack Kaelbling, Michael L. Littman, Anthony R. Cassandra;
CS 541: Artificial Intelligence Lecture XI: Reinforcement Learning Slides Credit: Peter Norvig and Sebastian Thrun.
Announcements  Homework 3: Games  Due tonight at 11:59pm.  Project 2: Multi-Agent Pacman  Has been released, due Friday 2/19 at 5:00pm.  Optional.
Def gradientDescent(x, y, theta, alpha, m, numIterations): xTrans = x.transpose() replaceMe =.0001 for i in range(0, numIterations): hypothesis = np.dot(x,
Reinforcement Learning  Basic idea:  Receive feedback in the form of rewards  Agent’s utility is defined by the reward function  Must learn to act.
Announcements Grader office hours posted on course website
Making complex decisions
Markov Decision Processes
CS 4/527: Artificial Intelligence
CSE 473: Artificial Intelligence
Markov Decision Processes
Markov Decision Processes
CS 188: Artificial Intelligence
Quiz 6: Utility Theory Simulated Annealing only applies to continuous f(). False Simulated Annealing only applies to differentiable f(). False The 4 other.
CS 188: Artificial Intelligence Fall 2007
CS 188: Artificial Intelligence Fall 2008
CS 188: Artificial Intelligence Fall 2008
CS 188: Artificial Intelligence Fall 2007
CSE 473 Markov Decision Processes
CS 188: Artificial Intelligence Spring 2006
CS 188: Artificial Intelligence Fall 2007
CS 416 Artificial Intelligence
Reinforcement Learning Dealing with Partial Observability
Announcements Homework 2 Project 2 Mini-contest 1 (optional)
Warm-up as You Walk In Given Set actions (persistent/static)
Markov Decision Processes
Markov Decision Processes
Presentation transcript:

CS 541: Artificial Intelligence Lecture X: Markov Decision Process Slides Credit: Peter Norvig and Sebastian Thrun

Schedule  TA: Vishakha Sharma  Address: WeekDateTopicReadingHomework 108/30/2011Introduction & Intelligent AgentCh 1 & 2N/A 209/06/2011Search: search strategy and heuristic searchCh 3 & 4sHW1 (Search) 309/13/2011Search: Constraint Satisfaction & Adversarial SearchCh 4s & 5 & 6 Teaming Due 409/20/2011Logic: Logic Agent & First Order LogicCh 7 & 8sHW1 due, Midterm Project (Game) 509/27/2011Logic: Inference on First Order LogicCh 8s & 9 610/04/2011Uncertainty and Bayesian NetworkCh 13 &14sHW2 (Logic) 10/11/2011No class (function as Monday) 710/18/2011Midterm Presentation Midterm Project Due 810/25/2011Inference in Baysian NetworkCh 14sHW2 Due, HW3 (Probabilistic Reasoning) 911/01/2011Probabilistic Reasoning over TimeCh /08/2011TA Session: Review of HW1 & 2 HW3 due, HW4 (MDP) 1111/15/2011Supervised Machine LearningCh /22/2011Markov Decision ProcessCh 16 HW4 due 1311/29/2011Reinforcement learningCh /06/2011Final Project Presentation Final Project Due

Re-cap of Lecture IX  Machine Learning  Classification (Naïve Bayes)  Regression (Linear, Smoothing)  Linear Separation (Perceptron, SVMs)  Non-parametric classification (KNN)

Outline  Planning under uncertainty  Planning with Markov Decision Processes  Utilities and Value Iteration  Partially Observable Markov Decision Processes

Planning under uncertainty

Rhino Museum Tourguide 6

Minerva Robot 7

Pearl Robot 8

Mine Mapping Robot Groundhog 9

10

Planning Uncertainty 11

Planning: Classical Situation hellheaven World deterministic State observable

MDP-Style Planning hellheaven World stochastic State observable [Koditschek 87, Barto et al. 89] Policy Universal Plan Navigation function

Stochastic, Partially Observable sign hell?heaven? [Sondik 72] [Littman/Cassandra/Kaelbling 97]

Stochastic, Partially Observable sign hellheaven sign heavenhell

Stochastic, Partially Observable sign heavenhell sign ?? hellheaven start 50%

Stochastic, Partially Observable sign ?? start sign heavenhell sign hellheaven 50% sign ?? start

A Quiz  -dim continuous stochastic 1-dim continuous stochastic actions# statessize belief space?sensors 3: s 1, s 2, s 3 deterministic3perfect 3: s 1, s 2, s 3 stochastic3perfect : s 1, s 2, s 3, s 12, s 13, s 23, s 123 deterministic3 abstract states deterministic3stochastic 2-dim continuous: p ( S=s 1 ), p ( S=s 2 ) stochastic3none 2-dim continuous: p ( S=s 1 ), p ( S=s 2 )  -dim continuous deterministic 1-dim continuous stochastic aargh! stochastic  -dim continuous stochastic

Planning with Markov Decision Processes

MPD Planning  Solution for Planning problem  Noisy controls  Perfect perception  Generates “universal plan” (=policy)

Grid World  The agent lives in a grid  Walls block the agent’s path  The agent’s actions do not always go as planned:  80% of the time, the action North takes the agent North (if there is no wall there)  10% of the time, North takes the agent West; 10% East  If there is a wall in the direction the agent would have been taken, the agent stays put  Small “living” reward each step  Big rewards come at the end  Goal: maximize sum of rewards*

Grid Futures 22 Deterministic Grid WorldStochastic Grid World X X E N S W X ? X XX

Markov Decision Processes  An MDP is defined by:  A set of states s  S  A set of actions a  A  A transition function T(s,a,s’)  Prob that a from s leads to s’  i.e., P(s’ | s,a)  Also called the model  A reward function R(s, a, s’)  Sometimes just R(s) or R(s’)  A start state (or distribution)  Maybe a terminal state  MDPs are a family of non-deterministic search problems  Reinforcement learning: MDPs where we don’t know the transition or reward functions 23

Solving MDPs  In deterministic single-agent search problems, want an optimal plan, or sequence of actions, from start to a goal  In an MDP, we want an optimal policy  *: S → A  A policy  gives an action for each state  An optimal policy maximizes expected utility if followed  Defines a reflex agent Optimal policy when R(s, a, s’) = for all non- terminals s

Example Optimal Policies R(s) = -2.0 R(s) = -0.4 R(s) = -0.03R(s) = -0.01

MDP Search Trees  Each MDP state gives a search tree a s s’s’ s, a (s,a,s’) called a transition T(s,a,s’) = P(s’|s,a) R(s,a,s’) s,a,s’ s is a state (s, a) is a q- state 26

Why Not Search Trees?  Why not solve with conventional planning?  Problems:  This tree is usually infinite (why?)  Same states appear over and over (why?)  We would search once per state (why?) 27

Utilities

 Utility = sum of future reward  Problem: infinite state sequences have infinite rewards  Solutions:  Finite horizon:  Terminate episodes after a fixed T steps (e.g. life)  Gives nonstationary policies (  depends on time left)  Absorbing state: guarantee that for every policy, a terminal state will eventually be reached (like “done” for High-Low)  Discounting: for 0 <  < 1  Smaller  means smaller “horizon” – shorter term focus 29

Discounting  Typically discount rewards by  < 1 each time step  Sooner rewards have higher utility than later rewards  Also helps the algorithms converge 30

Recap: Defining MDPs  Markov decision processes:  States S  Start state s 0  Actions A  Transitions P(s’|s,a) (or T(s,a,s’))  Rewards R(s,a,s’) (and discount  )  MDP quantities so far:  Policy = Choice of action for each state  Utility (or return) = sum of discounted rewards a s s, a s,a,s’ s’s’ 31

Optimal Utilities  Fundamental operation: compute the values (optimal expect-max utilities) of states s  Why? Optimal values define optimal policies!  Define the value of a state s: V * (s) = expected utility starting in s and acting optimally  Define the value of a q-state (s,a): Q * (s,a) = expected utility starting in s, taking action a and thereafter acting optimally  Define the optimal policy:  * (s) = optimal action from state s a s s, a s,a,s’ s’s’ 32

The Bellman Equations  Definition of “optimal utility” leads to a simple one-step lookahead relationship amongst optimal utility values: Optimal rewards = maximize over first action and then follow optimal policy  Formally: a s s, a s,a,s’ s’s’ 33

Solving MDPs  We want to find the optimal policy  *  Proposal 1: modified expect-max search, starting from each state s: a s s, a s,a,s’ s’s’ 34

Value Iteration  Idea:  Start with V 0 * (s) = 0  Given V i *, calculate the values for all states for depth i+1:  This is called a value update or Bellman update  Repeat until convergence  Theorem: will converge to unique optimal values  Basic idea: approximations get refined towards optimal values  Policy may converge long before values do 35

Example: Bellman Updates 36 max happens for a=right, other actions not shown Example:  =0.9, living reward=0, noise=0.2

Example: Value Iteration  Information propagates outward from terminal states and eventually all states have correct value estimates V2V2 V3V3 37

Computing Actions  Which action should we chose from state s:  Given optimal values V?  Given optimal q-values Q?  Lesson: actions are easier to select from Q’s!

Asynchronous Value Iteration*  In value iteration, we update every state in each iteration  Actually, any sequences of Bellman updates will converge if every state is visited infinitely often  In fact, we can update the policy as seldom or often as we like, and we will still converge  Idea: Update states whose value we expect to change: If is large then update predecessors of s

Value Iteration: Example

Another Example Value Function and PlanMap

Another Example Value Function and PlanMap

Partially Observable Markov Decision Processes

Stochastic, Partially Observable sign ?? start sign heavenhell sign hellheaven 50% sign ?? start

Value Iteration in Belief space: POMDPs  Partially Observable Markov Decision Process  Known model (learning even harder!)  Observation uncertainty  Usually also: transition uncertainty  Planning in belief space = space of all probability distributions  Value function: Piecewise linear, convex function over the belief space 45

Introduction to POMDPs (1 of 3) 80 100 ba 0 ba 40 s2s2 s1s1 action a action b p(s1)p(s1) [Sondik 72, Littman, Kaelbling, Cassandra ‘97] s2s2 s1s1  action aaction b

Introduction to POMDPs (2 of 3) 80 100 ba 0 ba 40 s2s2 s1s1 80% c 20% p(s1)p(s1) s2s2 s1’s1’ s1s1 s2’s2’ p(s1’)p(s1’) p(s1)p(s1) s2s2 s1s1  [Sondik 72, Littman, Kaelbling, Cassandra ‘97]

Introduction to POMDPs (3 of 3) 80 100 ba 0 ba 40 s2s2 s1s1 80% c 20% p(s1)p(s1) s2s2 s1s1  p(s1)p(s1) s2s2 s1s1 s1s1 s2s2 p(s 1 ’|A) B A 50% 30% 70% B A p(s 1 ’|B) [Sondik 72, Littman, Kaelbling, Cassandra ‘97]

POMDP Algorithm  Belief space = Space of all probability distribution (continuous)  Value function: Max of set of linear functions in belief space  Backup: Create new linear functions  Number of linear functions can grow fast! 49

Why is This So Complex? State Space Planning (no state uncertainty) Belief Space Planning (full state uncertainties) ?

but not usually. The controller may be globally uncertain... Belief Space Structure

Augmented MDPs: [Roy et al, 98/99] conventional state space uncertainty (entropy)

Path Planning with Augmented MDPs information gainConventional plannerProbabilistic Planner [Roy et al, 98/99]