Sequential Stochastic Models

Slides:



Advertisements
Similar presentations
State Estimation and Kalman Filtering CS B659 Spring 2013 Kris Hauser.
Advertisements

CSE-573 Artificial Intelligence Partially-Observable MDPS (POMDPs)
Lirong Xia Probabilistic reasoning over time Tue, March 25, 2014.
Dynamic Bayesian Networks (DBNs)
Hidden Markov Models Reading: Russell and Norvig, Chapter 15, Sections
1 Slides for the book: Probabilistic Robotics Authors: Sebastian Thrun Wolfram Burgard Dieter Fox Publisher: MIT Press, Web site for the book & more.
Advanced Artificial Intelligence
1 Reasoning Under Uncertainty Over Time CS 486/686: Introduction to Artificial Intelligence Fall 2013.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) March, 16, 2009.
CPSC 322, Lecture 18Slide 1 Planning: Heuristics and CSP Planning Computer Science cpsc322, Lecture 18 (Textbook Chpt 8) February, 12, 2010.
Probabilistic reasoning over time So far, we’ve mostly dealt with episodic environments –One exception: games with multiple moves In particular, the Bayesian.
10/28 Temporal Probabilistic Models. Temporal (Sequential) Process A temporal process is the evolution of system state over time Often the system state.
Markov Decision Processes CSE 473 May 28, 2004 AI textbook : Sections Russel and Norvig Decision-Theoretic Planning: Structural Assumptions.
Planning CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanning Supervised.
Planning II CSE 473. © Daniel S. Weld 2 Logistics Tournament! PS3 – later today Non programming exercises Programming component: (mini project) SPAM detection.
Markov Decision Processes CSE 573. Add concrete MDP example No need to discuss strips or factored models Matrix ok until much later Example key (e.g.
Probabilistic Robotics Introduction Probabilities Bayes rule Bayes filters.
CPSC 322, Lecture 31Slide 1 Probability and Time: Markov Models Computer Science cpsc322, Lecture 31 (Textbook Chpt 6.5) March, 25, 2009.
11/14  Continuation of Time & Change in Probabilistic Reasoning Project 4 progress? Grade Anxiety? Make-up Class  On Monday?  On Wednesday?
CPSC 322, Lecture 32Slide 1 Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5) March, 27, 2009.
CPSC 422, Lecture 14Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14 Feb, 4, 2015 Slide credit: some slides adapted from Stuart.
CS 188: Artificial Intelligence Fall 2009 Lecture 19: Hidden Markov Models 11/3/2009 Dan Klein – UC Berkeley.
Dynamic Bayesian Networks CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanningLearning.
CPSC 322, Lecture 24Slide 1 Reasoning under Uncertainty: Intro to Probability Computer Science cpsc322, Lecture 24 (Textbook Chpt 6.1, 6.1.1) March, 15,
Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today.
CSE 573 Artificial Intelligence Dan Weld Peng Dai
1 Robot Environment Interaction Environment perception provides information about the environment’s state, and it tends to increase the robot’s knowledge.
CPSC 322, Lecture 32Slide 1 Probability and Time: Hidden Markov Models (HMMs) Computer Science cpsc322, Lecture 32 (Textbook Chpt 6.5.2) Nov, 25, 2013.
UIUC CS 498: Section EA Lecture #21 Reasoning in Artificial Intelligence Professor: Eyal Amir Fall Semester 2011 (Some slides from Kevin Murphy (UBC))
QUIZ!!  In HMMs...  T/F:... the emissions are hidden. FALSE  T/F:... observations are independent given no evidence. FALSE  T/F:... each variable X.
CPS 170: Artificial Intelligence Markov processes and Hidden Markov Models (HMMs) Instructor: Vincent Conitzer.
CPSC 322, Lecture 26Slide 1 Reasoning Under Uncertainty: Belief Networks Computer Science cpsc322, Lecture 27 (Textbook Chpt 6.3) Nov, 13, 2013.
CSE 573: Artificial Intelligence Autumn 2012 Particle Filters for Hidden Markov Models Daniel Weld Many slides adapted from Dan Klein, Stuart Russell,
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
CS 541: Artificial Intelligence Lecture VIII: Temporal Probability Models.
CS 541: Artificial Intelligence Lecture VIII: Temporal Probability Models.
CS498-EA Reasoning in AI Lecture #23 Instructor: Eyal Amir Fall Semester 2011.
Probability and Time: Hidden Markov Models (HMMs)
Reasoning Under Uncertainty: Belief Networks
Planning: Forward Planning and CSP Planning
Probabilistic reasoning over time
Probabilistic Reasoning
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Instructor: Vincent Conitzer
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Markov ó Kalman Filter Localization
Probabilistic Reasoning over Time
Probabilistic Reasoning
Probability and Time: Markov Models
Probability and Time: Markov Models
CS 188: Artificial Intelligence Spring 2007
Representing Uncertainty
Planning CSE 573 A handful of GENERAL SEARCH TECHNIQUES lie at the heart of practically all work in AI We will encounter the SAME PRINCIPLES again and.
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 2
Instructors: Fei Fang (This Lecture) and Dave Touretzky
Probability and Time: Markov Models
Probabilistic Reasoning
Probabilistic Reasoning
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Chapter14-cont..
Probability and Time: Markov Models
Hidden Markov Models Lirong Xia.
Reinforcement Learning Dealing with Partial Observability
Instructor: Vincent Conitzer
Instructor: Vincent Conitzer
Probabilistic reasoning over time
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 7
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 14
Presentation transcript:

