Introduction to Artificial Intelligence (AI)

Similar documents
Probability and Time: Hidden Markov Models (HMMs)

Introduction to Artificial Intelligence (AI)

Reasoning under Uncertainty: Intro to Probability

Intelligent Systems (AI-2)

Intelligent Systems (AI-2)

Intelligent Systems (AI-2)

Reasoning under Uncertainty: Intro to Probability

Announcements. CS 188: Artificial Intelligence Fall Markov Models. Example: Markov Chain. Mini-Forward Algorithm. Example

CS 188: Artificial Intelligence Spring 2009

15-381: Artificial Intelligence. Hidden Markov Models (HMMs)

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

Statistical NLP: Hidden Markov Models. Updated 12/15

CSE 473: Artificial Intelligence

CS 188: Artificial Intelligence Fall 2011

CSEP 573: Artificial Intelligence

CS 5522: Artificial Intelligence II

Markov Models. CS 188: Artificial Intelligence Fall Example. Mini-Forward Algorithm. Stationary Distributions.

CS 5522: Artificial Intelligence II

CS 343: Artificial Intelligence

Markov Chains and Hidden Markov Models

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Fall Recap: Inference Example

Department of Computer Science Undergraduate Events More

CS 343: Artificial Intelligence

CS 7180: Behavioral Modeling and Decision- making in AI

Hidden Markov models 1

Intelligent Systems (AI-2)

CS532, Winter 2010 Hidden Markov Models

Hidden Markov Models NIKOLAY YAKOVETS

CS 343: Artificial Intelligence

Hidden Markov Models. AIMA Chapter 15, Sections 1 5. AIMA Chapter 15, Sections 1 5 1

Hidden Markov Models. Vibhav Gogate The University of Texas at Dallas

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

Learning from Sequential and Time-Series Data

Hidden Markov Models. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 19 Apr 2012

Announcements. CS 188: Artificial Intelligence Fall VPI Example. VPI Properties. Reasoning over Time. Markov Models. Lecture 19: HMMs 11/4/2008

Decision Theory: Markov Decision Processes

Markov Models and Hidden Markov Models

Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule

Hidden Markov Models (recap BNs)

10/17/04. Today s Main Points

Bayesian Models for Sequences

Human-Oriented Robotics. Temporal Reasoning. Kai Arras Social Robotics Lab, University of Freiburg

CS 188: Artificial Intelligence

Hidden Markov Models,99,100! Markov, here I come!

Chapter 4 Dynamic Bayesian Networks Fall Jin Gu, Michael Zhang

Hidden Markov Models The three basic HMM problems (note: change in notation) Mitch Marcus CSE 391

Decision Theory Intro: Preferences and Utility

Probability, Markov models and HMMs. Vibhav Gogate The University of Texas at Dallas

Bayesian Networks BY: MOHAMAD ALSABBAGH

L23: hidden Markov models

Reasoning Under Uncertainty: Bayesian networks intro

Computer Science CPSC 322. Lecture 18 Marginalization, Conditioning

Approximate Inference

Computational Genomics and Molecular Biology, Fall

Reasoning Under Uncertainty: More on BNets structure and construction

Reasoning Under Uncertainty Over Time. CS 486/686: Introduction to Artificial Intelligence

Final Exam December 12, 2017

Artificial Intelligence Markov Chains

Reasoning Under Uncertainty: More on BNets structure and construction

Hidden Markov Models. George Konidaris

Assignments for lecture Bioinformatics III WS 03/04. Assignment 5, return until Dec 16, 2003, 11 am. Your name: Matrikelnummer: Fachrichtung:

Markov Decision Processes

10. Hidden Markov Models (HMM) for Speech Processing. (some slides taken from Glass and Zue course)

Supervised Learning Hidden Markov Models. Some of these slides were inspired by the tutorials of Andrew Moore

PROBABILISTIC REASONING OVER TIME

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2016

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2014

Final Exam December 12, 2017

Kalman filtering and friends: Inference in time series models. Herke van Hoof slides mostly by Michael Rubinstein

Hidden Markov Models. Aarti Singh Slides courtesy: Eric Xing. Machine Learning / Nov 8, 2010

CS 188: Artificial Intelligence Spring Announcements

Lecture 4: Hidden Markov Models: An Introduction to Dynamic Decision Making. November 11, 2010

CSE 473: Artificial Intelligence Spring 2014

CS325 Artificial Intelligence Ch. 15,20 Hidden Markov Models and Particle Filtering

CS188 Outline. We re done with Part I: Search and Planning! Part II: Probabilistic Reasoning. Part III: Machine Learning

Statistical Sequence Recognition and Training: An Introduction to HMMs

Computer Science CPSC 322. Lecture 23 Planning Under Uncertainty and Decision Networks

Hidden Markov Models. By Parisa Abedi. Slides courtesy: Eric Xing

Machine Learning for OR & FE

