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

L02 - Knowledge-Rep - Part 1

The document discusses knowledge representation and different methods used to represent knowledge for computers. It introduces object-attribute-value representation which stores attributes and values of objects. Semantic networks are also discussed as an alternative that represents relationships between concepts using nodes and arcs. Different types of knowledge like declarative, procedural and structural knowledge are defined. Requirements for effective knowledge representation systems include representational accuracy, inferential adequacy and efficiency. Logical and rule-based representations are also mentioned.

Uploaded by

jl289173
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

L02 - Knowledge-Rep - Part 1

The document discusses knowledge representation and different methods used to represent knowledge for computers. It introduces object-attribute-value representation which stores attributes and values of objects. Semantic networks are also discussed as an alternative that represents relationships between concepts using nodes and arcs. Different types of knowledge like declarative, procedural and structural knowledge are defined. Requirements for effective knowledge representation systems include representational accuracy, inferential adequacy and efficiency. Logical and rule-based representations are also mentioned.

Uploaded by

jl289173
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Lecture 2: Knowledge

Representation

KT24202 Artificial Intelligence


Faculty of Computing & Informatics,
Universiti Malaysia Sabah

1
Outline
• Part 1 (in this slide)
– Knowledge & Knowledge Representation
– Object-Attribute-Value
– Semantic Network
– Frame
• Part 2
– Propositional Logic
– First Order Predicate logic

2
Knowledge
• KNOWLEDGE is a familiarity with
someone or something, which can
include information, facts, description,
and/or skills acquired through
experience or education.

State of
Familiarity Understanding Body of facts
knowing

3
3
Hierarchy (data to knowledge)
(Activities)

Decision making
Knowledge
Synthesizing

Analysing
Information
Summarizing

Organizing
Data
Collecting

4
4
Types of Knowledge
Knowledge about Facts/statements describing
knowledge object, people, place,
event etc. Describes
Meta- Declarative ‘knowing that’
knowledge

Experience-based,
mental short cut Heuristic Procedural Describes how
to ease cognitive learners use/apply their
load declarative knowledge.
Describes
Structural ‘knowing how’

Understanding of domain /
discipline. Describes ‘knowing why’
5
5
Example of Declarative Knowledge
She is beautiful.

The sun rises in the East.

My room number is 2013.

UMS is located near to the sea.

6
6
Procedural Knowledge
E.g., “to make half-cooked egg, first boil some
water ….”

E.g., solving problems, forming plans, making


arguments

IF .. THEN rule format:


rains  bring umbrella ; hungry  get food
7
7
Structural Knowledge
Mediates transition of declarative knowledge into
procedural knowledge

Describes how concepts within a domain are


interrelated

E.g. relationship between ‘instruction’ and


‘learning’

8
8
Source of Knowledge
Non-
Documented
documented

Tacit Explicit

Experience Printed Digital


/ heuristic documents media

9
9
Knowledge Representation?
• A science of translating actual knowledge
into a format that can be used by the
computer
• The study of ;
o How knowledge and facts about the world can be
represented &
o Example of representations: Semantic networks
& Logical representations
o What kinds of reasoning can be done with that
knowledge
10
10
Knowledge Representation
REAL
WORLD
Translate into internal
representation
Inference:
deduction, INTERNAL
search, planning, REPRESENTATION
learning, Translate back into
explanation terms
REAL understandable
WORLD
by humans

11
11
Approaches to KR
• Relational knowledge
– storing facts and its relation (e.g. a relational database)
• Inheritable knowledge
– represented in hierarchy of classes, has object, attribute
and value, apply inheritance (e.g. hierarchy of animals)
• Inferential Knowledge
– In the form of logics, used to derive facts and resolutions
• Procedural knowledge
– Focus on how to do, apply rules, heuristics, e.g. (how to
prepare food, how to diagnose car problem, etc.)
12
Requirements for KR
• Representational Accuracy - KR system should have the
ability to represent all kind of required knowledge.
• Inferential Adequacy - KR system should have ability to
manipulate the representational structures to produce new
knowledge corresponding to existing structure.
• Inferential Efficiency - The ability to direct the inferential
knowledge mechanism into the most productive directions by
storing appropriate guides.
• Acquisitional efficiency - The ability to acquire the new
knowledge easily using automatic methods.

13
Knowledge Representation
• Main approaches:
– Object-Attribute-Value
– Semantic Network
– Frame
– Logic

14
KR methods in focus
Object- • Associative network: Object-
Attribute-Value, Semantic
based Network

Production • IF <condition> THEN <action>


Rules
• Propositional logic
Logical • First Order Predicate Logic
(FOPL)
15
15
KR: Object-Attribute-Value (OAV)
• To represent attribute value of an object.

The shirt is yellow in color

Object attribute value

Shirt Color Yellow


16
16
Knowledge Representation: OAV

• Physical,
Object
abstract
OAV

• Numerical,
Property string, Boolean
values • Single, multi-
value
17
Knowledge Representation: OAV
• Most objects will have many attributes.

Nike White
Brand Color

Shirt
Size
Made of
Cotton L (Large)

18
OAV

Describe the character below in


OAV form

19
19
OAV
Blue

color Round

shape
Cute
appearance
appearance
Funny
hobby

no. of legs Sings

20
20
KR: Associative/Semantic Network
Blue
Not
real
Round

Cartoon
Cute
Kids
isa
Funny

Sings

… … … 2
21
21
OAV Exercise

“The chair’s color is red and priced at


RM 35.00 ”

“I have a brother named Johnny. The


8 years-old brother likes to play tennis
and football.”

