You are on page 1of 44

Riga Technical University

Faculty of Computer Science and Information Technology


Department of Systems Theory and Design

FUNDAMENTALS OF ARTIFICIAL
INTELLIGENCE
Lecture 7

KNOWLEDGE REPRESENTATION
AND NETWORKED SCHEMES
Dr.habil.sc.ing., professor Janis Grundspenkis, Dr.sc.ing., lecturer Alla Anohina-Naumeca

Department of Systems Theory and Design


Faculty of Computer Science and Information Technology
Riga Technical University
E-mail:
{janis.grundspenkis, alla.anohina-naumeca}@rtu.lv
Address:
Meza street 1/4- {550, 545}, Riga, Latvia, LV-1048
Phone:
(+371) 67089{581, 595}

Knowledge representation
Knowledge representation is the method used to
encode knowledge in an intelligent systems
knowledge base.
The object of knowledge representation is to
express knowledge in computer-tractable form, such
that it can be used to help intelligent system perform
well.

2/44

Knowledge base
A knowledge base is an integral part of any knowledge-based intelligent
system. It maps objects and relationships of the real world to
computational objects and relationships.

Know ledge base


Object 1
Object 2
Object 3
Relation 1
Relation 2

Relation 1
Object 2

Object 1

Dom ain

Relation 2
Object 3
3/44

But what is knowledge?


Knowledge is an abstract term that attempts to capture an
individuals understanding of a given subject.
In the world of intelligent systems the domain-specific
knowledge is captured. Domain is a well-focused subject
area.
Cognitive psychologists have formed a number of theories to
explain how humans solve problems. This work uncovered the
types of knowledge humans commonly use, how they
mentally organize this knowledge, and how they use it
efficiently to solve a problem.
4/44

Types of knowledge (1)


Declarative Concepts Describes what is known
knowledge Facts
about a problem. This
Objects includes simple statements
that are asserted to be
either true or false. This
also includes a list of
statements that more fully
describes some object or
concept (object-attributevalue triplet).
5/44

Types of knowledge (2)

Procedural
knowledge

Rules
Strategies
Agendas
Procedures

Describes how a
problem is solved.
This type of
knowledge provides
direction on how to do
something.

6/44

Types of knowledge (3)


Heuristic
Rules of Describes a rule-of-thumb
that guides the reasoning
Thumb
Knowledge
process. Heuristic
knowledge is often called
shallow knowledge. It is
empirical and represents
the knowledge compiled by
an expert through the
experience of solving past
problems.

7/44

Types of knowledge (4)


Knowledge
MetaKnowledge about the

other types
of
knowledge
and how to
use them

Describes knowledge
about knowledge. This
type of knowledge is used to
pick other knowledge that is
best suited for solving a
problem. Experts use this
type of knowledge to
enhance the efficiency of
problem solving by directing
their reasoning in the most
promising area.
8/44

Types of knowledge (5)


Structural Rule sets
Knowledge Concept
relationships
Concept to
object
relationships

Describes knowledge
structures. This type of
knowledge describes an
experts overall mental
model of the problem.
The experts mental
model of concepts, subconcepts, and objects is
typical of this type of
knowledge.
9/44

Knowledge representation (1)


In general, a representation is a set of conventions
about how to describe a class of things.
A description makes use of the conventions of a
representation to describe some particular thing.
The function of any representation scheme is to
capture essential features of a problem domain
and make that information available to a problem
solving procedure.
10/44

Knowledge representation (2)


A representation consists of four fundamental
parts:
A lexical part that determines which symbols are
allowed in the representations vocabulary.
A structural part that describes constraints on
how the symbols can be arranged.
A procedural part that specifies access
procedures that enable to create descriptions, to
modify them, and to answer questions using them.
A semantic part that establishes a way of
associating meaning with the description.
11/44

Knowledge representation schemes (1)


There are 4 schemes of knowledge representation:

Logical schemes

Predicate calculus

Propositional calculus

Networked schemes

Procedural schemes

IF..THEN.. rules

Structured schemes

Semantic nets

Scripts

Conceptual graphs

Frames

12/44

Knowledge representation schemes (2)


Logical schem es represent knowledge, using mathematical or
orthographic symbols, inference rules and are based on precisely
defined syntax and semantics.

I n procedural schem es knowledge is represented as a set of


instructions for problem-solving. That allows to modify a knowledge
base easily and to separate a knowledge base from an inference
mechanism.

Netw orked schem es use a graph to represent knowledge. Nodes of a


