ITT63 ARTIFICIAL INTELLIGENCE UNIT II
Academic Year 2016-2017(EVEN SEM)
Knowledge Representation
Knowledge Representation: Approaches and issues in knowledge representation- Knowledge -
Based Agent- Propositional Logic – Predicate logic – Unification – Resolution - Weak slot – filler
structure – Strong slot - filler structure.
Knowledge .How it is represented in AI.
Let us first consider what kinds of knowledge might need to be represented in AI systems:
1. Objects -Facts about objects in our world domain. e.g. Guitars have strings, trumpets
are brass instruments.
2. Events - Actions that occur in our world. e.g. Steve Vai played the guitar in Frank
Zappa's Band.
3. Performance - A behavior like playing the guitar involves knowledge about how to do
things.
4. Meta-knowledge- Knowledge about what we know. e.g. Bobrow's Robot who plan's a
trip. It knows that it can read street signs along the way to find out where it is.
a. Mapping between facts and representations
Thus in solving problems in AI we must represent knowledge and there are two entities to deal with:
Facts - truths about the real world and what we represent. This can be regarded as the
knowledge level.
Representation - which we manipulate. This can be regarded as the symbol level of the facts
since we usually define the representation in terms of symbols that can be manipulated by programs.
We can structure these entities at two levels
The knowledge level - at which facts are described
The symbol level - at which representations of objects are defined in terms of symbols that
can be manipulated in programs
III YR /VI SEM Page 1
,ITT63 ARTIFICIAL INTELLIGENCE UNIT II
Figure: Mapping between facts and representations
English or natural language is an obvious way of representing and handling facts. Logic enables
us to consider the following fact: spot is a dog as dog(spot) We could then infer that all dogs have tails
with:
: dog(x) hasatail(x) We can then deduce:
hasatail(Spot)
Using an appropriate backward mapping function the English sentence Spot has a tail can be generated.
The available functions are not always one to one but rather are many to many which is a characteristic
of English representations. The sentences All dogs have tails and every dog has a tail both say that each
dog has a tail but the first could say that each dog has more than one tail try substituting teeth for tails.
When an AI program manipulates the internal representation of facts these new representations should
also be interpretable as new representations of facts.
b. Intelligents agents should have following things
Using Knowledge- We have briefly mentioned where knowledge is used in AI systems. Let us
consider a little further to what applications and how knowledge may be used.
Learning – (Acquiring knowledge) This is more than simply adding new facts to a knowledge
base. New data may have to be classified prior to storage for easy retrieval, etc. Interaction and
inference with existing facts to avoid redundancy and replication in the knowledge and also so
that facts can be updated.
Retrieval - The representation scheme used can have a critical effect on the efficiency of the
method. Humans are very good at it.
Reasoning - Infer facts from existing data.
If a system on only knows:
Miles Davis is a Jazz Musician.
All Jazz Musicians can play their instruments well.
III YR /VI SEM Page 2
,ITT63 ARTIFICIAL INTELLIGENCE UNIT II
If things like Is Miles Davis a Jazz Musician? or Can Jazz Musicians play their instruments well?
are asked then the answer is readily obtained from the data structures and procedures.
However a question like Can Miles Davis play his instrument well? requires reasoning.
The above are all related. For example, it is fairly obvious that learning and reasoning involve retrieval
etc.
The natural language reasoning requires inferring hidden state, namely, the intention of the speaker.
When we say, "One of the wheel of the car is flat.", we know that it has three wheels left. Humans can
cope with virtually infinite variety of utterances using a finite store of commonsense knowledge.
A logic consists of two parts, a language and a method of reasoning. The logical language, in turn,
has two aspects, syntax and semantics. Thus, to specify or define a particular logic, one needs to
specify three things:
Syntax: The atomic symbols of the logical language, and the rules for constructing well-
formed, non-atomic expressions (symbol structures) of the logic.
Semantics: The meanings of the atomic symbols of the logic, and the rules for determining the
meanings of non-atomic expressions of the logic. It specifies what facts in the world a sentence
refers to. Hence, also specifies how you assign a truth value to a sentence based on its meaning
in the world.
Facts are claims about the world that are True or False, whereas a representation is an
expression (sentence) in some language that can be encoded in a computer program and stands
for the objects and relations in the world.
There are a number of logical systems with different syntax and semantics. We list below a few.
– Propositional logic
– All objects described are fixed or unique
"John is a student" student(john) Here John refers to one unique person.
– First order predicate logic
– Objects described can be unique or variables to stand for a unique object
"All students are poor" ForAll(S) [student(S) -> poor(S)]
Here S can be replaced by many different unique students.
This makes programs much more compact:
III YR /VI SEM Page 3
, ITT63 ARTIFICIAL INTELLIGENCE UNIT II
eg. ForAll(A,B)[brother(A,B) -> brother (B,A)]
Approaches to knowledge representation?
Properties of a good system
The following properties should be possessed by a knowledge representation system.
Representational Adequacy- the ability to represent the required knowledge.
Inferential Adequacy - the ability to manipulate the knowledge represented to produce new
knowledge corresponding to that inferred from the original
Inferential Efficiency - the ability to direct the inferential mechanisms into the most productive
directions by storing appropriate guides;
Acquisitional Efficiency - the ability to acquire new knowledge using automatic methods
wherever possible rather than reliance on human intervention.
A. Simple relational knowledge
The simplest way of storing facts is to use a relational method where each fact about a set of objects is
set out systematically in columns. This representation gives little opportunity for inference, but it can
be used as the knowledge basis for inference engines.
Simple way to store facts.
Each fact about a set of objects is set out systematically in columns.
Little opportunity for inference.
Knowledge basis for inference engines.
Figure: Simple Relational Knowledge
We can ask things like:
Who is dead?
Who plays Jazz/Trumpet etc.?
This sort of representation is popular in database systems.
III YR /VI SEM Page 4
Academic Year 2016-2017(EVEN SEM)
Knowledge Representation
Knowledge Representation: Approaches and issues in knowledge representation- Knowledge -
Based Agent- Propositional Logic – Predicate logic – Unification – Resolution - Weak slot – filler
structure – Strong slot - filler structure.
Knowledge .How it is represented in AI.
Let us first consider what kinds of knowledge might need to be represented in AI systems:
1. Objects -Facts about objects in our world domain. e.g. Guitars have strings, trumpets
are brass instruments.
2. Events - Actions that occur in our world. e.g. Steve Vai played the guitar in Frank
Zappa's Band.
3. Performance - A behavior like playing the guitar involves knowledge about how to do
things.
4. Meta-knowledge- Knowledge about what we know. e.g. Bobrow's Robot who plan's a
trip. It knows that it can read street signs along the way to find out where it is.
a. Mapping between facts and representations
Thus in solving problems in AI we must represent knowledge and there are two entities to deal with:
Facts - truths about the real world and what we represent. This can be regarded as the
knowledge level.
Representation - which we manipulate. This can be regarded as the symbol level of the facts
since we usually define the representation in terms of symbols that can be manipulated by programs.
We can structure these entities at two levels
The knowledge level - at which facts are described
The symbol level - at which representations of objects are defined in terms of symbols that
can be manipulated in programs
III YR /VI SEM Page 1
,ITT63 ARTIFICIAL INTELLIGENCE UNIT II
Figure: Mapping between facts and representations
English or natural language is an obvious way of representing and handling facts. Logic enables
us to consider the following fact: spot is a dog as dog(spot) We could then infer that all dogs have tails
with:
: dog(x) hasatail(x) We can then deduce:
hasatail(Spot)
Using an appropriate backward mapping function the English sentence Spot has a tail can be generated.
The available functions are not always one to one but rather are many to many which is a characteristic
of English representations. The sentences All dogs have tails and every dog has a tail both say that each
dog has a tail but the first could say that each dog has more than one tail try substituting teeth for tails.
When an AI program manipulates the internal representation of facts these new representations should
also be interpretable as new representations of facts.
b. Intelligents agents should have following things
Using Knowledge- We have briefly mentioned where knowledge is used in AI systems. Let us
consider a little further to what applications and how knowledge may be used.
Learning – (Acquiring knowledge) This is more than simply adding new facts to a knowledge
base. New data may have to be classified prior to storage for easy retrieval, etc. Interaction and
inference with existing facts to avoid redundancy and replication in the knowledge and also so
that facts can be updated.
Retrieval - The representation scheme used can have a critical effect on the efficiency of the
method. Humans are very good at it.
Reasoning - Infer facts from existing data.
If a system on only knows:
Miles Davis is a Jazz Musician.
All Jazz Musicians can play their instruments well.
III YR /VI SEM Page 2
,ITT63 ARTIFICIAL INTELLIGENCE UNIT II
If things like Is Miles Davis a Jazz Musician? or Can Jazz Musicians play their instruments well?
are asked then the answer is readily obtained from the data structures and procedures.
However a question like Can Miles Davis play his instrument well? requires reasoning.
The above are all related. For example, it is fairly obvious that learning and reasoning involve retrieval
etc.
The natural language reasoning requires inferring hidden state, namely, the intention of the speaker.
When we say, "One of the wheel of the car is flat.", we know that it has three wheels left. Humans can
cope with virtually infinite variety of utterances using a finite store of commonsense knowledge.
A logic consists of two parts, a language and a method of reasoning. The logical language, in turn,
has two aspects, syntax and semantics. Thus, to specify or define a particular logic, one needs to
specify three things:
Syntax: The atomic symbols of the logical language, and the rules for constructing well-
formed, non-atomic expressions (symbol structures) of the logic.
Semantics: The meanings of the atomic symbols of the logic, and the rules for determining the
meanings of non-atomic expressions of the logic. It specifies what facts in the world a sentence
refers to. Hence, also specifies how you assign a truth value to a sentence based on its meaning
in the world.
Facts are claims about the world that are True or False, whereas a representation is an
expression (sentence) in some language that can be encoded in a computer program and stands
for the objects and relations in the world.
There are a number of logical systems with different syntax and semantics. We list below a few.
– Propositional logic
– All objects described are fixed or unique
"John is a student" student(john) Here John refers to one unique person.
– First order predicate logic
– Objects described can be unique or variables to stand for a unique object
"All students are poor" ForAll(S) [student(S) -> poor(S)]
Here S can be replaced by many different unique students.
This makes programs much more compact:
III YR /VI SEM Page 3
, ITT63 ARTIFICIAL INTELLIGENCE UNIT II
eg. ForAll(A,B)[brother(A,B) -> brother (B,A)]
Approaches to knowledge representation?
Properties of a good system
The following properties should be possessed by a knowledge representation system.
Representational Adequacy- the ability to represent the required knowledge.
Inferential Adequacy - the ability to manipulate the knowledge represented to produce new
knowledge corresponding to that inferred from the original
Inferential Efficiency - the ability to direct the inferential mechanisms into the most productive
directions by storing appropriate guides;
Acquisitional Efficiency - the ability to acquire new knowledge using automatic methods
wherever possible rather than reliance on human intervention.
A. Simple relational knowledge
The simplest way of storing facts is to use a relational method where each fact about a set of objects is
set out systematically in columns. This representation gives little opportunity for inference, but it can
be used as the knowledge basis for inference engines.
Simple way to store facts.
Each fact about a set of objects is set out systematically in columns.
Little opportunity for inference.
Knowledge basis for inference engines.
Figure: Simple Relational Knowledge
We can ask things like:
Who is dead?
Who plays Jazz/Trumpet etc.?
This sort of representation is popular in database systems.
III YR /VI SEM Page 4