Markov Decision Process

Slides:



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

Markov Decision Processes (MDPs) read Ch utility-based agents –goals encoded in utility function U(s), or U:S  effects of actions encoded in.
Value Iteration & Q-learning CS 5368 Song Cui. Outline Recap Value Iteration Q-learning.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Solving POMDPs Using Quadratically Constrained Linear Programs Christopher Amato.
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
Reinforcement Learning
MDP Presentation CS594 Automated Optimal Decision Making Sohail M Yousof Advanced Artificial Intelligence.
1 Reinforcement Learning Introduction & Passive Learning Alan Fern * Based in part on slides by Daniel Weld.
An Introduction to Markov Decision Processes Sarah Hickmott
Markov Decision Processes
Planning under Uncertainty
SA-1 1 Probabilistic Robotics Planning and Control: Markov Decision Processes.
91.420/543: Artificial Intelligence UMass Lowell CS – Fall 2010
KI Kunstmatige Intelligentie / RuG Markov Decision Processes AIMA, Chapter 17.
Planning in MDPs S&B: Sec 3.6; Ch. 4. Administrivia Reminder: Final project proposal due this Friday If you haven’t talked to me yet, you still have the.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Optimal Fixed-Size Controllers for Decentralized POMDPs Christopher Amato Daniel.
Markov Decision Processes
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.
Department of Computer Science Undergraduate Events More
More RL. MDPs defined A Markov decision process (MDP), M, is a model of a stochastic, dynamic, controllable, rewarding process given by: M = 〈 S, A,T,R.
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
Reinforcement Learning
Reinforcement Learning  Basic idea:  Receive feedback in the form of rewards  Agent’s utility is defined by the reward function  Must learn to act.
Markov Decision Processes1 Definitions; Stationary policies; Value improvement algorithm, Policy improvement algorithm, and linear programming for discounted.
1 ECE-517 Reinforcement Learning in Artificial Intelligence Lecture 7: Finite Horizon MDPs, Dynamic Programming Dr. Itamar Arel College of Engineering.
Computer Science CPSC 502 Lecture 14 Markov Decision Processes (Ch. 9, up to 9.5.3)
Utilities and MDP: A Lesson in Multiagent System Based on Jose Vidal’s book Fundamentals of Multiagent Systems Henry Hexmoor SIUC.
Department of Computer Science Undergraduate Events More
Quiz 6: Utility Theory  Simulated Annealing only applies to continuous f(). False  Simulated Annealing only applies to differentiable f(). False  The.
MDPs (cont) & Reinforcement Learning
Decision Theoretic Planning. Decisions Under Uncertainty  Some areas of AI (e.g., planning) focus on decision making in domains where the environment.
CPS 570: Artificial Intelligence Markov decision processes, POMDPs
Announcements  Upcoming due dates  Wednesday 11/4, 11:59pm Homework 8  Friday 10/30, 5pm Project 3  Watch out for Daylight Savings and UTC.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Fully Observable MDP.
Department of Computer Science Undergraduate Events More
Markov Decision Process (MDP)
MDPs and Reinforcement Learning. Overview MDPs Reinforcement learning.
Comparison Value vs Policy iteration
Department of Computer Science Undergraduate Events More
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.
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.
Reinforcement Learning  Basic idea:  Receive feedback in the form of rewards  Agent’s utility is defined by the reward function  Must learn to act.
1 Passive Reinforcement Learning Ruti Glick Bar-Ilan university.
Markov Decision Process (MDP)
Announcements Grader office hours posted on course website
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 3
Making complex decisions
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 3
Markov Decision Processes
Reinforcement Learning
Markov Decision Processes
Markov Decision Processes
CS 188: Artificial Intelligence
CAP 5636 – Advanced Artificial Intelligence
CS 188: Artificial Intelligence Fall 2007
CS 188: Artificial Intelligence Fall 2008
13. Acting under Uncertainty Wolfram Burgard and Bernhard Nebel
Instructor: Vincent Conitzer
Chapter 17 – Making Complex Decisions
CS 188: Artificial Intelligence Spring 2006
Hidden Markov Models (cont.) Markov Decision Processes
CS 416 Artificial Intelligence
Reinforcement Learning Dealing with Partial Observability
CS 416 Artificial Intelligence
Markov Decision Processes
Markov Decision Processes
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 3
Presentation transcript:

Markov Decision Process Components: States s, beginning with initial state s0 Actions a Each state s has actions A(s) available from it Transition model P(s’ | s, a) Markov assumption: the probability of going to s’ from s depends only on s and not on any of the previous states Reward function R(s) Policy (s): the action that an agent takes in any given state The “solution” to an MDP

