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

Lecture 2.1 Knowledge Representation

Knowledge representation (KR) is a framework for storing and manipulating knowledge, defined by syntax and semantics. It encompasses various representation schemes such as natural language, rules, logic, frames, and semantic networks, each with its advantages and disadvantages. The choice of representation formalism depends on the knowledge to be represented and how it should be processed.

Uploaded by

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

Lecture 2.1 Knowledge Representation

Knowledge representation (KR) is a framework for storing and manipulating knowledge, defined by syntax and semantics. It encompasses various representation schemes such as natural language, rules, logic, frames, and semantic networks, each with its advantages and disadvantages. The choice of representation formalism depends on the knowledge to be represented and how it should be processed.

Uploaded by

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

Knowledge Representation

Definition
Representation schemes/formalisms
definition
 Knowledge. True rational belief(philosophy).OR
facts, data and relationships (Computational view).

 Representation. Structure + operations; OR map +


operations; OR game layout and rules of play; OR
abstract data types.

 Knowledge representation. Framework for storing


knowledge and manipulating knowledge OR „Set of
syntactic and semantic conventions that makes it
possible to describe things.‟ Bench-Capon, 1990.

2
Knowledge-based Agent
 Central component of a knowledge-based agent is its
knowledge-base (KB)
 A KB is a set of representations of facts about the
world
 Each individual representation is called a sentence
 The sentences are expressed in a language called a
knowledge representation language
 A knowledge-based agent should be able to infer

3
Knowledge Representation
 The object of KR is to express knowledge in a
computer-tractable form, so that it can be used to
help agents perform well.
 A KR language is defined by two aspects:
 Syntax: describes how to make sentences OR

describes the possible configurations that can


constitute sentences.
 Semantics: determine the facts in the world to

which the sentences refer OR the “things” in the


sentence.

4
Knowledge Representation
Example
 The syntax of the language of arithmetic expressions
says that x and y are expressions denoting numbers,
the x  y is a sentence. The semantics of the
language say that x  y is false when y is a bigger
number than x, and true otherwise.

Inference:
 The terms “inference” and “reasoning” are generally

used to cover any process by which conclusions are


reached.
 Logical inference  deduction

5
Knowledge Representation
schemes
 Different Knowledge Representation
schemes/formalisms
 Natural Language

 Rules

 Logic

 Propositional logic (Boolean Logic)


 Predicate logic (First Order Logic)
 Frames
 Semantic Nets

6
Knowledge Representation
schemes in Natural Language
Expressiveness of natural language:
 Very expressive, probably everything that can be expressed
symbolically can be expressed in natural language (pictures,
content of art, emotions are often hard to express)
 Probably the most expressive knowledge representation
formalism we have. Reasoning is very complex, hard to model
Problems with natural language:
 Natural language is often ambiguous.
 Syntax and semantics are not fully understood.
 There is little uniformity in the structure of sentences.

7
Knowledge Representation
scheme: Rules
 Rules
 These are formalization often used to specify recommendations,
give directives or strategy.
 Format: IF <premises> THEN <conclusion>.
 Related ideas: rules and fact base; conflict set - source of
rules; conflict resolution- deciding on rules to apply.

 Advantages: easy to use; explanations are possible; capture


heuristics; can handle uncertainties to some extent.
 Disadvantages: cannot cope with complex associated
knowledge; they can grow to unmanageable size.

8
Knowledge Representation
scheme: Rules
Consists of:
 a rule set for representing the expert knowledge
 a “database management system” for the case-specific facts
 a rule interpreter for problem solving
Example
IF: (1) stain of organism is Gram neg. AND
(2) morphology of organism is rod AND
(3) aerobicity of organism is aerobic
THEN: strong evidence (0.8) that organism is Enterobact

Properties of rule-based systems:


 modularity of rule, very expressive, easy hadling of certainty
factors (probabilistic, possibilitic reasoning)
 Lack of precise semantics of rules. Not always efficient
9
Rules - A simple example
 Assume: Knowledge base consisting of facts and rules, a rule
interpreter to match the rule conditions against facts and means
for executing the rules.
Rules:
R1: IF: Raining,Outside(x),Has_Umbrella(x)
THEN: Uses_Umbrella(x)
R2: IF: Raining,Outside(x)
NOT Has_Umbrella(x)
THEN: Wet(x)
R3: IF: Wet(x)
THEN: Gets_Cold(x)
R4: IF: Sunny,Outside(x)
THEN: Gets_Sun_Tan(x)
Initial facts: Raining, Outside(John) 10
Rules - A simple example
Correct:
 Only one rule, R2 matches the facts with [xJohn], hence add
Wet(John)
 Facts after first cycle:
Raining, Outside(John), Wet(John)
 Now R3 matches facts, hence add
Gets_Cold(John)
 Facts after second cycle:
