Knowledge Representation - Computing

wonderfuldistinctAI and Robotics

Oct 16, 2013 (4 years and 8 months ago)


Knowledge Representation

The Edwin Smith papyrus


Instructions for treating a fracture of the cheekbone.


If you examine a man with a fracture of the cheekbone, you will
find a salient and red fluxion, bordering the wound.

Diagnosis and prognosis:

Then you will tell your patient: "A fracture of the cheekbone. It is
an injury that I will cure."


You shall tend him with fresh meat the first day. The treatment
shall last until the fluxion resorbs.

Next you shall treat him with raspberry, honey, and bandages to
be renewed each day, until he is cured.

Searle’s Chinese Room

Monolingual English speaker locked in a room,


a large batch of Chinese writing

a second batch of Chinese script

a set of rules in English for correlating the second batch with the first batch.

A third batch of Chinese symbols and more instructions in English enable you "to
correlate elements of this third batch with elements of the first two batches" and instruct
you, thereby, "to give back certain sorts of Chinese symbols with certain sorts of shapes in

Those giving you the symbols call

the first batch 'a script' [a data structure with natural language processing applications],

the second batch 'a story',

the third batch 'questions';

the symbols you give back the ‘answers to the questions’

the set of rules in English ‘the program‘

Can you be considered to understand Chinese ?

Approaches to Artificial Intelligence

Cognitive Scientists

think AI is the only serious way of finding out

how humans work


want computers to do very smart things, quite independently of how
humans work

Strong AI

Want to build machines with human
like intelligence

Weak AI

Want to build machines that exhibit intelligent like behaviour but
believe machines will always be intellectually inferior to humans

Computer as a metaphor for the mind has been the dominant
approach for the last 60 years

Weak Vs. Strong AI

Philosopher John


like Cognitive Science above

(I.e. about people)

uses machine representations and hypotheses to mimic human
mental function on a computer , but never ascribes those
mental properties to the machine.


claim that machines programmed with the appropriate
behaviour, are having the same mental states as people would
who have the same behaviour

i.e. that machines can have MENTAL STATES.

What is Artificial Intelligence ?

Make machines behave as they do in the movies!

About the emulation of human behaviour

Make machines do things that would require intelligence if
done by humans

, M.A. (1977). Artificial Intelligence and Natural Man. Basic
Books, New York

Concerned with programming computers to perform tasks
presently done better by humans because they involve higher
mental processes such as perceptual learning, memory
organisation and judgemental reasoning

, M.L. and Papert, S.A. (1969). Perceptrons. MIT Press,
Cambridge, MA.

What is Artificial Intelligence ?

Agreement that it is concerned with two things

Studying human thought processes

Representing these processes via machines



Artificial Intelligence is behaviour by a machine which if
performed by a human would be considered intelligent

“Artificial Intelligence is the study of how to make
computers do things at which, at the moment, people are


Artificial Intelligence
, McGraw
Hill, 1983, p. 1

What are humans better at ?

Playing Games

Solving Puzzles

Common Sense Reasoning

Expert Reasoning

Understanding Language









Computer Science


How does a human mind work ?

Can non
humans have minds ?

In terms of computing philosophy

Accept the idea that machines can do anything

Oppose this

machines incapable of sophisticated behaviour e.g.
love, creativity

OK in philosophy

How about in engineering/science terms ?


What does intelligence mean ?

Dictionary definition

Someone’s ability to understand and learn things

Intelligence is the ability to think and understand instead of
doing things by instinct or automatically

(Collins English Dictionary)



=> possessed by humans


=> some flexibility, does not specify someone


what is thinking ?


Activity of using your brain to consider a problem or create an
idea (Collins)

=> have to have a brain

Organ that allows learning and understanding

Is it possible for machines to achieve this ?

Can machines think ?

Why build intelligent machines?

Cheaper to build and maintain

Offer new possibilities

Better solutions to problems

Software relatively cheap to develop

Software can be changed easily

Why is AI relevant to us ?

Ai is concerned with how

knowledge is acquired and used,

information is communicated,

collaboration is achieved,

how problems are solved,

languages are developed, etc.

History of AI (Classical Period or Dark Ages)

mid 1940’s

mid 1950’s

Game Playing & Theorem Proving

State Space Searching

Alan Turing

McCulloch & Pitts

Von Neumann


the concept of a universal

Mathematical Tool equivalent to Digital Computer

Takes input and computes output via a Finite State

Must construct a different machine for each computation


Enigma Machine

Wrote the first program capable of playing a complete
chess game;

Reflections on intelligence:

thought without

there mind without communication?

language without

there intelligence without

i.e. can machines think?


Invented a game ‘Turning Imitation Game’

Can machines pass a behaviour test for intelligence

the intelligent behaviour of a computer as
to achieve the human
level performance in

Predicted that by 2000
computer could
be programmed
to have a conversation with a human interrogator for
and would have a 30 per cent chance of
deceiving the interrogator
that it
was a

The Turing Test

Computer passes the test if interrogators cannot distinguish the machine from a
human on the basis of the answers to their questions.

Original Game:

First phase

Interrogator, a man and a woman are each placed in separate rooms and can communicate only via a
neutral medium such as a remote terminal.

Interrogator’s objective is to work out who is the man and who is the woman by questioning them.

Man should attempt to deceive the interrogator that he is the woman, while the woman has to
convince the interrogator that she is the woman.

Second phase

Man is replaced by a computer programmed to deceive the interrogator as the man did.

Programmed to make mistakes and provide fuzzy answers in the way a human would.

If the computer can fool the interrogator as often as the man did, we may say this computer has
passed the intelligent behaviour test.

Interrogator does not see, touch or hear the computer and is therefore not
influenced by its appearance or voice

Annually The Lobner Prize

McCulloch & Pitts

Proposed model
of artificial neural networks in which
each neuron was postulated
as being
in binary state, that
is, in either on or off

that their neural network model was, in
fact, equivalent
to the Turing machine, and proved that any
function could
be computed by some
network of connected

McCulloch & Pitts

both theoretical and
experimental work
model the brain in the laboratory.

Experiments clearly demonstrated
that the binary model
of neurons was not correct

Von Neumann

Part of the Manhattan Project

for the
Electronic Numerical
Integrator and
Calculator (ENIAC) project at the University
of Pennsylvania

First general purpose computer

to design the Electronic Discrete Variable
(EDVAC), a stored program machine.

Binary rather than decimal

History of AI (Great Expectations)

(mid 50’s

late 60’s)

John McCarthy

Inventor of LISP


first complete knowledge
based system

Marvin Minsky

Focus on formal logic

Developed anti
logic outlook on knowledge representation and reasoning


McCulloch & Pitts

Continuing work on neural networks

Learning methods improved

Newell & Simon

General Problem Solver(GPS)

simulate human problem solving

Based on technique of means
end analysis

Choose and apply operators to achieve goal state

Focus on general problem solving, weak AI

History of AI (Great Expectations)

(mid 50’s

late 60’s)

Newell & Simon

Attempts to separate problem solving from data

Proposed that a problem to be solved could be defined in
terms of states.

ends analysis was used to determine a difference
between the current state and the desirable state or the goal
state of the problem, and to choose and apply operators to
reach the goal state.

If the goal state could not be immediately reached from the
current state, a new state closer to the goal would be
established and the procedure repeated until the goal state was

The set of operators determined the solution plan.

History of AI (Great Expectations)

(mid 50’s

late 60’s)

Newell & Simon

GPS failed to solve complicated problems.

based on
formal logic and therefore could
generate an infinite number of
possible operators
, which
is inherently inefficient.

amount of computer time
and memory
that GPS
required to solve real
world problems led to the project
being abandoned

History of AI (Reality Strikes)

(late 60’s

early 70’s)

AI researchers were developing general methods for
broad classes of problems

Programs contained little or no knowledge about
problem domain

Applied a search strategy by trying different combinations
of steps until right one found