graph display objects or concepts in a domain, but arcs define
relationships between objects, their attributes and values of attributes.

Structured schem es extend networked representation by displaying


each node in a graph as a complex data structure.
13/44

Semantic nets

Author: Quillian, 1967


Idea: Concepts are a part of knowledge about world. People perceive
concepts and reason with them. Concepts are related with relationships
between them. Relationships between concepts form understanding of
people.

14/44

Definition of semantic nets


Semantic network is a knowledge representation schema that captures
knowledge as a graph. The nodes denote objects or concepts, their
properties and corresponding values. The arcs denote relationships
between the nodes. Both nodes and arcs are generally labelled (arcs
have weights).
Symbols of semantic nets:
Name

- A concept

Name
- A relationship

15/44

Nodes of semantic nets


Nodes of semantic nets can represent:
Concepts
Objects
Events
Features
Time
etc.

16/44

Relationships (1)
Several kinds of relationships are used in semantic nets:
1. Class - Superclass or IS-a relationship
Car

Is- a

Class

Vehicle
Superclass

2. Instance-class or Is an instance of relationship

Johns car
Instance

Is an instance of

Car
Class
17/44

Relationships (2)
3. Part-Whole or Part of relationship
Door

Part of

Part

Car
Whole

4. Object-Attribute or Has relationship


Johns car
Objects

Has

Color
Attribute

18/44

Relationships (3)
5. Attribute-Value or Value relationship
Color

Value

Attribute

Red
Value

6. Logical relationships (and, or, not)


7. Linguistic relationships (examples: likes, owns, travels)

19/44

Inheritance (1)
Inheritance is possible in semantic nets. Inheritance is a process by
which the local information of a superclass node is assumed by a
class node, a subclass node, and an instance node.
Example:
All vehicle have a brand name
and a model. A car is a class of
a superclass Vehicle. So Car
inherits all features of Vehicle,
that is, Brand Name and Model

has

Brand name

has

Model

Vehicle

Is a
Car

20/44

Example of semantic nets


Johns car

Is an instance
of
Has

Has
Brand name
Value
BMW

Car

Reg.No.
Has

Is a

Value

Vehicle

LA 657

owner
Model

Value

John

Has

Age

Value

22

works
850

Bank

Has

Name

Value

Lateko

21/44

Conceptual graphs
Author: Sowa, 1984
A conceptual graph is a finite, connected, bipartite graph.
Two types of nodes are used in conceptual graphs:

Name

Name

- A concept

- A conceptual
relationship
22/44

Arcs of conceptual graphs (1)


In conceptual graphs the following arcs are allowed:

Between a concept and a conceptual relationship


Name

Name

Between a conceptual relationship and a concept


Name

Name

23/44

Arcs of conceptual graphs (2)


The following arcs are not allowed in conceptual graphs:
Between a concept and a concept
Name

Name

Between a conceptual relationship and a conceptual relationship


Name

Name

24/44

Conceptual relationships (1)


Every conceptual relation r has a relation type t and a
nonnegative integer n called its valence.
The number of arcs that belong to r is equal to its valence n. A
conceptual relation of valence n is said to be n-adic, and its
arcs are numbered from 1 to n.
For every n-adic conceptual relation r, there is a sequence of n
concept types t1,...,tn, called the signature of r. A 0-adic
conceptual relation has no arcs, and its signature is empty.
All conceptual relations of the same relation type t have the
same valence n and the same signature s.
The term monadic is synonymous with 1-adic, dyadic with 2adic, and triadic with 3-adic.
25/44

Conceptual relationships (2)


1-adic relation Must be one outgoing arc from a conceptual relationship

Name

Name

2-adic relation Must be one outgoing and one ingoing arc

Name

Name

Name

3-adic relation Must be two ingoing arcs and one outgoing arc

Name

Name

Name

Name
26/44

Concepts (1)
Concepts have the following form:
Concept = Type + Referent, where
Type is a type of a concept, cannot be empty;
Referent = Quantifier + Designator, can be empty

Type: Referent

Type

Teacher: Mary

Referent
27/44

Concepts (2)
Forms of cocnepts:
1. A node containing only a type of a concept
Type

Dog

There is a dog, but it is not specified which one dog

2. Type + individual marker. Names of persons, places or


organizations can be displayed by an individual marker.
Type

Dog: Reksi

Individual
marker
28/44

Concepts (3)
3. Specific but unnamed individual. Identity of a object can be
acquired from context performing inference
Cup: #

Dog: #134

4. Several objects:
- By listing them
Guests: {John,
Mary, Michael}

