6.module4 LOGIC 5
6.module4 LOGIC 5
and Reasoning
KNOWLEDGE BASED
AGENTS
Logical Agents
Outline
• Knowledge-based agents
• Wumpus world
• Logic in general - models and entailment
• Propositional (Boolean) logic
• Equivalence, validity, satisfiability
• Inference rules and theorem proving
– forward chaining
– backward chaining
– resolution
“Navy sedan with crimson hatches”
: مشکالت وب موجود
Semantic Matching
A car,
A Red Door,
A Blue chair
Knowledge bases
• Then it can Ask itself what to do next - answers should follow from the KB
• Discrete Yes
• x+2 ≥ y is true iff the number x+2 is no less than the number y
– E.g., the KB containing “the Giants won” and “the Reds won”
entails “Either the Giants won or the Reds won”
• That is, the procedure will answer any question whose answer follows from
what is known by the KB.
• The algorithm is sound because it implements directly the definition of
entailment, and complete because it works for any KB.
Propositional logic: Syntax
• Propositional logic is the simplest logic – illustrates basic
ideas (Boolean Logic)
P1,1
B1,1
B2,1
– Model checking
• truth table enumeration (always exponential in n)
P1,3
Resolution is sound and complete for propositional logic
• Soundness means that you cannot prove anything that's wrong.
• Completeness means that you can prove anything that's right.
Rules for Inference for Propositional Logic
Conversion to CNF
B1,1 (P1,2 P2,1)β
• Idea: fire any rule whose premises are satisfied in the KB,
– add its conclusion to the KB, until query is found
Forward chaining algorithm
4. Hence m is a model of KB
5. If KB╞ q, q is true in every model of KB, including m
Backward chaining