Uncertainty Presented
Uncertainty Presented
Uncertainty Presented
§ Answer: Expectimax!
§ To figure out EACH chance node’s probabilities,
you have to run a simulation of your opponent
0.1 § This kind of thing gets very slow very quickly
0.9 § Even worse if you have to simulate your
opponent simulating you…
§ … except for minimax, which has the nice
property that it all collapses into one game tree
t=0 t=T t = 2T
2/10/19 Artificial Intelligence, Fall 2018 5
Dealing with Uncertainty
t=0 t=T t = 2T
2/10/19 Artificial Intelligence, Fall 2018 6
Imperfect Observation of the World
R1 R2
Cavity ¬ Cavity
p 1-p
§ This means that D believes that a fraction p of patients have
cavities
• General situation:
– Observed variables (evidence): Agent knows certain
things about the state of the world (e.g., sensor
readings or symptoms)
– Unobserved variables: Agent needs to reason about
other aspects (e.g. where an object is or what
disease is present)
– Model: Agent knows something about how the
known variables relate to the unknown variables
T P W P
hot 0.5 sun 0.6
cold 0.5 rain 0.1
fog 0.3
meteor 0.0
T W P
– Must obey: hot sun 0.4
hot rain 0.1
cold sun 0.2
cold rain 0.3
T P
hot ?
T W P
cold ?
hot sun 0.4
hot rain 0.1
cold sun 0.2 W P
cold rain 0.3 sun ?
rain ?
T P
hot 0.5
T W P
cold 0.5
hot sun 0.4
hot rain 0.1
cold sun 0.2 W P
cold rain 0.3 sun 0.6
rain 0.4
X P
+x
X Y P
-x
+x +y 0.2
+x -y 0.3
-x +y 0.4 Y P
-x -y 0.1 +y
-y
• Probabilistic models:
– (Random) variables with domains
– Assignments are called outcomes Distribution over T,W
– Joint distributions: say whether T W P
assignments (outcomes) are likely hot sun 0.4
– Normalized: sum to 1.0 hot rain 0.1
P(a,b)
P(a) P(b)
T W P
hot sun 0.4
hot rain 0.1
cold sun 0.2
cold rain 0.3
P(hot|sun) = ? P(sun|cold) = ?
W P
T W P
sun 0.8
hot sun 0.4
rain 0.2
hot rain 0.1
cold sun 0.2
W P cold rain 0.3
sun 0.4
rain 0.6
T W P
hot sun 0.4
W P
hot rain 0.1
sun 0.4
cold sun 0.2
rain 0.6
cold rain 0.3
• Example 1 § Example 2
W P T W P T W P
Normalize W P
sun 0.2 sun 0.4 hot sun 20 Normalizehot sun 0.4
• Example:
D W P D W P
wet sun 0.1 wet sun 0.08
R P
dry sun 0.9 dry sun 0.72
sun 0.8
wet rain 0.7 wet rain 0.14
rain 0.2
dry rain 0.3 dry rain 0.06
• Example:
D W P D W P
wet sun 0.1 wet sun 0.08
R P
dry sun 0.9 dry sun 0.72
sun 0.8
wet rain 0.7 wet rain 0.14
rain 0.2
dry rain 0.3 dry rain 0.06
• More generally, can always write any joint distribution as an incremental product
of conditional distributions
• Dividing, we get:
P (+m) = 0.0001
P (+s| + m) = 0.8 Example
P (+s| m) = 0.01 givens
P (+m) = 0.0001
P (+s| + m) = 0.8 Example
P (+s| m) = 0.01 givens
• Setup:
– Prior distribution over ghost location: P(G) = uniform (on right)
– R = reading color measured at (1,1) = Yellow
– Sensor reading model: P(R | G)
Details on Board
• Setup:
– Prior distribution over ghost location: P(G) = uniform (on right)
– R = reading color measured at (1,1) = Yellow
– Sensor reading model: P(R | G)
• Arcs: interactions
– Indicate direct influence between
variables
– Formally: encode conditional
independence
• For now: imagine that arrows mean
direct causation (not true in general)
– This says that their joint distribution factors into a product two
simpler distributions
– Another form:
– We write:
• Trivial decomposition:
P(B) P(E)
.001
Burglary Earthquake .002
B E P(A)
T T .95
T F .94
Alarm F T .29
F F .001
A P(J) A P(M)
T .90 T .70
JohnCalls MaryCalls
F .05 F .01
• P(false) = 0
P(black) = 0
So subtract
P(red Ú striped) = .6 once
T P W P
hot 0.5 sun 0.6
cold 0.5 rain 0.1
fog 0.3
meteor 0.0
T W P
– Must obey: hot sun 0.4
hot rain 0.1
cold sun 0.2
cold rain 0.3
• P(+x, +y) ?
X Y P
+x +y 0.2
• P(+x) ?
+x -y 0.3
-x +y 0.4
-x -y 0.1
• P(-y OR +x) ?
P(a,b)
P(a) P(b)
T W P
hot sun 0.4
hot rain 0.1
cold sun 0.2
cold rain 0.3
P(hot|sun) = ? P(cold|rain) = ?
• P(+x | +y) ?
X Y P
+x +y 0.2 • P(-x | +y) ?
+x -y 0.3
-x +y 0.4
-x -y 0.1
• P(-y | +x) ?
W P
T W P
sun 0.8
hot sun 0.4
rain 0.2
hot rain 0.1
cold sun 0.2
W P cold rain 0.3
sun 0.4
rain 0.6