An Introduction To Artificial Intelligence: Chapter 13 &14.1-14.2: Uncertainty & Bayesian Networks
An Introduction To Artificial Intelligence: Chapter 13 &14.1-14.2: Uncertainty & Bayesian Networks
An Introduction To Artificial Intelligence: Chapter 13 &14.1-14.2: Uncertainty & Bayesian Networks
Ramin Halavati
(halavati@ce.sharif.edu)
Outline
• Uncertainty
• Probability
• Syntax and Semantics
• Inference
• Independence and Bayes' Rule
• Bayesian Network
Uncertainty
Let action At = leave for airport t minutes before flight
Will At get me there on time?
Problems:
1. partial observability (road state, other drivers' plans, etc.)
2. noisy sensors (traffic reports)
3. uncertainty in action outcomes (flat tire, etc.)
4. immense complexity of modeling and predicting traffic
“A25 will get me there on time if there's no accident on the bridge and it doesn't
rain and my tires remain intact etc etc.”
(A1440 might reasonably be said to get me there on time but I'd have to stay
overnight in the airport …)
Methods for handling
uncertainty
• Default or nonmonotonic logic:
– Assume my car does not have a flat tire
– Assume A25 works unless contradicted by evidence
• Issues: What assumptions are reasonable? How to handle
contradiction?
• Probability
– Model agent's degree of belief
– Given the available evidence,
– A25 will get me there on time with probability 0.04
–
–
Probability
Probabilistic assertions summarize effects of
– laziness: failure to enumerate exceptions, qualifications,
etc.
– ignorance: lack of relevant facts, initial conditions, etc.
Subjective probability:
• Probabilities relate propositions to agent's own state
of knowledge
e.g., P(A25 | no reported accidents) = 0.06
»
•
Making decisions under
uncertainty
Suppose I believe the following:
P(A25 gets me there on time | …) = 0.04
P(A90 gets me there on time | …) = 0.70
P(A120 gets me there on time | …) = 0.95
P(A1440 gets me there on time | …) = 0.9999
»
Conditional probability
• Syntax:
– a set of nodes, one per variable
– a directed, acyclic graph (link ≈ "directly influences")
– a conditional distribution for each node given its
parents:
P (Xi | Parents (Xi))
• I.e., grows linearly with n, vs. O(2n) for the full joint
distribution
(by construction)
(chain rule)
Example
• Suppose we choose the ordering M, J, A, B, E
P(J | M) = P(J)?
•
•
Example
• Suppose we choose the ordering M, J, A, B, E
P(J | M) = P(J)?
P(A | J, M) = P(A | J)? P(A | J, M) = P(A)?
• No
•
Example
• Suppose we choose the ordering M, J, A, B, E
P(J | M) = P(J)?
P(A | J, M) = P(A | J)? P(A | J, M) = P(A)? No
P(B | A, J, M) = P(B | A)?
P(B | A, J, M) = P(B)?
• No
•
Example
• Suppose we choose the ordering M, J, A, B, E
P(J | M) = P(J)?
P(A | J, M) = P(A | J)? P(A | J, M) = P(A)? No
P(B | A, J, M) = P(B | A)? Yes
P(B | A, J, M) = P(B)? No
P(E | B, A ,J, M) = P(E | A)?
P(E | B, A, J, M) = P(E | A, B)?
• No
Example
• Suppose we choose the ordering M, J, A, B, E
P(J | M) = P(J)?
P(A | J, M) = P(A | J)? P(A | J, M) = P(A)? No
P(B | A, J, M) = P(B | A)? Yes
P(B | A, J, M) = P(B)? No
P(E | B, A ,J, M) = P(E | A)? No
P(E | B, A, J, M) = P(E | A, B)? Yes
• No
Example contd.