Lecture11 - Representation Reasoning and Logic
Lecture11 - Representation Reasoning and Logic
Representation,
Reasoning and Logic
Knowledge and reasoning
• Knowledge representation
• Logic and representation
• Propositional (Boolean) logic
• Normal forms
• Inference in propositional logic
Knowledge Base and Sentence
• Knowledge base is a set of representation of
facts about the world.
• Each individual representation is called a
sentence
• The sentences are expressed in a language
called a knowledge representation language
Knowledge-Based Agent
• Agent that uses prior or acquired knowledge
to achieve its goals
– Can make more efficient decisions
Domain independent algorithms – Can make informed decisions
• Knowledge Base (KB): contains a set of
representations of facts about the Agent’s
environment
ASK Inference engine
• Each representation is called a sentence
Knowledge Base • Use some knowledge representation
TELL
language, to TELL it what to know e.g.,
(temperature 72F)
• ASK agent to query what to do
Domain specific content • Agent can use inference to deduce new facts
from TELLed facts
Generic knowledge-based agent
Representation 1 World
A
B
ON(A,B) T
ON(A,B) F
ON(A,B) F A
ON(A,B) T B
Entailment
• P “P is true”
• ¬P “P is false” negation
• PVQ “either P is true or Q is true or both” disjunction
• P^Q “both P and Q are true” conjunction
• P => Q “if P is true, the Q is true” implication
• PQ “P and Q are either both true or both false” equivalence
Propositional logic: syntax
Propositional logic: semantics
Truth tables
• Truth value: whether a statement is true or false.
• Truth table: complete list of truth values for a statement given all
possible values of the individual atomic expressions.
Example:
P Q PVQ
T T T
T F T
F T T
F F F
Truth tables for basic connectives
P Q ¬P ¬Q P V Q P ^ Q P=>Q PQ
T T F F T T T T
T F F T T F F F
F T T F T F T F
F F T T F F T T
Propositional logic: basic manipulation
rules
• A ^ (B V C) = (A ^ B) V (A ^ C) Distributivity of ^ on V
• A => B = (¬A) V B by definition
• ¬(A => B) = A ^ (¬B) using negated or
• A B = (A => B) ^ (B => A) by definition
• ¬(A B) = (A ^ (¬B))V(B ^ (¬A)) using negated and & or
• …
Propositional inference:
enumeration method
Enumeration: Solution