Sequential Stochastic Models CSE 573

Logistics Reading Project 1 AIMA 17 thru 17.2 and 17.4 Due Wed 11/10 end of day Emphasis on report, experiments and conclusions Please hand in 2 printouts of your report One to Dan One to Miao Also send .doc or .pdf file We will link this to the class web © Daniel S. Weld

Sequential Stochastic Models Why sequential? What kind of sequences? © Daniel S. Weld

“Doing Time” (Hidden) Markov Models Dynamic Bayesian Networks © Daniel S. Weld

Knowledge Representation & Inference 573 Topics Reinforcement Learning Supervised Learning Planning Knowledge Representation & Inference Logic-Based Probabilistic Search Problem Spaces Agency © Daniel S. Weld

Where in Time are We? STRIPS Representation Uncertainty Bayesian Networks Sequential Stochastic Processes (Hidden) Markov Models Dynamic Bayesian networks (DBNs) Markov Decision Processes (MDPs) Reinforcement Learning © Daniel S. Weld

Defn: Markov Model Q: set of states p: init prob distribution A: transition probability distribution © Daniel S. Weld

E.g. Predict Web Behavior When will visitor leave site? Q: set of states (Pages) p: init prob distribution (Likelihood of site entry point) A: transition probability distribution (User navigation model) © Daniel S. Weld

Probability Distribution, A Forward Causality The probability of st does not depend directly on values of future states. Probability of new state could depend on The history of states visited. Pr(st|st-1,st-2,…, s0) Markovian Assumption Pr(st|st-1,st-2,…s0) = Pr(st|st-1) Stationary Model Assumption Pr(st|st-1) = Pr(sk|sk-1) for all k. © Daniel S. Weld

Representing A Q: set of states p: init prob distribution A: transition probabilities how can we represent these? s0 s1 s2 s3 s4 s5 s6 s0 s1 s2 s3 s4 s5 s6 p12 Probability of transitioning from s1 to s2 ∑ ? © Daniel S. Weld

How Learn A? Something on smoothing © Daniel S. Weld

Defn: Hidden Markov Model Q: set of states p: init prob distribution A: transition probability distribution Add obs model O: set of possible observatons © Daniel S. Weld

Ex: Speech Recognition Ground it © Daniel S. Weld

What can we do with HMMs? State estimation (filtering, monitoring) Compute belief state given evidence Prediction Predict posterior distribution over future state Smoothing (hindsight) Predict posterior distribution over past state Most likely explanation Given obs. seq, predict most likely seq of states Planning If you add rewards (Next class) © Daniel S. Weld

HMMs  DBNs Recursive Estimation Forward-Backward Verterbi Filtering & Prediction – O(n) time; O(1) space Forward-Backward Smoothing – O(n) time; O(1) space Verterbi Finding Most Likely Sequence O(n) time; O(n) space N is exponential in the number of features © Daniel S. Weld

Factoring Q Represent Q simply as a Is there internal structure? set of states? Is there internal structure? Consider a robot domain What is the state space? © Daniel S. Weld

A Factored domain Six Boolean Variables : How many states? has_user_coffee (huc) , has_robot_coffee (hrc), robot_is_wet (w), has_robot_umbrella (u), raining (r), robot_in_office (o) How many states? 26 = 64 © Daniel S. Weld

Representing  Compactly Q: set of states s3 s1 s0 p: init prob distribution How represent this efficiently? s4 s6 s2 s5 r u hrc With a Bayes net (of course!) w © Daniel S. Weld

