You are on page 1of 19

Artificial Intelligence

Knowledge Representation
Earlier it was believed that the best approach to solutions was through the
development of General Purpose Problem Solver, that is, systems powerful to
prove a theorem in geometry, perform a complex robotic task, or to develop a
plan to complete a sequence of operations.
But it was deduced that the systems became effective only when the solution
methods incorporated domain specific rules and facts, i.e. after gaining specific
knowledge.
It eventually led to knowledge based systems.

13.11.2017 1
Artificial Intelligence

Knowledge Representation
Importance of Knowledge
Knowledge can be defined as the body of facts and principles
accumulated by human-kind or the act, fact or state of knowing.
In actuality it is more than this, it also includes having a familiarity with
language, concepts, procedures, rules, 12
ideas, abstractions , places,
10
customs, facts associations along with ability to use these notions
effectively in modeling different aspects of the world.
How is knowledge stored in biological organisms and computers?
Human brain weighs 3.3 pounds - estimated number of neurons 1012 -
potential storage 1014
In computers, knowledge is also stored as symbolic structures, in the
form of collections of magnetic spots and voltage states.

13.11.2017 2
Artificial Intelligence

Knowledge Representation
Knowledge can be of following types
Declarative (statements)
Procedural (facts)
Heuristics (rule of thumb / experience)
We should not confuse Knowledge with data. Physician example
Belief v/s Hypothesis
Belief is any meaningful and coherent expression that can be
represented.
Hypothesis is a justified belief that is not known to be true.
Epistemology study of nature of knowledge.
Metaknowldge knowledge about knowledge.
13.11.2017 3
Artificial Intelligence

Knowledge Representation
Now, we can package specialized knowledge and sell it with a system that
can use it to reason and draw conclusions.
Knowledge alone cannot serve the purpose, we need to include
understanding, learning, thinking, remembering & reasoning.
Knowledge based systems get their power from expert knowledge that has
been coded into facts, rules, heuristics and procedures.
Knowledge is stored in a knowledge base separate from the control and
inferencing components , this makes it possible to add new knowledge or
refine existing knowledge without recompiling the control and inferencing
programs.
This simplifies the construction and maintenance of knowledge-based
systems.
Input/output - Inference control Unit Knowledge Base
13.11.2017 4
Artificial Intelligence

Knowledge Representation
Some mathematical ways of representing the representing sentences
Spot is a dog. dog(spot)
All dogs have tails. Vx : dog(x) hastail(x)
Then using the deduction method of logic, we may generate they new
representation object : has(tail)
So we can , using backward mapping function : Spot has a tail.

13.11.2017 5
Artificial Intelligence

Knowledge Representation
Approaches to Knowledge representation
A good system for the representation of knowledge in a particular domain
should possess the following properties :
Representational Adequacy the ability to represent all of the kinds of
knowledge that are needed in that domain
Inferential Adequacy The ability to manipulate the
representational structures in such a way as to derive new structures
corresponding to new knowledge inferred from old.
Inferential Efficiency The ability to incorporate into the
knowledge structure additional information that can be used to focus
the attention of the inference mechanisms in the most promising
direction.
Acquisitional Efficiency - Acquiring new information easily
13.11.2017 6
Artificial Intelligence

Knowledge Representation
Simple Relational Knowledge

Player Height Weight Runs


Dhoni 6-0 150 3000
Sachin 5-4 140 15000
Zaheer 6-2 160 1000

This even does not tell us that who is the heaviest player?

A procedure should be defined to figure out the result.

13.11.2017 7
Artificial Intelligence

Knowledge Representation
Inheritable Knowledge
It is possible to enhance the basic representation with inference
mechanism that operate on the structure of the representation.
The most useful form of inference is Property Inheritance, in which
elements of specific classes inherit attributes and values from ore general
classes in which they are included.
In order to do this, objects must be organized into classes, classes must
be arranged into generalization hierarchy.
Cricketer
Isa : adult-Male
Bats : handed
Height ; 6-1 etc.

13.11.2017 Property Inheritance is what happens in Inheritable Knowledge 8


Artificial Intelligence

Knowledge Representation
Inferential Knowledge
Sometimes all the power of traditional logic is necessary to describe he
inferences that are needed.
We can represent inferential knowledge about a domain using first order
predicate-logic.
But all this knowledge is useless unless there is also an inference
procedure that can exploit it.
The required inference procedure now is one that implements the
standard logical rules of inference.
There are many procedures, some of which reason forward from given
facts to conclusions, some reason backward from desired conclusions to
given facts. One most common procedure is RESOLUTION, which uses
contradiction strategy.

