560 likes | 1.34k Views
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
E N D
The Wumpus World! 2012级ACM班 金汶功
Description • Performance measure • Environment • Actuators • Sensors: Stench & Breeze & Glitter & Bump & Scream
Semantics • Semantics: Relationship between logic and the real world • Model: • Entailment:
Models • KB: valid sentences • : “There is no pit in [1,2]” • : “There is no pit in [2,2]”
Sensors Tell Knowledge base Axioms Agent Current States Ask Answer Tell Actuators Model checking
Efficient Model Checking • DPLL • Early termination • Pure symbol heuristic • Unit clause heuristic • Component analysis • …
Drawbacks • Model checking is NP-complete • Knowledge base may tell nothing.
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
Normalization • is a constant
The Wumpus World • Aim: calculate the probability that each of the three squares contains a pit.
Full joint distribution • P(, ,,) P(,,|) P( • P( • Every room contains a pit of probability 0.2
How likely is it that [1,3] has a pit? • Given observation: • terms
Simplification • Now there are only 4 terms, cheers!
Finally • [2,2] contains a pit with 86% probability! • Data structures---independence
Simple Example Burglary Earthquake Alarm(Bark) John Calls Mary Calls
Specification • Each node corresponds to a random variable • Acyclic – DAG • Each node has a conditional probability distribution
P2,2 P3,1 P1,3 known b
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.
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 NorvigArtificial Intelligence—A Modern Approach 3rd edition, 2010