Representing A Compactly Q: set of states s3 s1 s0 p: init prob distribution s4 s6 s2 A: transition probabilities s5 s0 s1 s2 s3 s4 s5 s6 … s35 s0 s1 s2 s3 s4 s5 s6 … s35 p12 How big is matrix version of A? 4096 © Daniel S. Weld

2-Dynamic Bayesian Network 8 4 16 2 huc huc Total values required to represent transition probability table = 36 Vs. 4096 required for a complete state probablity table? hrc hrc w w u u r r o o T T+1 © Daniel S. Weld

ADD Make concrete by showing CPT values This means we must have actions by now. © Daniel S. Weld

Dynamic Bayesian Network huc hrc w u r o huc hrc w u r o T T+1 Defined formally as * Set of random vars * BN for initial state * 2-layer DBN for transitions Also known as a Factored Markov Model © Daniel S. Weld

This is Really a “Schema” huc hrc w u r o T T+1 “Unrolling” © Daniel S. Weld

Semantics: A DBN  A Normal Bayesian Network u w hrc huc o r u w hrc huc o r u w hrc huc huc hrc w u r o 1 2 3 © Daniel S. Weld

Add Actions must come Before inference Observatuons can come later Or…. Add a concrete example of why this would help Observatuons can come later Talk about noisy sensors (Early on assume some vars observerd perfectly) © Daniel S. Weld

Inference Expand DBN (schema) into BN Particle Filters Use inference as shown last week Problem? Particle Filters © Daniel S. Weld

Multiple Actions Variables : Actions : We need an extra variable has_user_coffee (huc) , has_robot_coffee (hrc), robot_is_wet (w), has_robot_umbrella (u), raining (r), robot_in_office (o) Actions : buy_coffee, deliver_coffee, get_umbrella, move We need an extra variable (Alternatively a separate 2DBN / action) © Daniel S. Weld

Actions in DBN T T+1 huc huc hrc hrc w w u u r r o o a © Daniel S. Weld

Simplifying Assumptions Environment Static vs. Dynamic Instantaneous vs. Durative Deterministic Stochastic vs. Deterministic vs. Stochastic Fully Observable vs. Partially Observable What action next? Perfect vs. Noisy Percepts Actions Full vs. Partial satisfaction © Daniel S. Weld

STRIPS Action Schemata Instead of defining ground actions: pickup-A and pickup-B and … Define a schema: (:operator pick-up :parameters ((block ?ob1)) :precondition (and (clear ?ob1) (on-table ?ob1) (arm-empty)) :effect (and (not (clear ?ob1)) (not (on-table ?ob1)) (not (arm-empty)) (holding ?ob1))) Note: strips doesn’t allow derived effects; you must be complete! } © Daniel S. Weld

Deterministic “STRIPS”? arm_empty pick_up_A clear_A on_table_A - arm_empty - on_table_A + holding_A © Daniel S. Weld

Probabilistic STRIPS? pick_up_A arm_empty clear_A on_table_A P<0.9 - arm_empty - on_table_A + holding_A pick_up_A © Daniel S. Weld

NEED!!! Concrete DBN corresponding to STRIPS Ideally change example To robot domain Use robot coffee examples of strips © Daniel S. Weld

State Estimation O R Huc Hrc U W ? ? Move BuyC © Daniel S. Weld

Noisy Observations T T+1 True state vars (unobserved) huc huc hrc hrc w w u u True state vars (unobserved) r r o o Yo Yo Noisy, sensor reading of o a T T+1 o o Action var Known with certainty Yo .9 .2 © Daniel S. Weld

State Estimation O R Huc Hrc U W ? ? Move BuyC Yo=T … © Daniel S. Weld

Maybe we don’t know action! huc huc hrc hrc w w u u True state vars (unobserved) r r o o Yo Yo Noisy, sensor reading a T T+1 o o Action var (other agent’s action) Yo .9 .2 © Daniel S. Weld

State Estimation O R Huc Hrc U W ? ? ? ? So=T … © Daniel S. Weld

Particle Filters Create 1000s of “Particles” Simulate Each one has a “copy” of each random var These have concrete values Distribution is approximated by whole set Approximate technique! Fast! Simulate Each time step, iterate per particle Use the 2 layer DBN + random # generator to Predict next value for each random var Resample! © Daniel S. Weld

Resampling Simulate Each time step, iterate per particle Resample: Use the 2 layer DBN + random # generator to Predict next value for each random var Resample: Given observations (if any) at new time point Calculate the likelihood of each particle Create a new population of particles by Sampling from old population Proportionally to likelihood © Daniel S. Weld

Add Dieter example Or KDD cup Gazelle example. And Thad Starner example. © Daniel S. Weld