Problems chosen too broad and too difficult

History of AI (Expert Systems)

(early 70’s

mid 80’s)

Realisation that problem domain must be restricted

Feigenbaum & Buchanan

DENDRAL program developed at Stanford to analyse chemicals

Incorporated knowledge of expert into program to perform at human
expert level

Shift from weak methods


knowledge acquisition



based expert system for the diagnosis of infectious

Rules reflected uncertainty

History of AI (Making Machines Learn)

(mid 80’s


Expert Systems require more than rules

Rebirth of neural networks

Technology assisted

Evolutionary computing

Learning by doing

Ongoing since 70s

Natural intelligence is product of evolution

Based on computational models of natural selection and genetics

Simulate populate, evaluate performance, generate new population

Concept introduced by John Holland in 1975

History of AI (Making Machines Learn)

(1980’s onwards)

Knowledge Engineering

Computing with Words

Handling Uncertainty

Improved computational power

Improved cognitive modelling

The ability to represent multiple experts


Topics in AI are much the same

Language now not so near the centre but it was at the
centre in the 70s

Roots now much further from logic and theorem proving

Neural nets and machine learning now more central

AI Approaches transitioned to main stream

What has AI achieved in real world ?

Robots in manufacturing

Diagnosis of illness: screen lab tests, diagnose blood
infections, identify tumors

Run airports: e.g. assign baggage gates, direct re

Reasonable machine translation

Search systems like Google

efficient information

Computer games

Deep Blue beat Kasparov in 1997

Key Lessons

Intelligence =

ability to learn and understand, to solve
problems and
to make

Goal of AI =
machines do
things that would
require intelligence if done by humans.

machine is thought intelligent if it can achieve human
level performance
in some
cognitive task.

build an intelligent machine, we have to
and use human expert knowledge in some
problem area.

Negnevitsky M 2005, Artificial Intelligence, A guide to
intelligent systems design, 2

Edition, Addison Welsey

Why Representation?

Humans need words (or symbols) to communicate

Mapping of words to things is only possible indirectly

Create concepts that refer to things

What is knowledge representation?

What is representation?

Representation refers to a symbol or thing which represents
(’refers to’, ’stands for’) something else.

When do we need to represent?

We need to represent a thing in the natural world when we
don’t have, for some reason, the possibility to use the original

Example: Planning ahead

how will our actions affect the
world, and how will we reach our goals?

The object of knowledge representation is to express the
problem in computer
understandable form

Aspects of KR


Possible (allowed) constructions

Each individual representation is often called a sentence.

For example: color(my_car, red), my_car(red), red(my_car), etc.


What does the representation mean (maps the sentences to the

For example:

color(my_car, red)


‘my car is red’, ‘paint my car red’, etc.


The interpreter

Decides what kind of conclusions can be drawn

For example: Modus ponens (P, P

Q, therefore Q)

defined syntax/semantics

Knowledge representation languages should have precise
syntax and semantics.

You must know exactly what an expression means in
terms of objects in the real world.


of facts in the world



Real World

Map to

KR language

Map back to

real world


Real World

Declarative vs. Procedural

Declarative knowledge (facts about the world)

A set of declarations or statements.

All facts stated in a knowledge base fall into this category of

In a sense, declarative knowledge tells us what a problem (or
problem domain) is all about

Procedural knowledge (how something is done)

Something that is not stated but which provides a mean of
dynamically (usually at run
time) arriving at new facts.

Declarative example

Information about items in a store

cheaper(coca_cola, pepsi)

tastier(coca_cola, pepsi)

if (cheaper(x,y) && (tastier(x,y) )


Procedural example

Shopping script:

Make a list of all items to buy

Walk to the shop

For each item on the list, get the item and add it to the
shopping basket

Walk to the checkout counter

Pack the items


Walk home

Types of knowledge

Domain knowledge:

What we reason about

Structural knowledge

Organization of concepts

Relational knowledge

How concepts relate

Strategic knowledge:

How we reason

At representation level
, rather than at implementation level

(e.g. at implementation level

control knowledge, for resolving
conflicting situations)

What is a Knowledge Representation?

“What is a Knowledge Representation?”

(Davis, Shrobe &Szolovits) AI Magazine, 14(1):17
33, 1993

Defines the five roles the knowledge representation plays

Each role defines characteristics a KR should have

These roles provide a framework for comparison and
evaluating KRs

Role I: A KR is a Surrogate

A KR is used to model objects in the world.

Substitute for direct interaction with the world.

Cannot possibly represent everything in the world, a KR must
necessarily focus on certain objects and properties while
ignoring others.

As a result only objects and properties that are relevant to reasoning
are modeled.


Representation is not perfect

will have errors (at least by omission) and we may even introduce
new artifacts which not present

At least some unsound reasoning will occur

Role I: A KR is a Surrogate

The only complete accurate representation of an object is
the object itself.

All other representations are inaccurate.

Role II: A KR is a set of

Ontological Commitments

All representations are approximations to reality and they
are invariably imperfect.

we need to focus on only some parts of the
world, and ignore the others.

Ontological commitments

determine what part of
the world we need to look at, and how to view it.

Role II: A KR is a set of

Ontological Commitments

The ontological commitments are accumulated in layers:

First layer

representation technologies.

For example, logic or semantic networks (entities and relations) vs.
frames (prototypes)

Second layer

how will we model the world.

Example from a frame
based system:

“The KB underlying INTERNIST system is composed of two basic types of
elements: disease entities and manifestations […] It also contains a hierarchy of
disease categories organised primarily around the concept of organ systems
having at the top level such categories as ’liver disease’, ’kidney disease’, etc”

Commits to model prototypical diseases which will be organised in a taxonomy
by organ failure

Third layer (conceptual)

which objects will be modelled.

What is considered a disease (abnormal state requiring cure), e.g.
alcoholism, chronic fatigue syndrome?

Role III : A KR is a Fragmentary

Theory of Intelligent Reasoning

“What is intelligent reasoning?”

The views of intelligence normally come from fields outside of
AI: mathematics, psychology, biology, statistics and economics.


the representation typically incorporates only part of the
insight or belief that motivated it

that insight or belief is in turn only a part of the complex and
faceted phenomenon of intelligent reasoning.

Role III : A KR is a Fragmentary

Theory of Intelligent Reasoning

There are three components:

the representation's fundamental conception of intelligent

(What does it mean to reason intelligently?)

the set of inferences the representation

(What can we infer from what we know?)

the set of inferences it

(What ought we to infer from what we know?)

Role IV: A KR is a medium for

efficient computation

The knowledge representation should make
recommended inferences efficient.

The information should be organized in such a way to
facilitate making those inferences.

There is usually a tradeoff between

the power of expression (how much can be expressed and
reasoned about in a language) and

how computationally efficient the language is.

Role V: A KR is a medium of

human expression

A representation is a language in which we communicate.

How well does the representation function as a medium of

How general is it?

How precise?

Does it provide expressive adequacy?

How well does it function as a medium of

How easy is it for us to ‘talk’ or think in that language?

Consequences of this KR

The spirit should be indulged, not overcome

should be used only in ways that they are intended to be
used, that is the source of their power.

Representation and reasoning are

recommended method of inference is needed to make sense
of a set of facts.

Some researchers claim equivalence between KRs, i.e.
“frames are just a new syntax for first
order logic

However, such claims ignore the important ontological
commitments and computational properties of a

All five roles of a KR

Randall Davis, Howard Shrobe, Peter Szolovits MIT Lab

Requirements for KR languages

Representation adequacy

should to allow for representing all the required knowledge

Inferential adequacy

should allow inferring new knowledge

Inferential efficiency

inferences should be efficient

Clear syntax and semantics

unambiguous and well
defined syntax and semantics


easy to read and use

Some Knowledge Representation

Production systems, expert systems

Semantic networks


based reasoning

Biologically inspired approaches

neural networks

genetic algorithms