13.11.2017 9
Artificial Intelligence

Knowledge Representation
Procedural Knowledge
The previous forms deal with Static, Declarative facts. This knowledge
specifies what to do and when.
This knowledge can be represented in programs in many ways. The
most common way is simply as code for doing something.
The machine uses the knowledge when it executes the code to perform a
task.
Eg : If then else etc.

13.11.2017 10
Artificial Intelligence

Knowledge Representation
Issues in Knowledge Representation
Are any attributes of objects so basic that they occur in almost every
problem domain? If there are, we need to make sure that they are handled
appropriately in each of the mechanisms we propose. If such attributes
exist, what are they ?
Are there any important relationships that exist among attributes of
objects?
At what level should knowledge be represented? Is there a good set of
primitives into which all knowledge can be broken down? Is it helpful to
use such primitives?
How should set of objects be represented?
Given a large amount of knowledge stored in a database, how can
relevant parts be accessed whey they are needed?

13.11.2017 11
Artificial Intelligence

Knowledge Representation
Important Attributes
instance and isa
Relationship among attributes
Inverses
Existence in an isa hierarchy
Techniques for reasoning about values
Single-values attributes

13.11.2017 12
Artificial Intelligence

Knowledge Representation
Resolution
Goes from conclusions to the given facts.
It gains its efficiency from the fact that it operates on statements that
have been converted to a very convenient standard form.
To prove a statement, resolution attempts to show that the negation of
the statement produces a contradiction with the known statements ( i.e.
that it is unsatisfiable.)

13.11.2017 13
Artificial Intelligence

Knowledge Representation
Natural Deduction
Another problem with the use of resolution is that people do not think
in resolution.
Computers are still poor at proving very hard things, hence we need a
practical standpoint. ( focus is on interaction)
To facilitate it we led to Natural Deduction.
It describes a blend of techniques, used in combination to solve
problems that are not traceable by any one method alone.
One common technique is to talk about objects involved in the predicate
and not the predicate itself.

13.11.2017 14
Artificial Intelligence

Knowledge Representation
Procedural v/s Declarative Knowledge
A Declarative representation is one in which knowledge is specified but
the use to which that knowledge is to be put in, is not given.
A Procedural representation is one in which the control information that
is necessary to use the knowledge is considered to be embedded in the
knowledge itself.
To use a procedural representation, we need to augment it with an
interpreter that follows the instructions given in the knowledge.
The difference between the declarative and the procedural views of
knowledge lies in where control information resides.

13.11.2017 15
Artificial Intelligence

Knowledge Representation
Procedural v/s Declarative Knowledge
Consider the example
man(Marcus)
man (Ceaser)
Person(Cleopatra)
Vx : man(x) person(x)
Now we want to extract from this knowledge base the ans to the
question :
y : person (y)
Marcus, Ceaser and Cleopatra can be the answers

13.11.2017 16
Artificial Intelligence

Knowledge Representation
Logic Programming
Logic programming is a programming language paradigm in which
logical assertions are viewed as programs, e.g : PROLOG
A PROLOG program is described as a series of logical assertions, each
of which is a Horn Clause.
A Horn Clause is a clause that has at most one positive literal.
Eg p, p V q etc are also Horn Clauses.
Fig 6.1
The fact that PROLOG programs are composed only of Horn Clauses
and not of arbitrary logical expressions has two important consequences.
Because of uniform representation a simple & effective interpreter
can be written.
The logic of Horn Clause systems is decidable.
13.11.2017 17
Artificial Intelligence

Knowledge Representation
Logic Programming
Even PROLOG works on backward reasoning.
The program is read top to bottom, left to right and search is performed
depth-first with backtracking.
There are some syntactic difference between the logic and the PROLOG
representations as mentioned in Fig 6.1
The key difference between the logic & PROLOG representation is that
PROLOG interpreter has a fixed control strategy, so assertions in the
PROLOG program define a particular search path to answer any question.
Where as Logical assertions define set of answers that they justify,
there can be more than one answers, it can be forward or backward
tracking .

13.11.2017 18
Artificial Intelligence

Knowledge Representation
Logic Programming
Control Strategy for PROLOG states that we begin with a problem
statement, which is viewed as a goal to be proved.
Look for the assertions that can prove the goal.
To decide whether a fact or a rule can be applied to the current problem,
invoke a standard unification procedure.
Reason backward from that goal until a path is found that terminates
with assertions in the program.
Consider paths using a depth-first search strategy and use backtracking.
Propagate to the answer by satisfying the conditions.

13.11.2017 19

You might also like