the wumpus world!

32
The Wumpus World! 2012 级 ACM 级 级级级

Upload: percy

Post on 23-Feb-2016

101 views

Category:

Documents


0 download

DESCRIPTION

The Wumpus World!. 2012 级 ACM 班 金汶功. Hunt the wumpus !. Description. Performance measure Environment Actuators Sensors: Stench & Breeze & Glitter & Bump & Scream. An Example. An Example. Reasoning via logic. Semantics. Semantics: Relationship between logic and the real world - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The  Wumpus  World!

The Wumpus World!

2012级 ACM班金汶功

Page 2: The  Wumpus  World!

Hunt the wumpus!

Page 3: The  Wumpus  World!

Description

• Performance measure• Environment• Actuators• Sensors: Stench & Breeze & Glitter & Bump &

Scream

Page 4: The  Wumpus  World!

An Example

Page 5: The  Wumpus  World!

An Example

Page 6: The  Wumpus  World!

Reasoning via logic

Page 7: The  Wumpus  World!

Semantics

• Semantics: Relationship between logic and the real world

• Model: • Entailment:

Page 8: The  Wumpus  World!

Models• KB: valid sentences• : “There is no pit in [1,2]”• : “There is no pit in [2,2]”

Page 9: The  Wumpus  World!

Knowledge base

Axioms

Current States

Sensors

Actuators

Agent

Tell

Ask

TellModel

checking

Answer

Page 10: The  Wumpus  World!

Efficient Model Checking

• DPLL• Early termination• Pure symbol heuristic• Unit clause heuristic• Component analysis• …

Page 11: The  Wumpus  World!

Drawbacks

• Model checking is NP-complete

• Knowledge base may tell nothing.

Page 12: The  Wumpus  World!

Probabilistic Reasoning

Page 13: The  Wumpus  World!

Full joint probability distribution

• P(X, Y) = P(X|Y)P(Y)• X: {1,2,3,4} -> {0.1,0.2,0.3,0.4}• Y: {a,b} -> {0.4, 0.6}

• P(X = 2, Y = a) = P(X = 2|Y = a)P(Y = a)• The probability of all combination of values

Page 14: The  Wumpus  World!
Page 15: The  Wumpus  World!

Normalization

• is a constant•

Page 16: The  Wumpus  World!

The Wumpus World• Aim: calculate the probability that each of the

three squares contains a pit.

Page 17: The  Wumpus  World!

Full joint distribution

• P(, , , ) P(, , |) P(• P(

• Every room contains a pit of probability 0.2

Page 18: The  Wumpus  World!

How likely is it that [1,3] has a pit?• Given observation:

• terms

Page 19: The  Wumpus  World!

Using independence

Page 20: The  Wumpus  World!

Simplification

• Now there are only 4 terms, cheers!

Page 21: The  Wumpus  World!
Page 22: The  Wumpus  World!

Finally

• [2,2] contains a pit with 86% probability!

• Data structures---independence

Page 23: The  Wumpus  World!

Bayesian Network

Page 24: The  Wumpus  World!

Simple Example

Burglary Earthquake

Alarm(Bark)

John Calls Mary Calls

P(B)

.001

P(E)

.002

B E P(A)

True true .95

true false .94

false true .29

false false .001

Bark P(J)

true .90

false .05

Bark P(M)

true .70

false .01

Page 25: The  Wumpus  World!

Specification

• Each node corresponds to a random variable

• Acyclic – DAG

• Each node has a conditional probability distribution

Page 26: The  Wumpus  World!

Conditional Independence

Page 27: The  Wumpus  World!

Exact Inference

Page 28: The  Wumpus  World!
Page 29: The  Wumpus  World!

P1,3 known

b

P3,1P2,2

P1,3 P2,2 P3,1 b

True True True 1

True True False 1

True False True 1

True False False 0

False True True 1

False True False 1

False False True 0

False False False 0

P(1,3)

0.2

P(known)

P(P3,1)

0.2P(P2,2)

0.2

Page 30: The  Wumpus  World!

Approximate Inference

• Markov Chain Monte Carlo• Gibbs Sampling• Idea: The long-run fraction of time spent in

each state is exactly proportional to its posterior probability.

Page 31: The  Wumpus  World!

𝑃 (𝑥 𝑖′∨𝑀𝑎𝑟𝑘𝑜𝑣𝐵𝑙𝑎𝑛𝑘𝑒𝑡 (𝑋 𝑖 ))=α P (𝑥𝑖′∨𝑃𝑎𝑟𝑒𝑛𝑡𝑠 (𝑋 𝑖 ))× ∏

𝑌 𝑗∈ h𝐶 𝑖𝑙𝑑𝑟𝑒𝑛 ( 𝑋 𝑖)𝑃(𝑦 𝑗∨𝑝𝑎𝑟𝑒𝑛𝑡𝑠 (𝑌 𝑗))

Page 32: The  Wumpus  World!

Reference• http://zh.wikipedia.org/wiki/Hunt_the_Wumpus• http://zh.wikipedia.org/wiki/%

E8%B4%9D%E5%8F%B6%E6%96%AF%E7%BD%91%E7%BB%9C

• Stuart Russell, Peter Norvig Artificial Intelligence—A Modern Approach 3rd edition, 2010