Raining, Outside(John), Wet(John), Gets_Cold(John)
Incorrect:
Gets_Sun_Tan(John)

Process of deriving new facts from given facts, is called INFERENCE

11
Knowledge Representation
scheme: Semantic Networks
 Semantic networks
 Semantic networks are graphical representation of entities and
their relationships. The nodes are objects or events; the arcs are
the relationships or moves.

 Advantages. Easy to translate to predicate calculus.


 Disadvantages. Cannot handle quantifiers; nodes may have
confusing roles or meanings; searching may lead to
combinatorial explosion; cannot express standard logical
connectives; can represent only binary or unary predicates.

12
Semantic Networks - An
example 1
IS - A Hierarchy

Living Thing
is a is a

Animal Plant
is a is a is a is a

Pet Livestock Tree Bush

is a is a is a is a

Dog Cat Cow Pine

is a is a

German Bull
Shepherd dog

13
Semantic Networks - An
example 2
IS - PART Hierarchy

Dog
is part is part
is part
Head Body Appendages Tail

is part is part
is part is part
is part
Ears Nose Eyes Mouth Legs Paws

14
Knowledge Representation
scheme: Frames
 Frames
 These are knowledge representation formalisms in which
stereotyped information on objects are represented.
 Features: capture object attributes and their values; search
done by matching;
 Structure: Node and collection of attributes(slots).

 Advantages: can cope with missing values- close matches


are presented.
 Disadvantages: has been hard to implement, especially
inheritance.

15
Knowledge Representation
scheme: Frames
Frames - What and Why
 A frame is a collection of questions to be asked about a
hypothetical situation: it specifies issues to be raised and
methods to be used in dealing with them.
 To understand a situation, questions like:
 What cased it (agent)?
 What was the purpose (intention)?
 What are the consequences (effects)?
 Whom does it affect (recipient)?
 How is it done (instruments)?

16
Frames - An example
Part of the Frame Description of a Hotel Room
hotel chair
hotel room
superclass: chair
superclass: room
height: 20-40cm
location:hotel
legs: 4
contains: (hotel chair
use: sitting
hotel phone
hotel bed)
hotel phone
superclass: phone
use: calling room service
hotel bed billing: through room
superclass: bed
mattress
use: sleeping
superclass: cushion
size: king
firmness: firm
part: (mattress frame)
17
Knowledge Representation
scheme: Propositional Calculus
 Propositional calculus- assertions describing things, use
logical connectives and boolean logic.

 Advantages. Can reason about the world; based on proven


theory.
 Disadvantages. Components cannot be individually
examined.

18
Propositional Calculus -
example
Read: Logic    
Nat. Lang. Or And Implies Not

 Let, Fact P: "Ali likes chips''


 Let, Fact Q: "Ali eats chips''

 Other possible facts:


 P  Q : "Ali likes chips or Ali eats chips”
 P  Q : "Ali likes chips and Ali eats chips'‟
 Q: "Ali doesn't eat chips'‟
 P  Q : "If Ali likes chips then Ali eats chips''

19
Knowledge Representation
scheme: Predicate Calculus(FOL)
 Predicate calculus- is an extension of propositional
calculus. Predicates are used these are of the form
function(arguments), where function is any object or
relationship. The quantifiers are used.

 Advantages. It has well defined rules for manipulation; it is


expressive.
 Disadvantages. Cannot handle uncertainty; uses small
primitives for descriptions whose numbers can be many.

20
Knowledge Representation
scheme: First-Order Logic
Read: Logic      
Nat. Lang. Or And Implies Not Forall Exists

Examples: (a) man(Pat) (d) man(Jan)  woman(Jan)


(b) married(Pat,Jan) (e) xy[person(x)has_mother(x,y)]

(c) xy[[married(x,y)  man(x)]man(y)]

Properties of First-Order Logic: Correct:


raining
 very expressive as well as
rainingstreet_wet
unambiguous syntax and semantics
street_wet
 no generally efficient procedure for
processing knowledge Incorrect:
raining
rainingstreet_wet
elephant_hungry 21
Declarative or Procedural
Representation of Knowledge
How to represent knowledge?
 “Knowing how”: procedure that can be called
 The human information processor is a stored program
device, with its knowledge of the world embedded in the
programs. What a person (or robot) knows about the
English language, the game of chess, or the physical
properties of his world is coextensive with his set of
programs for operating with it.
 “Knowing that”: declarative representation which
requires an interpreter. Advantages:
 Understandability, learnability, accessibility, communicability,
flexibility, economy of storage

22
Representation of Knowledge
 There is no single most adequate knowledge representation
formalism/scheme for everything.
 Main points for selecting a representation formalism: what
should be represented, how should the knowledge be
processed.
 There are many more representation formalisms. All the above
mentioned are symbolic. There are non-symbolic (e.g. pictorial)
ones. Neural networks work on non-symbolic representations.

23

You might also like