Topic - 6 (Logical Agents)
Topic - 6 (Logical Agents)
Logic
Environment Agent
Reasoning &
Decisions Making
Effectors List of
Goals/Utility
Possible Actions
3
Knowledge Based Agent
Knowledge base:
A knowledge base (abbreviated KB or kb) is a special
kind of database for knowledge management.
A knowledge base is an information repository that
provides a means for information to be collected,
organized, shared, searched and utilized.
The part of an expert system that contains the facts
and rules needed to solve problems.
A collection of facts and rules for problem solving.
4
Knowledge Based Agent
5
Knowledge Bases (KB)
A knowledge base:
contains the domain-specific content for an agent
is a set of representations of facts about the world
is a set of sentences in a formal language
6
Knowledge Bases (KB)
8
Algorithm
9
General Logic
10
General Logic
11
General Logic
12
General Logic
13
Entailment
KB
Knowledge base KB entails sentence
if and only if is true in all worlds where KB is true
14
Entailment
KB
Knowledge base KB entails sentence
if and only if is true in all worlds where KB is true
For example:
KB: "sky is blue" = true, "sun is shining" = true
entails : "sky is blue and sun is shining" = true
represents a true fact
as long as facts represented in KB are true
if the sky was actually cloudy then KB isn't the true world state
then wouldn't represent a true fact
Entailment requires sentences in KB to be true.
15
Logical Inference
16
General Logic
17
General Logic
18
Propositional Logic (PL) Basics
19
Logical Connectives of PL
S negation (not)
S1S2 conjunction (and)
S1 and S2 are conjuncts
S1S2 disjunction (or)
S1 and S2 are disjuncts
S1S2 implication/conditional (if-then)
S1 is the antecedent/premise
S2 is the consequent/conclusion
S1S2 equivalence/biconditional (if and only if)
20
Syntax of PL
A B C
false false false
false false true Given n symbols,
false true false 2n possible combinations of
false true true truth value assignments.
true false false
true false true here each row is an interpretation
true true false
true true true
22
Implication Truth Table
A B AB B A
false false true true
false true true true
true false false false
true true true true
AB is equivalent to B A
23
Validity
A B C A A
false false false true
false false true true A sentence is valid
false true false true if it's true in all interpretations:
false true true true P1 P1 P1P1 (tautologies)
true false false true
true false true true
(i.e. its entire column is true)
true true false true
true true true true
24
Satifiability
A B C A B
false false false true
false false true true A sentence is satisfiable
false true false false if it's true in some interpretations:
false true true false P1 P2 P2P1
true false false true
true false true true
(i.e. its column is true and false)
true true false true
true true true true
25
Unsatifiability
A B C C C
false false false false
false false true false A sentence is unsatisfiable
false true false false if it's true in no interpretations:
false true true false P1 P1 (inconsistent/contradiction)
true false false false
true false true false
(i.e. its entire column is false)
true true false false
true true true false
26
Inference Proof Methods
Model Checking:
truth table enumeration
sound and complete for propositional logic
heuristic search in model space
sound but incomplete
Application of Syntactic Operations
(i.e. Inference Rules):
sound generation of new sentences from old
could use inference rules as operators for search
27
Inference by Enumeration
LET: KB = AC, B C = AB
DOES: KB ?
A B C RECALL: The computer
false false false doesn't know the meaning
false false true
of the proposition symbols.
false true false
false true true
So all logically distinct cases
true false false
must be checked to prove that
true false true
true true false
a sentence can be derived
true true true from a KB.
28
Inference by Enumeration
LET: KB = AC, B C = AB
DOES: KB ?
A B C AC B C KB
false false false false true false Rows where all of
false false true true false false sentences in KB
false true false false true false are true are the
false true true true true true
models of KB
true false false true true true
true false true true false false
true true false true true true
true true true true true true
29
Inference by Enumeration
LET: KB = AC, B C = AB
DOES: KB ? YES!
A B C AC B C KB AB KB is entailed by KB,
false false false false true false false true if all models of KB
false false true true false false false true are models of ,
false true false false true false true true
i.e. all rows where
false true true true true true true true
true false false true true true true true
KB is true, is true
true false true true false false true true In other words:
true true false true true true true true KB is valid.
true true true true true true true true
30
Inference by Enumeration