CS188 Outline. CS 188: Artificial Intelligence. Today. Inference in Ghostbusters. Probability. We re done with Part I: Search and Planning!

Advanced Data Science

Plan for today. ! Part 1: (Hidden) Markov models. ! Part 2: String matching and read mapping

CAP Plan, Activity, and Intent Recognition

Hidden Markov Models

Our Status in CSE 5522

Sequence labeling. Taking collective a set of interrelated instances x 1,, x T and jointly labeling them

A gentle introduction to Hidden Markov Models

Note Set 5: Hidden Markov Models

CMSC 723: Computational Linguistics I Session #5 Hidden Markov Models. The ischool University of Maryland. Wednesday, September 30, 2009

Logic: Intro & Propositional Definite Clause Logic

Statistical Processing of Natural Language

Probability. CS 3793/5233 Artificial Intelligence Probability 1

Why do we care? Measurements. Handling uncertainty over time: predicting, estimating, recognizing, learning. Dealing with time

Decision Theory: Q-Learning

Lecture 18: Reinforcement Learning Sanjeev Arora Elad Hazan

Hidden Markov Models

Markov localization uses an explicit, discrete representation for the probability of all position in the state space.

STA 4273H: Statistical Machine Learning

Transcription:

Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 10 Oct, 13, 2011 CPSC 502, Lecture 10 Slide 1

Today Oct 13 Inference in HMMs More on Robot Localization CPSC 502, Lecture 10 2

R&Rsys we'll cover in this course Problem Static Deterministic Arc Consistency SLS Constraint Vars + Satisfaction Search Constraints Query Sequential Planning Representation Reasoning Technique Logics Search STRIPS Search Environment Stochastic Belief Nets Var. Elimination Approx. Inference Temporal. Inference Decision Nets Var. Elimination Markov Processes Value Iteration CPSC 502, Lecture 10 Slide 3

How can we minimally extend Markov Chains? Maintaining the Markov and stationary assumption A useful situation to model is the one in which: the reasoning system does not have access to the states but can make observations that give some information about the current state CPSC 502, Lecture 10 Slide 4

Hidden Markov Model A Hidden Markov Model (HMM) starts with a Markov chain, and adds a noisy observation about the state at each time step: domain(s) = k domain(o) = h P (S 0 ) specifies initial conditions P (S t+1 S t ) specifies the dynamics P (O t S t ) specifies the sensor model CPSC 502, Lecture 10 Slide 5

xample: Localization for Pushed around Robot Localization (where am I?) is a fundamental problem in robotics Suppose a robot is in a circular corridor with 16 locations There are four doors at positions: 2, 4, 7, 11 The Robot initially doesn t know where it is The Robot is pushed around. After a push it can stay in the same location, move left or right. The Robot has Noisy sensor telling whether it is in front of a door CPSC 502, Lecture 10 Slide 6

This scenario can be represented as Example Stochastic Dynamics: when pushed, it stays in the same location p=0.2, moves left or right with equal probability P(Loc t + 1 Loc t ) P(Loc 0 ) CPSC 502, Lecture 10 Slide 7

This scenario can be represented as Example of Noisy sensor telling whether it is in front of a door. If it is in front of a door P(O t = T) =.8 If not in front of a door P(O t = T) =.1 P(O t Loc t ) CPSC 502, Lecture 10 Slide 8

Useful inference in HMMs Localization: Robot starts at an unknown location and it is pushed around times. It wants to determine where it is In general (Filtering): compute the posterior distribution over the current state given all evidence to date P(X t o 0:t ) or P(X t e 0:t ) CPSC 502, Lecture 10 Slide 9

Another very useful HMM Inference Most Likely Sequence (given the evidence seen so far) argmax x 0:t P(X 0:t e 0:t ) CPSC 502, Lecture 10 Slide 10

HMM: more agile terminology Formal Specification as five-tuple S { s1,..., sn} K { o1,..., om} {1,..., M} { i}, i S A { aij}, i, j S B { bi( ot)}, i S, o t K N j 1 M t 1 aij ( bi ot 1 ) 1 S, K,, A, Set of States B Output Alphabet Initial State Probabilities State Transition Probabilities Symbol Emission Probabilities CPSC 502, Lecture 10 11

1. Initialization The forward procedure t( i) P( o1o2... ot, Xt i) ( i) ibi( o1), 1 1 i N 2. Induction t ( j) N t i 1 1( i) aijbj( ot), 1 i N, 1 j N Complexity CPSC 502, Lecture 10 12

1( i) ibi( o1) t( j) N ( i) a ( o t 1 ij j t i 1 CPSC 502, Lecture 10 Slide 13 b )