Overview First, we will look at how to “solve” MDPs, or find the optimal policy when the transition model and the reward function are known Next time, we will consider reinforcement learning, where we don’t know the rules of the environment or the consequences of our actions

Example 1: Game show A series of questions with increasing level of difficulty and increasing payoff Decision: at each step, take your earnings and quit, or go for the next question If you answer wrong, you lose everything $100 question $1,000 question $10,000 question $50,000 question Correct: $61,100 Q1 Q2 Q3 Q4 Correct Correct Correct Incorrect: $0 Incorrect: $0 Incorrect: $0 Incorrect: $0 Quit: $100 Quit: $1,100 Quit: $11,100

Example 1: Game show Consider $50,000 question Probability of guessing correctly: 1/10 Quit or go for the question? What is the expected payoff for continuing? 0.1 * 61,100 + 0.9 * 0 = 6,110 What is the optimal decision? $100 question $1,000 question $10,000 question $50,000 question Correct: $61,100 Q1 Q2 Q3 Q4 Correct Correct Correct Incorrect: $0 Incorrect: $0 Incorrect: $0 Incorrect: $0 Quit: $100 Quit: $1,100 Quit: $11,100

Example 1: Game show What should we do in Q3? What about Q2? Payoff for quitting: $1,100 Payoff for continuing: 0.5 * $11,110 = $5,555 What about Q2? $100 for quitting vs. $4166 for continuing What about Q1? U = $3,749 U = $4,166 U = $5,550 U = $11,100 $100 question $1,000 question $10,000 question $50,000 question 1/10 9/10 3/4 1/2 Correct: $61,100 Q1 Q2 Q3 Q4 Correct Correct Correct Incorrect: $0 Incorrect: $0 Incorrect: $0 Incorrect: $0 Quit: $100 Quit: $1,100 Quit: $11,100

Example 2: Grid world Transition model: R(s) = -0.04 for every non-terminal state

Example 2: Grid world Optimal policy when R(s) = -0.04 for every non-terminal state

Example 2: Grid world Optimal policies for other values of R(s):

Markov Decision Process Components: States s Actions a Each state s has actions A(s) available from it Transition model P(s’ | s, a) Markov assumption: the probability of going to s’ from s depends only on s and a, and not on any other past actions and states Reward function R(s) The solution: Policy (s): mapping from states to actions

Partially observable Markov decision processes (POMDPs) Like MDPs, only state is not directly observable States s Actions a Transition model P(s’ | s, a) Reward function R(s) Observation model P(e | s) We will only deal with fully observable MDPs Key question: given the definition of an MDP, how to compute the optimal policy?

Maximizing expected utility The optimal policy should maximize the expected utility over all possible state sequences produced by following that policy: How to define the utility of a state sequence? Sum of rewards of individual states Problem: infinite state sequences

Utilities of state sequences Normally, we would define the utility of a state sequence as the sum of the rewards of the individual states Problem: infinite state sequences Solution: discount the individual state rewards by a factor  between 0 and 1: Sooner rewards count more than later rewards Makes sure the total utility stays bounded Helps algorithms converge

Utilities of states Expected utility obtained by policy  starting in state s: The “true” utility of a state, denoted U(s), is the expected sum of discounted rewards if the agent executes an optimal policy starting in state s Reminiscent of minimax values of states…

Finding the utilities of states What is the expected utility of taking action a in state s? How do we choose the optimal action? Max node Chance node P(s’ | s, a) U(s’) What is the recursive expression for U(s) in terms of the utilities of its successor states?

The Bellman equation Recursive relationship between the utilities of successive states: Receive reward R(s) Choose optimal action a End up here with P(s’ | s, a) Get utility U(s’) (discounted by )

The Bellman equation Recursive relationship between the utilities of successive states: For N states, we get N equations in N unknowns Solving them solves the MDP We could try to solve them through expectimax search, but that would run into trouble with infinite sequences Instead, we solve them algebraically Two methods: value iteration and policy iteration

Method 1: Value iteration Start out with every U(s) = 0 Iterate until convergence During the ith iteration, update the utility of each state according to this rule: In the limit of infinitely many iterations, guaranteed to find the correct utility values In practice, don’t need an infinite number of iterations…

Value iteration What effect does the update have?

Method 2: Policy iteration Start with some initial policy 0 and alternate between the following steps: Policy evaluation: calculate Ui(s) for every state s Policy improvement: calculate a new policy i+1 based on the updated utilities

Policy evaluation Given a fixed policy , calculate U(s) for every state s The Bellman equation for the optimal policy: How does it need to change if our policy is fixed? Can solve a linear system to get all the utilities! Alternatively, can apply the following update: