0% found this document useful (0 votes)
96 views

Artificial Intelligence Knowledge Representation Lecture 05

The document provides an overview of different knowledge representation techniques including types of knowledge, facts, rules, semantic networks, frames, and logic-based representations. It discusses variable rules, uncertain rules, meta rules, and rule sets. It also describes semantic networks and frames, explaining components like slots and facets. Finally, it introduces propositional logic and predicate calculus, covering concepts like quantifiers, predicates, and first-order predicate logic.

Uploaded by

Shut Up
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Artificial Intelligence Knowledge Representation Lecture 05

The document provides an overview of different knowledge representation techniques including types of knowledge, facts, rules, semantic networks, frames, and logic-based representations. It discusses variable rules, uncertain rules, meta rules, and rule sets. It also describes semantic networks and frames, explaining components like slots and facets. Finally, it introduces propositional logic and predicate calculus, covering concepts like quantifiers, predicates, and first-order predicate logic.

Uploaded by

Shut Up
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

Lecture 05

Knowledge Representation
& Reasoning(Continue…)

Ms. Fouzia Idrees


Recap
• Types of Knowledge: Declarative, Procedural,
Meta, Heuristic, Structural.
• Knowledge Representation Techniques
– Facts
• Types of Facts: Single/Multi- valued, Uncertain,
Fuzzy
– Object-Attribute Value Triplets
– Rules
• Types of Rules: Relationship, Recommendation,
Directive
Types of Rules (Cont.)
• Variable Rules
– If the same type of rule is to be applied to multiple
objects, we use variable rules, i.e. rules with variables
– e.g.
If X is a Student
AND X’s GPA>3.7
THEN place X on honor roll.
• Such rules are called pattern-matching rules.
• The rule is matched with known facts and
different possibilities for the variables are tested,
to determine the truth of the fact.
Types of Rules (Cont.)
• Uncertain Rules
– e.g. IF you have never won a match THEN you will
most probably not win this time.
• Meta Rules
– Rules that describe how to use other rules
– e.g. IF You are coughing AND you have chest
congestion THEN use the set of respiratory disease
rules.
• Rule Sets
– As in the previous example, we may group rules into
categories in our knowledge representation, e.g. the
set of respiratory disease rules
Semantic Networks
• Semantic networks are graphs, with
nodes representing objects and arcs
representing relationships between
objects.
• Various types of relationships may be
defined.
– IS-A (Inheritance relationship)
– HAS (Ownership)
Semantic Network
example
IS-A IS-A IS-A IS-A
Suzuki Car Vehicle Truck Bedford
Travels by
Road
Network Operation: How to infer new information from
semantic networks. We can ask nodes questions
– Ask node vehicle: ‘How do you travel’
• Looks at arc and replies: road
– Ask node Car X: ‘How do you travel’
• Asks node Car (because of IS-A relationship)
• Asks node Vehicle (IS-A relationship)
• Node Vehicle Replies: road
Problems with
Semantic Networks
• Computationally expensive at run-time. In the
worst case, we may need to traverse entire
network and then discover that the requested
info does not exist.
• They try to model human associative memory
(store info using associations), but in the human
brain the number of neurons and links are in the
order of 1015. Such numbers are computationally
prohibitive in semantic networks.
• Semantic networks are logically inadequate as
they do not have any equivalent quantifiers, e.g.,
for all, for some, none.

Frames
“Frames are data structures for representing
stereotypical knowledge of some concept or
object” Durkin
• Its Like a schema as in database design
• They were developed from semantic networks and later
evolved into our modern-day Classes and Objects.
• e.g. for the object Student, the frame will look like this:
• The various components within the frame are called slots, e.g.
Frame Name slot.
Frame Name: Student
Properties:
Age: 19
GPA: 4.0
Ranking: 1
Facets
• A slot in a frame can hold more than just a
value, it consists of metadata and procedures
also.
• The various aspects of a slot are called facets.
• Facets are feature of frames that allows us to
put in constraints on frames
– IF-NEEDED Facets
– IF-CHANGED Facets
Facets
• IF-NEEDED Facets are called when the data
of a particular slot is needed.
• Similarly, IFCHANGED Facets are called when
the value of a slot changes.
Logic
• Algebra is a type of formal logic that deals with
numbers, e.g. 2+4 = 6
• Similarly, propositional logic and predicate
calculus are forms of formal logic for
dealing with propositions.
• Logic representation techniques:
– Propositional Logic
– Predicate Calculus
Propositional Logic
• Proposition: A proposition is the statement of a
fact.
• Assign a Symbolic Variable to represent a
proposition. e.g.
p = It is raining
q = I carry an umbrella
• A declarative sentence may be classified as
either True of False.
– the proposition ‘A rectangle has four sides’ is true
– the proposition ‘The world is a cube’ is false.
• A proposition is a sentence whose truth values
may be determined. So, each variable has a
truth value.
Compound Statements
• Different propositions may be logically
related.
• We can form compound statements using
logical connectives:
 AND (Conjunction)
 OR (Disjunction)
~ NOT (Negation)
 If … then (Conditional)
 If and only if (bi-conditional)
Compound statements
p = It is raining
q = I carry an umbrella
r = It is cloudy
• s = IF it is raining THEN carry an umbrella
pq
• t = IF it is raining OR it is cloudy, THEN carry an
umbrella
(p  r )  q
Truth Table of Binary
Logical Connectives
p q p q pq pq pq

T T T T T T

T F F T F F

F T F T T F

F F F F T T
Limitations of
Propositional Logic
• Can only represent knowledge as complete
sentences, e.g. a = the ball’s color is blue.
• Cannot analyze the internal structure of the
sentence.
• No quantifiers e.g. For all, There exists
• Propositional logic provides no framework for
proving statements such as:
All humans are mortal
All women are humans
Therefore, all women are mortals
• This is a limitation in its representational power.
Predicate Calculus
• Extension of Propositional logic
• Allows structure of facts/sentences to be defined
With predicate logic, we can say
color( ball, blue)
• Has greater representation power as we will see shortly
• This allows the relationship of sub-sentence units to be
expressed, e.g. the relationship between color, ball and
blue in the above example.
• Due to its greater representational power, predicate
calculus provides a mechanism for proving statements
and can be used as a logic system for proving logical
theorems.
Quantifiers:
• Predicate calculus allows us to use quantifiers
for statements.
• Quantifiers allow us to say things about some or
all objects within some set.
• The logical quantifiers used in basic predicate
calculus are universal and existential quantifiers.
The Universal Quantifier
• Symbol 
• It is read as “for every” or “for all”
• Used in formulae to assign the same truth value to all variables in the
domain
• e.g. Domain: numbers
– (x) ( x + x = 2x)
– In words: for every x (where x is a number), x + x = 2x is true
• e.g. Shapes
– (x) ( x = square  x = polygon)
– In words: every square is a polygon.
– For every x (where x is a shape), if x is a square, then x is a polygon (it
implies that x is a polygon).
Existential Quantifier
• Symbol: 
• Used in formulae to say that something is
true for at least one value in the domain
• “there exists”, “ for some” “for at least one”
“there is one”
• e.g.
– ( x) ( person (x)  father (x,ahmed) )
– In words: there exists some person, x who
is Ahmed’s father.
First Order Predicate
Logic
• First Order Predicate logic is the simplest form.
• Uses symbols. These may be
– Constants: Used to name specific objects or properties.
e.g. Ali, Ayesha, blue, ball.
– Predicates: A fact or proposition is divided into two parts
• Predicate: the assertion of the proposition
• Argument: the object of the proposition
• e.g. Ali likes bananas becomes Likes (ali, bananas)
– Variables: Used to represent general class of
objects/properties. e.g. likes (X, Y). X and Y are variables
that assume the values X=Ali and Y=bananas
– Formulae: Use predicates and quantifiers
Predicate Logic Example
man(ahmed)
father(ahmed, belal)
brother(ahmed, chand) Predicates
owns(belal, car)
tall(belal)
hates(ahmed, chand)
family()
 Y (sister(Y,ahmed))
Formulae
X,Y,Z(man(X)  man(Y) man(Z)  father(Z,Y) 
father(Z,X)  brother(X,Y))
X, Y and Z Variables

ahmed, belal, chand and car Constants

You might also like