Finding the Best State Sequence : arg max P( X X O) The Viterbi Algorithm: Initialization: v 1 (j) = j b j (o 1 ), 1 j N Induction: v t (j) = max 1 i N v t-1 (i) a ij b j (o t ), 1 j N Store backtrace: v t ( j ) : probability of the most probable path that leads to that node bt t ( j ) = argmax 1 i N v t-1 (i) a ij b j (o t ), 1 j N Termination and path readout: P(X O) = max 1 i N v t (i) To recover X start from bt t ( i ) = argmax 1 i N v t (i) and keep going backward CPSC 502, Lecture 10 14

Robot Localization: More complex Example Suppose a robot wants to determine its location based on its actions and its sensor readings Three actions: goright, goleft, Stay This can be represented by an augmented HMM CPSC 502, Lecture 10 Slide 15

Robot Localization Sensor and Dynamics Model Sample Sensor Model (assume same as for pushed around) Sample Stochastic Dynamics: P(Loc t + 1 Action t, Loc t ) P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.1 P(Loc t + 1 = L+1 Action t = goright, Loc t = L) = 0.8 P(Loc t + 1 = L + 2 Action t = goright, Loc t = L) = 0.074 P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.002 for all other locations L All location arithmetic is modulo 16 The action goleft works the same but to the left CPSC 502, Lecture 10 Slide 16

Dynamics Model More Details Sample Stochastic Dynamics: P(Loc t + 1 Action, Loc t ) P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.1 P(Loc t + 1 = L+1 Action t = goright, Loc t = L) = 0.8 P(Loc t + 1 = L + 2 Action t = goright, Loc t = L) = 0.074 P(Loc t + 1 = L Action t = goright, Loc t = L) = 0.002 for all other locations L CPSC 502, Lecture 10 Slide 17

Robot Localization additional sensor Additional Light Sensor: there is light coming through an opening at location 10 P (L t Loc t ) Info from the two sensors is combined : Sensor Fusion CPSC 502, Lecture 10 Slide 18

The Robot starts at an unknown location and must determine where it is The model appears to be too ambiguous Sensors are too noisy Dynamics are too stochastic to infer anything But inference actually works pretty well. check: http://www.cs.ubc.ca/spider/poole/demos/loc alization/localization.html It uses a generalized form of filtering (not just a sequence of observations, but a sequence of observation pairs (from the two sensors) + the actions CPSC 502, Lecture 10 Slide 19

HMMs have many other applications. Natural Language Processing: e.g., Speech Recognition States: phoneme \ word Observations: acoustic signal \ phoneme Bioinformatics: Gene Finding States: coding / non-coding region Observations: DNA Sequences For these problems the critical inference is: find the most likely sequence of states given a sequence of observations CPSC 502, Lecture 10 Slide 20

TODO for next Tue Start Reading Chp 9 of textbook (up tp 9.4 included) Work on assignment 2 CPSC 502, Lecture 10 Slide 21

Sample scenario to explore in demo Keep making observations without moving. What happens? Then keep moving without making observations. What happens? Assume you are at a certain position alternate moves and observations. CPSC 502, Lecture 10 Slide 22

NEED to explain Filtering Because it will be used in POMDPs CPSC 502, Lecture 10 Slide 23

Markov Models Markov Chains Simplest Possible Dynamic Bnet Hidden Markov Model Add noisy Observations about the state at time t Add Actions and Values (Rewards) Markov Decision Processes (MDPs) CPSC 502, Lecture 10 Slide 24

Answering Query under Uncertainty Probability Theory Static Belief Network & Variable Elimination Monitoring (e.g credit cards) Dynamic Bayesian Network Hidden Markov Models BioInformatics Markov Chains Student Tracing in tutoring Systems Diagnostic Systems (e.g., medicine) Email spam filters Natural Language Processing CPSC 502, Lecture 10 Slide 25

Lecture Overview Recap Temporal Probabilistic Models Start Markov Models Markov Chain Markov Chains in Natural Language Processing CPSC 502, Lecture 10 Slide 26

Sampling a discrete probability distribution CPSC 502, Lecture 10 Slide 27

Answering Query under Uncertainty Probability Theory Static Belief Network & Variable Elimination Monitoring (e.g credit cards) Dynamic Bayesian Network Hidden Markov Models BioInformatics Markov Chains Student Tracing in tutoring Systems Diagnostic Systems (e.g., medicine) Email spam filters Natural Language Processing CPSC 502, Lecture 10 Slide 28

Answering Queries under Uncertainty Probability Theory Static Belief Network & Variable Elimination Monitoring (e.g credit cards) Diagnostic Systems (e.g., medicine) Email spam filters Dynamic Bayesian Network Hidden Markov Models BioInformatics Natural Language Processing Robotics Markov Chains Student Tracing in tutoring Systems CPSC 502, Lecture 10 Slide 29

Stationary Markov Chain (SMC) A stationary Markov Chain : for all t >0 P (S t+1 S 0,,S t ) = P (S t +1 We only need to specify Simple Model, easy to specify Often the natural model and The network can extend indefinitely and Variations of SMC are at the core of most Natural Language Processing (NLP) applications! CPSC 502, Lecture 10 Slide 30