agent

Sing

object

Song

- Using {*}
Birds: {*}

Several birds
29/44

Concepts (4)
5. Precise number of objects: @number
Moves
on

Person

Legs: @2

6. Units of measurements
Interval: @18 sec

7. All by using or
Fish:

attribute
All fish are wet

wet

30/44

Concepts (5)
8. A conceptual graph can include a concept which is a conceptual
graph by itself
Example:

experiencer

Person: Tom

believes
object

proposition
Person: Jane

agent

pizza

likes
object
31/44

Concepts (6)

9. Different combinations
Number: 18

Number: @18

Number: @18 18
Number: {*} @5 18

There is a number 18

There are eighteen numbers

There are eighteen numbers and all of


them are equal with 18
There are 5 numbers and all are equal
with 18

32/44

Operations of conceptual graphs (1)


Theory of conceptual graphs defines 4 operations:

Copying
Restricting
Joining
Simplifying

Copying allows acquiring of a new conceptual graph G1 which is


identical with the already existent conceptual graph G.
33/44

Operations of conceptual graphs (2)


R estricting allows replacing of a concept node by its specialization.
Two cases are possible:
Type can be replaced by an individual marker
Type can be replaced by its subtype

Joining allows joining of two conceptual graphs if they have an


identical concept node.

Sim plifying allows removing of one of two identical nodes of a


conceptual relation together with all its arcs.
34/44

Operations of conceptual graphs (3)

In order to apply the mentioned operations a type hierarchy must be


defined: if s and t are types of concepts and ts, then t is subtype of s.

Examples:
Manager Employee Person
Dog Animal
John Man Person

35/44

Operations of conceptual graphs (4)


Example:
For example, we have two conceptual graphs G1 and G2 and a type hierarchy
Dog Animal

Is a

Meat-eater

G1
Animal

location
G2
Dog: Reksi

color

brown

porch
color

brown

36/44

Operations of conceptual graphs (5)


Example:
Restricting operation can be applied to the graph G1 by replacing type Animal
with its subtype Dog: Reksi. A new graph G3 is acquired as a result.

Is a
G3
Dog: Reksi

Meat-eater
color

brown

37/44

Operations of conceptual graphs (6)


Example:
Now we can join graphs G2 un G3, because they have an identical concept node
Dog:Reksi. A new graph G4 is acquired.

Is a

Meat-eater
location

porch

G4
Dog:Reksi

color

color

brown

brown

38/44

Operations of conceptual graphs (7)


Example:
By simplifying the graph G4 a new graph G5 is acquired.

Is a

Meat-eater
location

G5
Dog:Reksi

color

porch

brown

39/44

Inheritance in conceptual graphs


By using restriction and joining operations of conceptual graphs it is possible to
support inheritance. When a type is replaced by an individual marker an
instance inherits features from a type. When a type is replaced by a subtype
then the subtype inherits features from the type.

Example:
The type hierarchy Chimpanzee Primate is defined

Type

replaces
Subtype

replaces
An individual
marker

Part of

Primate

hand

Inheritance made by a subtype

Part of

Chimpanzee

hand

Inheritance made by an instance

Chimpanzee: bonzo

Part of

hand

40/44

Logic and conceptual graphs (1)


In conceptual graphs it is possible to represent logical operations AND,
OR and NOT.
1. Negation is implemented using a propositional node and a unary
conceptual relation NOT
Example:
A conceptual graph displaying a sentence The sun is not shining

NOT
proposition
Shine

agent

Sun

41/44

Logic and conceptual graphs (2)


2. Conjunction is displayed by placing both conceptual graphs in
the common propositional node.

Example:
A conceptual graph displaying a sentence The study course is interesting and
difficult

proposition
Study course

attribute

Interesting

Study course

attribute

Difficult

42/44

Logic and conceptual graphs (3)


Disjunction is represented by negation and conjunction:
1. A graph G1 must be placed an a propositional node and its negation must
be made
2. A graph G2 must be placed an a propositional node and its negation must
be made
3. Both negations must be placed in a propositional node and its negation
must be made
Example:

proposition
proposition

Person: John

attribute

silly

Not

proposition

Person: John

Not

attribute

smart

Not
43/44

Example

G1

Student: #

G2

Language: C#
language

G3

Company: #

G4

Company: #

G5

Company: #

Name

mean
Name

agent

place

John

Program

agent

Student: #

EuroSoft

Develop

object

mean

Language: C#
language

Work

agent

Applications

Student: #

44/44

You might also like