22
22
Advantage of OAV
• Simple and easy to understand
• Flexible – represent various types of
knowledge
• Compact – represent large amount of
knowledge
• Compatible with relational databases

23
Disadvantages of OAV
• Limited expressiveness – unable to
represent complex relationship
• Limited inference power – limited to
answer characteristics/attribute of an
object only

24
Semantic Network
• Alternative to OAV for complex
associative network of object and its
attribute values.
• Categorize objects of different types and
link them with relationship, e.g.,:
– IS-A (inheritance)

25
KR: Semantic Network

Method of knowledge
representation that uses graph
made up of nodes and arcs
• Nodes - objects / properties
• Arcs – relationship between objects

26
26
Parrot is a bird. Typically, bird has wings and
travel by flying. Bird category falls under animal
kingdom. All animal requires air to breathe.
Ostrich is a bird but travels by walking.

Wings

is-a is-a
Parrot Bird Animal breathe Air

Fly
Ostrich

Walk
NOTE: This is an exceptional handling
value. It overwrites the property ‘flying’ of birds (as ostrich doesn’t fly). 27
27
… …
fly

… Clown

Plants
Birds
Fish …
motile
multi
cellular
Living breathe
Animal
… things

Reptiles
Amphibians

Mammals … Bacteria

… …

28
28
Inheritance !!
Important concept in semantic
network

29
29
Semantic Network
Specific
Short sharp
attribute tail claw

Black has has


General
color
comel isa cat natures

liketo
“comel” is a cat
scratch

• “Comel” as cat, therefore “Comel”


inherits all general natures of cat. 30
Example
Albatross and Kiwi are two types of
bird. Albatross has black and white
colour while Kiwi is brown. Albert
and Ross are two albatross.
Generally, all birds travel by flying and
active during the daytime. Kiwi,
however, travel by walking and active
during the night time. Kim is a kiwi.
31
31
32
32
Exercise 1
Slither and Sidney are two grass snakes.
They are in small size and green color.
Sidney, like the other grass snakes, eats
meat. Slither, however, is a vegetarian
and therefore, does not eat meat. Grass
snake is a type of snake, which is a reptile
with no legs. Crocodile is also a reptile.

33
33
Exercise 2
James is a seagull. Like all birds, seagulls have
two wings and can fly. They love to eat fish.
James has a friend named Sean, a penguin.
Even though penguins are also birds, they
cannot fly. Instead, they walk. Penguins can
only survive at places with cold temperature.
Just like seagulls, their major source of food is
fish which they caught in the icy cold water
where they live.

34
34
Advantage of Semantic Network
• Natural representation of knowledge
• Extendable to accommodate more
relationship
• Meaning of the structure is easy to
understand

35
Disadvantage
• Computational expensive – if the
network gets large, then traversing the
tree/representation takes time.
• Do not have standard definition of the
relationship (link) names

36
Knowledge Representation: Rules
• A knowledge structure that relates some
known information to other information
and that can be concluded or inferred to
be known.
• Type of: Procedural knowledge
• Structure: IF <antecedent> THEN
<consequent>

37
Rules - Structure
Premise / Antecedents / Condition
• IF CGPA is “high” THEN ….
• IF engine_sound is “strange” OR car_body is
“fair” THEN ….

Action / Consequence
• ….. THEN approve admission
• ….. THEN check the engine part
38
38
Knowledge Representation: Rules
• A knowledge structure that relates some
known information to other information
and that can be concluded or inferred to
be known.
• Type of: Procedural knowledge
• Structure: IF <condition> THEN <action>
• Used by Rule-based Systems & Expert
Systems
39
Structure of Rule-Based Systems
• Rules-Based Systems has
– Set of production rules
– Working memory
• Set of production rules
– describe the knowledge about a problem domain
– Rules will be used to set of facts or data to derive
new information (inference)
• Working memory - a list of known facts/data
and new derived information that are true
40
Example of production rules
• Example:
IF the temperature is high
THEN turn on the air conditioner
• In the rule:
– “temperature is high” is the condition
– “tun on the air conditioner” is the action

41
Rules - Examples

IF hungry THEN get some food

IF siren rings THEN run out


immediately
IF cough continuously THEN see a
doctor
42
42
Example: Diagnosing Strep Throat
Rule 1:
IF patient has a sore throat (P1)
AND suspect bacterial infection (SG2)
THEN patient has strep throat (G1)

Rule 2:
IF patient temperature is > 37°C (P2)
THEN patient has a fever (SG1)

Rule 3:
IF patient has been sick > a month (P3)
AND patient has a fever (SG1)
THEN suspect bacterial infection (SG2)
43
Advantages of Rules
• Clarity: expressed in natural language
and easy to understand
• Flexible: Highly modular, thus the rules
can be easily modified, removed or
adding new rules
• Efficient: Decision can be quick, which
only the specific rules will be evaluated

44
Disadvantages of Rules
• Difficulty in getting the rules: may be difficult
to acquire and formalize the knowledge from
experts into rules.
• Difficult to maintain rules: number of rules
can grow and may lead to inconsistency.
• Limited scope: only for specific domain
knowledge and not suitable for complex
reasoning

45
Summary
• Knowledge - information or data that can be used to
solve a problem or produce a decision
• Knowledge representation - process of representing
a knowledge in a form that can be used by a
computer program to reason, learn, or make
decisions.
• Each technique has its own advantage and
disadvantage
• Choice of technique depends on the problem and
the type of knowledge that needs to be represented.
46
References
• Alison Cawsey, Essence of Artificial
Intelligence.

• Prepared by: Dr. Mohd Shamrie Sainin


(2023)

47

You might also like