CSE 412: Artificial Intelligence
CSE 412: Artificial Intelligence
CSE 412: Artificial Intelligence
CSE 412:
Artificial Intelligence
Topic – 5: Logical Agents
Contents:
Architecture of a
Simple Intelligent Agent
Environment Agent
Reasoning &
Decisions Making
Effectors List of
Goals/Utility
Possible Actions
2
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.
3
Knowledge Based Agent
4
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
5
Knowledge Bases (KB)
7
Algorithm
8
General Logic
9
General Logic
10
General Logic
11
General Logic
entails
infer
Knowledge
Sentences Conclusions
New Sentences
repr.
world
follows
Facts New Facts
12
Entailment
KB ╞ α
Knowledge base KB entails sentence α
if and only if α is true in all worlds where KB is true
13
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
15
General Logic
16
General Logic
17
Propositional Logic (PL) Basics
18
Logical Connectives of PL
19
Syntax of PL
20
Truth Tables
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
21
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
22
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
23
Satisfiability
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
24
25
Unsatisfiability
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
27
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
28
Inference by Enumeration
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
30
Inference by Enumeration