Title: Planning Chapter 7 article 7.4 Production Systems Chapter 5 article 5.3 RBSChapter 7 article 7.2
1Planning Chapter 7 article 7.4Production
Systems Chapter 5 article 5.3RBS Chapter 7
article 7.2
2RBS Handling Uncertainties
- How to handle vague concepts?
- Why vagueness occurs?
- All rules are not 100 deterministic
- Certain rules are often true but not always
- Headache may be caused in flu, but may not always
occur - An expert may not always be sure about certain
relations and associations
3First Source of UncertaintyThe Representation
Language
- There are many more states of the real world than
can be expressed in the representation language - So, any state represented in the language may
correspond to many different states of the real
world, which the agent cant represent
distinguishably
4First Source of UncertaintyThe Representation
Language
- 6 propositions On(x,y), where x, y A, B, C and
x ? y - 3 propositions On(x,Table), where x A, B, C
- 3 propositions Clear(x), where x A, B, C
- At most 212 states can be distinguished in the
language in fact much fewer, because of state
constraints such as On(x,y) ? ?On(y,x) - But there are infinitely many states of the real
world
5Second source of UncertaintyImperfect
Observation of the World
- Observation of the world can be
- Partial, e.g., a vision sensor cant see through
obstacles (lack of percepts)
The robot may not know whether there is dust in
room R2
6Second source of UncertaintyImperfect
Observation of the World
- Observation of the world can be
- Partial, e.g., a vision sensor cant see through
obstacles - Ambiguous, e.g., percepts have multiple possible
interpretations
On(A,B) ? On(A,C)
7Second source of UncertaintyImperfect
Observation of the World
- Observation of the world can be
- Partial, e.g., a vision sensor cant see through
obstacles - Ambiguous, e.g., percepts have multiple possible
interpretations - Incorrect
8Third Source of UncertaintyIgnorance, Laziness,
Efficiency
- An action may have a long list of preconditions,
e.g. Drive-Car P Have(Keys) ?
?Empty(Gas-Tank) ? Battery-Ok ?
Ignition-Ok ? ?Flat-Tires ? ?Stolen(Car) ... - The agents designer may ignore some
preconditions... or by laziness or for
efficiency, may not want to include all of them
in the action representation - The result is a representation that is either
incorrect executing the action may not have the
described effects or that describes several
alternative effects
9Representation of Uncertainty
- Many models of uncertainty
- We will consider two important models
- Non-deterministic modelUncertainty is
represented by a set of possible values, e.g., a
set of possible worlds, a set of possible
effects, ... -
- Probabilistic modelUncertainty is represented
by a probabilistic distribution over a set of
possible values
10Example Belief State
- In the presence of non-deterministic sensory
uncertainty, an agent belief state represents all
the states of the world that it thinks are
possible at a given time or at a given stage of
reasoning - In the probabilistic model of uncertainty, a
probability is associated with each state to
measure its likelihood to be the actual state
11What do probabilities mean?
- Probabilities have a natural frequency
interpretation - The agent believes that if it was able to return
many times to a situation where it has the same
belief state, then the actual states in this
situation would occur at a relative frequency
defined by the probabilistic distribution
12Example
- Consider a world where a dentist agent D meets a
new patient P - D is interested in only one thing whether P has
a cavity, which D models using the proposition
Cavity - Before making any observation, Ds belief state
is - This means that if D believes that a fraction p
of patients have cavities
13Where do probabilities come from?
- Frequencies observed in the past, e.g., by the
agent, its designer, or others - Symmetries, e.g.
- If I roll a dice, each of the 6 outcomes has
probability 1/6 - Subjectivism, e.g.
- If I drive on Highway 280 at 120mph, I will get a
speeding ticket with probability 0.6 - Principle of indifference If there is no
knowledge to consider one possibility more
probable than another, give them the same
probability
14Expert System
- A SYSTEM that mimics a human expert
- Human experts always have in most case some vague
(not very precise) ideas about the associations - Handling uncertainties is a essential part of an
expert system - Expert systems are RBS with some level of
uncertainty incorporated in the system
15Choosing a Problem
- Costs
- Choose problems that justify the development cost
of the expert systems - Technical Problems
- Choose a problem that is highly technical in
nature - problems with Well-formed knowledge are the best
choice. - Highly specialized expert requirements, solution
time for the problem is not short time. - Cooperation from an expert
- Experts are willingly to participate in the
activity.
16Choosing a Problem
- Problems that are not suitable
- Problems for which experts are not available at
all, or they are not willingly to participate - Problems in which high common sense knowledge is
involved - Problems which involve high physical skills
17ES Architecture
interface
user
18ES Architecture
Uses Menus, NLP, etc Which is used to interact
With the users
interface
user
19ES Architecture
interface
user
20ES Architecture
interface
user
21Shells
- General purpose toolkit/shell is problem
independent - Shells commercially available
- CLIPS is one such shell
- Freely available
22Reasoning with Uncertainty
- Case Studies
- MYCIN
- Implements certainty factors approach
- INTERNIST Modeling Human Problem Solving
- Implements Probability approach
23Probability based ES
- Probability
- Degree of believe in a fact x, P(x)
- P(H) degree of believe in H, when supporting
evidence is NOT given, H is the hypothesis - P(HE) degree of believe in H, when supporting
evidence is given, E is the evidence supporting
hypothesis - P(HE) conditional probability
24Conditional Probability
- P(HE) conditional probability is given through
a LAW (RULE) -
- P(HE)P(HE)/P(E)
- where P(HE) is the probability of H and E
occurring together (both are TRUE)
25Evaluating Conditional Probability
- P(HE) P(Heart Attackshooting arm pain)
- Two approaches can be adopted
- Asking an expert about the frequency of it
happening - Finding the probability from the given data
- Second Approach
- Collect the data for all the patients complaining
about the shooting arm pain. - Find the proportion of the patients that had an
heart attack from the data collected in step 1
26Evaluating Conditional Probability
- P(HE) P(Heart Attackshooting arm pain)
Probability of Disease given symptoms - VS
- P(EH) P(shooting arm painHeart Attack)
Probability of symptoms given Disease - Which is easier to find of the two?
- Perhaps P(EH) is easier
27Evaluating Conditional Probability
- P(HE) P(Heart Attackshooting arm pain)
Probability of Disease given symptoms - Headache is mostly experienced when a patient
suffers from flu, fever, tumor, etc Find out
whether a patient suffers from tumor, given
headache - Collect the data for all the headache patients,
and then find the proportion of patients that
have tumor.
28Evaluating Conditional Probability
- P(EH) P(shooting arm painHeart Attack)
Probability of symptoms given Disease - Headache is mostly experienced when a patient
suffers from flu, fever, tumor, etc Find out
whether a tumor patient suffers from headache - Collect the data for all the tumor patients, and
then find the proportion of patients that have
headache
29Evaluating Conditional Probability
- Generally speaking P(EH) P(shooting arm
painHeart Attack) is easier to find. - Therefore the we need to convert P(HE) in terms
of P(EH) - P(HE)P(HE)/P(E)
- P(HE)P(EH)P(H)/P(E)
30Evaluating Conditional Probability
- More than one evidence
- Independence of events
- P(HE1E2)P(HE1E2)/P(E1E2)
- P(HE1E2)P(E1H) P(E2H) P(H)/P(E1)P(E2)
31Inference through Joint Prob.
- Start with the joint probability distribution
32Inference by enumeration
- Start with the joint probability distribution
- P(toothache) 0.108 0.012 0.016 0.064
0.2
33Inference by enumeration
- Start with the joint probability distribution
- P(toothache) 0.108 0.012 0.016 0.064
0.2
34Inference by enumeration
- Start with the joint probability distribution
- Can also compute conditional probabilities
- P(?cavity toothache) P(?cavity ? toothache)
- P(toothache)
- 0.0160.064
- 0.108 0.012 0.016 0.064
- 0.4
35Certainty Factors (CF)
- CF for rules CF(R)
- From the experts
- CF for Pre-conditions CF(PC)
- From the end user
- CF for conclusions CF(cl)
- CF(cl)CF(R)CF(PC)
36Certainty Factors (CF)
- CF for rules CF(R)
- IF A then B CF(R) 0.6
- CF for Pre-conditions CF(PC)
- IF A (0.4) then B CF(A) 0.4
- CF for conclusions CF(cl)
- CF(B)CF(R)CF(A) 0.60.40.24
37Finding Overall CF for PC
- If A(0.1) and B(0.4) and C(0.5) Then D
- Overall CF(PC)min(CF(A),CF(B),CF(C))
- CF(PC)0.1
- If A(0.1) or B(0.4) or C(0.5) Then D
- Overall CF(PC)max(CF(A),CF(B),CF(C))
- CF(PC)0.5
38Combining Certainty factors
- When the conclusions are same and certainty
factors are positive - CF(R1)CF(R2) CF(R1)CF(R2)
-
- When the conclusions are same and the certainty
factors are both negative - CF(R1)CF(R2) CF(R1)CF(R2)
-
- Otherwise both conclusions are same but have
different signs - CF(R1)CF(R2) / 1 min ( CF(R1) ,
CF(R1)
39Example
- Please see the class handouts
40(No Transcript)