AI-KRR-Introduction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 85

Artificial Intelligence:

Knowledge Representation and Reasoning

Introduction

Deepak Khemani
Department of Computer Science & Engineering
IIT Madras
We know….
"You will not apply my precept," he said, shaking his head. "How often have
I said to you that when you have eliminated the impossible, whatever
remains, however improbable, must be the truth?

We know that he did not come through the door, the window, or the
chimney. We also know that he could not have been concealed in the
room, as there is no concealment possible. When, then, did he come?”

- Sherlock Holmes in The Sign of the Four (by, Arthur Conan Doyle, ch. 6,
(1890)

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Intelligent Agents
Persistent
Autonomous
Proactive
Goal Directed

An intelligent agent in a world carries a model of the world in its “head”.


The model maybe an abstraction. A self aware agent would model itself
in the world model.
(From A First Course in AI – Deepak Khemani)
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
On Knowing
There are several ways one can know something
• Empiricism: involves acquiring knowledge through observation and
experience.
• Seeing is believing? Mind the deep fake videos
• The scientific method: is a process of systematically collecting and evaluating
evidence to test ideas and answer questions.
• Intuition: Rather than examining facts or using rational thought, intuition
involves believing what feels true.
• Authority: Accepting ideas because some authority figure says that they are
true.
• “My teacher / mother said so”!
• Rationalism: involves using
logic and reasoning to acquire new knowledge.

https://opentext.wsu.edu/carriecuttler/chapter/methods-of-knowing/

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Reasoning = Making Inferences

If an agent knows something


what else can the agent know?

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Three Types of Inference
• Deduction: From a given set of facts infer another fact that is necessarily true
• From Cause to Effect
• Abduction: From a given set of facts infer another fact that is possibly true
• From Effect to Cause
• Induction: From a given sets of facts infer a new fact.
• Also known as generalization. Recognizing that a number of entities in the domain share
some common property, and assert that as a general statement
• The peepul leaf is green
• The tamarind leaf is green
• The neem leaf is green
• The mango leaf is green
• .
• .
• All leaves are green.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Deduction
“Beyond the obvious facts that he has at some time done manual
labour, that he takes snuff, that he is a Freemason, that he has been
in China, and that he has done a considerable amount of writing
lately, I can deduce nothing else.”
― Arthur Conan Doyle, The Red-Headed League - a Sherlock
Holmes Short Story

“Crime is common. Logic is rare. Therefore it is upon the logic rather


than upon the crime that you should dwell.”
— Arthur Conan Doyle, The Adventure of the Copper Beeches

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Abduction needs to be consistent
“The man might have died in a fit; but then the jewels are missing," mused
the Inspector, "Ha! I have a theory. These flashes come upon me at times...
What do you think of this, Holmes? Sholto was, on his own confession, with
his brother last night. The brother died in a fit, on which Sholto walked off
the treasure! How's that?”

"On which the dead man very considerately got up and locked the door on
the inside," said Holmes.”

― Arthur Conan Doyle, The Sign of Four

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Epistemic Logic
Epistemic logics deal with multiagent systems. It allows us to represent
statements about what an agent knows about what other agents know.

Doxastic logics talk about belief instead to knowledge.

Knowledge is about facts. Beliefs may be false.

• “My name is Sherlock Holmes. It is my business to know what other people


do not know.” — Arthur Conan Doyle, The Adventure of the Blue Carbuncle

• “What you do in this world is a matter of no consequence.


The question is what can you make people believe you have done.”
― Arthur Conan Doyle, A Study in Scarlet

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Induction: What is the next number in the series?
• 1, 2, 3, 4, ….. 5?

• 2, 4, 6, 8, … 10?

• 1, 1, 2, 3, 5, … 8?

• 1, 4, 9, 16, … 25?

• 0, 3, 8, 15, … 24?

• 0, 0, 0, 0, … 0?
But what if we are generating
the values from (N-1)(N-2)(N-3)(N-4)?

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


On a football field…

GC

You are a striker for


the blue team…

11

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


.. moving forward with the ball…

GC

12

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


.. moving forward with the ball…

GC

13

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


.. moving forward with the ball…

GC

14

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


… the defenders are closing in …

GC

15

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


What should you do?

GC

16

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Problem solving

An autonomous agent
in some world
has a goal to achieve
and
a set of actions to choose from
to strive for the goal
17

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


An intelligent agent would…

GC

18

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Pass the ball to a teammate who is free…

GC

19

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Pass the ball to a teammate who is free…

GC

20

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Pass the ball to a teammate who is free…

GC

21

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


… and has a better chance to score

GC

22

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


… and has a better chance to score

GC

23

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Abductive Inferences
If you are running with the ball in a football game you must be (a) aware of
where the other players are and (b) what they intend to do.

This inference of intention comes from background knowledge abut the


strategies and tactics used in the game – this knowledge comes from
training.

You should be able to imagine that “if you kick the ball to where your
teammate should be running to, then he would have a better shot at the
goal”.

The opponents no doubt are thinking about it too.


Why is the opposing team player running towards that spot?

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Inferences
Inference is the basic cognitive act for intelligent minds.

We are constantly making inferences.

In the The Myth of Artificial Intelligence author Erik Larson says that most of
the inferences we make as humans are abductive in nature.

Abduction is like guesswork, based on what we know about the world. Only,
some people make more informed guesses than others.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Expectations
Abductive inferences generate expectations

On a football field
- what is the goalkeeper expected to do
- what about your teammate
- what are the opposing team players likely to do

Garden path sentences


- The old man’s glasses…
…were filled with sherry

Jokes depend upon expectation violation

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


An ocean of possible inferences
Holmes and Watson are on a camping trip. In the middle of the night Holmes
wakes up and gives Dr. Watson a nudge. "Watson" he says, "look up in the
sky and tell me what you see.”
"I see millions of stars, Holmes," says Watson.
"And what do you conclude from that, Watson?”
Watson thinks for a moment. "Well," he says, "astronomically, it tells me that
there are millions of galaxies and potentially billions of planets.
Astrologically, I observe that Saturn is in Leo. Horologically, I deduce that the
time is approximately a quarter past three. Meterologically, I suspect that we
will have a beautiful day tomorrow. Theologically, I see that God is all-
powerful, and we are small and insignficant. Uh, what does it tell you,
Holmes?”
"Watson, you idiot! Someone has stolen our tent!”
― Thomas Cathcart, Daniel Klein

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


A short story From "Identification of Conceptualizations
underlying Natural Language" – Roger Schank

John meets Fred on the road. Fred has a knife. John is angry because
his wife Mary has yelled at him…

Fred : Hi
John : What are you doing with the knife?
Fred : Thought I'd teach the kids to play mumbly-peg.
John : I could use a knife right now.
Fred : What's the matter?
John : Damn Mary, always on my back. She'll be sorry.
Fred : I don't think a knife will help you.
John : You're just on her side. I think I ought to . . .

… at this point the listener has some expectations


28
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Expectations
Syntax a verb
Meaning a "conceptual structure" type and a filler for it
Context the conceptual structure predicts an "action". Context delimits
the range of possible actions, for example -
end relationship, hurt someone, go to some place, emote
Conversational people talk for a reason. To arouse sympathy, or to
inform about intent, etcetra…
World view of listener is John known to be a convicted murderer?
The expectation would be different from if he were
known to be an avowed pacifist.
Cultural norm What is accepted within a culture?

What kind of knowledge structures in memory


would generate such expectations?
29
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
A short story
John meets Fred on the road. Fred has a knife. John is angry because his wife
Mary has yelled at him…
Fred : Hi
John : What are you doing with the knife?
Fred : Thought I'd teach the kids to play mumbly-peg.
John : I could use a knife right now.
Fred : What's the matter?
John : Damn Mary, always on my back. She'll be sorry.
Fred : I don't think a knife will help you.
John : You're just on her side. I think I ought to . . .

One would be considerably surprised to hear


" I think I ought to go and eat some fish"

Jokes exploit such violation of expectation.


30
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Scientific Progress
Scientific progress
• begins with abduction (looking for causes)
• Why did the apple fall? Because gravity caused it
• and induction (making informed generalizations)
• Fermat’s Last Theorem
• Goldbach’s Conjecture
• Beal’s Conjecture

• and gets validated by deduction (making the implicit explicit)


• Proof of Fermat’s Last Theorem
• and experimental validation
• light is bent by gravity
• Only induction adds new knowledge

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


The real world is complex!
World Actions of other agents
Other events

Act Perceive

Goals
32

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Humankind is a problem solving species

Problem Solving This course


Companion course Knowledge Representation & Reasoning
Search Methods

First Knowledge
Principles

Ontology + Experience
Domain Semantics

Model Based Reasoning Memory Based Reasoning

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Artificial Intelligence & Machine Learning

• AI – symbolic knowledge representation and problem solving

• ML – making sense of data


• Data à Information
(big data, recomender systems, predictive analytics….)
• Data à Classification
(deep learning, images and language….)

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Human Cognitive Architecture
Signal processing

Neuro fuzzy reasoning


logic
neuro-fuzzy systems Symbolic reasoning
knowledge representation
ontology semantics
natural language understanding

Perception memory search


problem solving
planning
models

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Machine Intelligence & Data
Signal processing
image processing Neuro fuzzy reasoning

computer vision
speech recognition Symbolic reasoning
graphics
deep neural networks

machine learning robot control


Data
neural networks speech synthesis
pattern recognition
knowledge discovery

Millions of user eyeballs

Your favourite social media site


Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Image labeling
Image acquisition

Deep Neural Network

Symbols

tree
grass
sky

These algorithms are also


used for facial recognition by
governments around the world.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Animal–Like Abilities image processing
Signal processing

Neuro fuzzy
computer vision reasoning
“Everything ML does now, speech recognition
deep neural networks
graphics

humans do in the blink of an eye” machine learning robot control


neural networks speech synthesis
pattern recognition
• “Eagles and snakes have better vision systems” knowledge discovery

- Judea Pearl
• Cats have superior navigation abilities
• Dogs recognize and react to human speech
• African grey parrots can mimic human speech

Yet, none of these animals have


the cognitive abilities and the intelligence
typically attributed to humans.
Adnan Darwiche, Human-Level Intelligence or Animal-Like Abilities,
CACM, Vol. 61, No. 10, Oct 2018.
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Performance vs. Competence
Now suppose a person tells us that a particular photo shows
people playing Frisbee in the park. We naturally assume that
this person can answer questions like What is the shape of a
Frisbee? Roughly how far can a person throw a Frisbee? Can
a person eat a Frisbee? …

Computers that can label images like “people playing Frisbee


in a park” have no chance of answering those questions…

…they have no idea what a person is, that parks are


usually outside, that people have ages, that weather is
anything more than how it makes a photo look, etc.
Rodney Brook, The Seven Deadly Sins of AI Predictions.
MIT Technology Review
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Suitcase Words
Marvin Minsky called words that carry a variety of meanings
“suitcase words.” “Learning” is a powerful suitcase word; it can
refer to so many different types of experience…

When people hear that machine learning is making great strides


in some new domain, they tend to use as a mental model the
way in which a person would learn that new domain. However,
machine learning is very brittle, and it requires lots of
preparation by human researchers or engineers, special-
purpose coding, special-purpose sets of training data, and a
custom learning structure for each new problem domain.

Rodney Brook, The Seven Deadly Sins of AI Predictions.


MIT Technology Review
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Alan Turing’s Imitation Game
Alan Turing (1912 – 1954)
• The question whether machines can think
is itself “too meaningless”
http://en.wikipedia.org/wiki/Alan_Turing
• Prescribed a test which he called the Imitation Game which is
now known as The Turing Test
• Turing, A.M. (1950). Computing machinery and intelligence. Mind, 59, 433-
460. http://www.loebner.net/Prizef/TuringArticle.html

Human Machine

or?
Human Judge Human Judge

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Conversations with machines
Given the advances in web data processing, corpus
based natural language processing,
and clever distracting techniques - it has become
easy to build conversational chat bots that are
impressive but lack intelligence.

Hector J. Levesque has recently proposed a new


test.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Winograd Schemas – an alternate “Turing Test”
• Winograd schemas ask a pointed multiple choice question that
requires knowledge of the subject matter.
• For example, contexts where “give” can appear are statistically
quite similar to those where “receive” can appear, and yet the
answer must change depending on which one is used.
• This helps make the test Google-proof: having access to a large
corpus of English text would likely not help much.
• The claim is that doing better than guessing requires subjects to
figure out what is going on.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Winograd Schemas: Anaphora Resolution
• A Winograd Schema Challenge question consists of three parts:
• A sentence or brief discourse that contains the following:
• Two noun phrases of the same semantic class (male, female, inanimate, or
group of objects or people),
• An ambiguous pronoun that may refer to either of the above noun phrases, and
• A special word and alternate word, such that if the special word is replaced with
the alternate word, the natural resolution of the pronoun changes.
• A question asking the identity of the ambiguous pronoun, and
• Two answer choices corresponding to the noun phrases in question.
• A machine will be given the problem in a standardized form which
includes the answer choices, thus making it a binary decision
problem. https://en.wikipedia.org/wiki/Winograd_Schema_Challenge

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Winograd schema: Example 1
The first schema was given by Terry Winograd himself in 1972.
Such sentences are now named after him.

• The city councilmen refused the demonstrators a permit because


they feared violence.

• The city councilmen refused the demonstrators a permit because


they advocated violence.

Who does “they” refer to?


Answer 0: The demonstrators
Answer 1: The councilmen

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Winograd schema: Example 2 (IJCAI 2016 challenge)
• John took the water bottle out of the backpack so that it would be
lighter.

• John took the water bottle out of the backpack so that it would be
handy.

What does “it” refer to?

1. The backpack
2. The bottle

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Winograd schema: Example 3
• The trophy would not fit in the brown suitcase because it was
too small.
• The trophy would not fit in the brown suitcase because it was
too big.

What does “it” refer to?

1. The trophy
2. The suitcase

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Winograd schema: Example 4
• The lawyer asked the witness a question, but he was reluctant to
repeat it.
• The lawyer asked the witness a question, but he was reluctant to
answer it.

Who was reluctant?

1. The lawyer
2. The witness

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Representation

ontology

noun: ontology; plural noun: ontologies

1.1. the branch of metaphysics dealing with the nature of being.

2.2. a set of concepts and categories in a subject area or domain


that shows their properties and the relations between them.

Ontology: An explicit specification of a conceptualization.


(Gruber, 93)

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


The emergence of the mind
in philosophy
The European medieval world view
A Christian adaption of Greek ideas
Creator’s ideas
Platonic
Corruptible
materializations of God’s
Human ideas The World ideas

Our thoughts are true to the extent they are accurate copies of God’s ideas

Human ideas The World


Aristotelian
Our thoughts resemble the objects they stand for
Correspondence theory of truth
… Ludwig Wittgenstein: Picture Theory of Language
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Our world as we saw it
Sensible world composed
of 5 elements
• quintessence
• fire
• air heavier
Earth • water
• earth

Our Earth was flat and at the center


of the Universe, with the God’s
heaven rotating around it.
Jumbled up on Earth striving to
separate and go their rightful place

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Night & Day

Earth Earth

Earth Earth

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Geocentric model of the Universe
Astronomy was the most advanced
empirical science, and observations
like the motion of planets in the sky
was specially hard to explain with
the geocentric model.
Earth
“If God had consulted
me when creating the
universe, He would have
received good advice!”

King Alfonso X of Spain (1221 – 1284)


Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
What we see is not what really is…

It is the rotating Earth that creates the illusion of


the Sun, the moon and the stars moving in the sky.
(On the Revolutions of the Celestial Spheres)

Nicolaus Copernicus
Portrait, 1580, Toruń Old Town City Hall
Born19 February 1473
Toruń (Thorn), Royal Prussia,
Kingdom of Poland

Source: http://en.wikipedia.org/wiki/Nicolaus_Copernicus
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Reality
What is really out there?
What is the objective reality?
One thing is clear
Everything in the physical world is made up of a small
number of fundamental particles
(even though we don’t quite know yet what they are)
unless there is no matter at all (idealism)

The laws of physics that explain the behaviour of


these particles are sufficient to explain the behaviour
of ensembles of such particles
But…
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Complexity
A human adult is made up of about 1027 atoms

These 1027 atoms continuously interact with zillions


of surrounding atoms all the time
The air we breathe, the food we eat, the vibrations of air
molecules we sense as sound, and impinged upon by trillions of
photons (which have momentum but no mass).

Can we even hope to write down equations for these


and solve them?
And what would we get if we did solve them?
A prediction of their location and movement?
Remember there are 1027 of them
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
The World in our Minds

The world around us and including us operates according to and


can, in principle, be explained by the fundamental laws of physics.
Nothing else is needed.

But we the thinking creatures create our own worlds in our minds.
And it is only our own creation that is meaningful to us.

Idea embodied in movies: Matrix, Inception…

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Powers of Ten A Film by Charles and Ray Eames (1977) Source: Quarks to Quasars
http://www.powersof10.com/film http://www.wordwizz.com/pwrsof10.htm
100 yottameter – 1026 meters – The Visible Universe (about 10 billion light years across)
1 yottameter – 1024 meters – a cluster of galaxies (about 100 million light years across)
1 zettameter – 1021 meters – diameter of The Milky Way (about 100,000 light years across)
100 petameters – 1017 meters – the nearest stars (about 10 light years away)
10 terameters – 1013 meters – diameter of Solar system (11,826,600,000 km)
1 terameter – 1012 meters – distance from Saturn to Sun (1,429,000,000 km)
100 gigameters – 1011 meters – distance from Earth to Sun (149,600,000 km)
100 megameters – 108 meters – the diameter of Jupiter (139,822 km)
10 megameters – 107 meters – the diameter of Earth (12,756 km)
1 megameter – 106 meters – the distance from Chennai to Pune (1190 km)
100 kilometers – 105 meters – the distance from Mandi to Manali (110 km)
10 kilometers – 104 meters – the diameter of a small town
1 kilometer – 103 meters – longest span of the Golden Gate Bridge (1,280 m)
100 meters – 102 meters – a sprint track, a meadow, a pond, a skyscraper
10 meters – 101 meters – the width of a road, a small house, a tree
1 meter – 100 meters – a typical door, a table, the height of a child
10 centimeters – 10-1 meters – a sunbird, a typical mango, a cellphone
1 millimeter – 10-3 meters – a mustard seed
100 micrometers – 10-4 meters – pollen
10 micrometers – 10-5 meters – a bacterium
100 nanometers – 10-7 meters – a virus
1 nanometer – 10-9 meters – the structure of DNA
100 picometers – 10-10 meters – carbon’s outer shell – 1 Angstrom unit
1 picometer – 10-12 meters – the electron cloud – electromagnetism
10 femtometers – 10-14 meters – the carbon nucleus
1 femtometer – 10-15 meters – a proton
10 attometers – 10-17 meters – quarks and gluons
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Our Perceptible Universe
100 yottameter – 1026 meters – The Visible Universe (about 10 billion light years across)
1 yottameter – 1024 meters – a cluster of galaxies (about 100 million light years across)
1 zettameter – 1021 meters – diameter of The Milky Way (about 100,000 light years across)
100 petameters – 1017 meters – the nearest stars (about 10 light years away)
10 terameters – 1013 meters – diameter of Solar system (11,826,600,000 km)
1 terameter – 1012 meters – distance from Saturn to Sun (1,429,000,000 km)
100 gigameters – 1011 meters – distance from Earth to Sun (149,600,000 km)
100 megameters – 108 meters – the diameter of Jupiter (139,822 km)
10 megameters – 107 meters – Scientific
the diameter of Earth (12,756
progress enables km)
us to extend
1 megameter – 10 meters – the distance from Chennai to Pune (1190 km)
6
100 kilometers – 105 meters – our concepts
the distance fromto Mandi
different scales
to Manali (110 km)
10 kilometers – 10 meters – the diameter of a small town
4
1 kilometer – 103 meters – longest span of the Golden Gate Bridge (1,280 m)
100 meters – 102 meters – a sprint track, a meadow, a pond, a skyscraper
10 meters – 101 meters – the width of a road, a small house, a tree
1 meter – 100 meters – a typical door, a table, the height of a child
10 centimeters – 10-1 meters – a sunbird, a typical mango, a cellphone
1 millimeter – 10-3 meters – a mustard seed
100 micrometers – 10-4 meters – pollen
10 micrometers – 10-5 meters – a bacterium
100 nanometers – 10-7 meters – a virus
1 nanometer – 10-9 meters – Scientific progress
the structure of DNA enables us to extend
100 picometers – 10-10 meters –our carbon’s outer shell
concepts – 1 Angstrom
to different scalesunit
1 picometer – 10-12 meters – the electron cloud – electromagnetism
10 femtometers – 10-14 meters – the carbon nucleus
1 femtometer – 10-15 meters – a proton
10 attometers – 10-17 meters – quarks and gluons
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Domains of Study: Each has its own vocabulary
100 yottameter – 1026 meters – The Visible Universe (about 10 billion light years across)
1 yottameter – 1024 meters – a cluster of Cosmology
galaxies (about 100 million light years across)
1 zettameter – 10 meters – diameter of The Milky Way (about 100,000 light years across)
21
100 petameters – 1017 meters – the nearest stars (about 10 light years away)
10 terameters – 1013 meters – diameter of Solar systemAstronomy
(11,826,600,000 km)
1 terameter – 10 meters – distance from Saturn to Sun (1,429,000,000 km)
12
Astrophysics
100 gigameters – 1011 meters – distance from Earth to Sun (149,600,000 km)
100 megameters – 10 meters – the diameter of Jupiter (139,822
8
10 megameters – 10 meters – the diameter of Earth (12,756 km)
7 Newtonian
km) physics
1 megameter – 106 meters – the distance from Chennai to Pune (1190 km)
Geography
100 kilometers – 105 meters – the distance from Mandi to Manali (110 km)
10 kilometers – 10 meters – the diameter of a smallGeology
4 town Sociology
1 kilometer – 10 meters Economics
3 – longest span of the Golden Gate Bridge (1,280 m)
100 meters – 10 meters – a sprint track, a meadow, a pond, a skyscraper
2
10 meters – 101 meters – the width of a road, a small house, a tree
1 meter – 100Psychology
meters – a typical door, Newtonian
a table, the heightphysics
of a child
10 centimeters – 10 meters – a sunbird, a typical mango, a cellphone
-1
1 millimeter – 10-3 meters – a mustard seed Physiology
100 micrometers – 10-4 meters – pollenBiology
10 micrometers – 10 meters – a bacterium
-5
100 nanometers – 10-7 meters – a virus Cellular biology
1 nanometer – 10-9 meters – the structure of DNA
100 picometers – 10-10 meters – carbon’s outer shell – 1 Angstrom Chemistry
1 picometer – 10-12 meters – the electron cloud – electromagnetism
unit
10 femtometers – 10-14 meters – the carbon nucleus
Sub-atomic physics
1 femtometer – 10-15 meters – a proton
10 attometers – 10-17 meters – quarks and gluons
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Downward Causality: How thought controls action
1 kilometer – 103 meters – longest span of the Golden Gate Bridge (1,280 m)
100 meters – 1021 meters – a sprint track, a meadow, a pond, a skyscraper
10 meters – 100 meters – the width of a road, a small house, a tree
1 meter – 10-1 meters – a typical door, a table, the height of a child
10 centimeters – 10-3 meters – a sunbird, a typical mango, a cellphone
1 millimeter – 10-4 meters – a mustard seed
100 micrometers – 10-5 meters – pollen
10 micrometers – 10-7 meters – a bacterium
100 nanometers – 10-9 meters – a virus
1 nanometer – 10-10meters – the structure of DNA
100 picometers – 10-12 meters – carbon’s outer shell – 1 Angstrom unit
1 picometer – 10-14 meters – the electron cloud – electromagnetism and gravity
10 femtometers – 10-15 meters – the carbon nucleus
1 femtometer – 10-17 meters – a proton
10 attometers – 10 meters – quarks and gluons

We operate with concepts at our perceptible


level. Our thoughts at this level cause the lower
level activity that results in our actions
Douglas Hofstadter in “I am a Strange Loop”
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Epiphenomenon in computers
Computers are man made objects. We know how they operate. At the very core
the computer does only bit level operations.

Everything else is built upon that, and everything can be explained by that.

But how does a lay user see the machine? A music player, a web browser, a video
player, a word processor, a keeper of facts, an accounting spreadsheet.

In other words a Universal Machine (a machine that can imitate


any other machine). Can this machine become intelligent?

Yes, if it can introspect and examine itself


and has access to an endless possible set of concepts
– Douglas Hofstadter in I am a Strange Loop.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


The Domains for Reasoning
While the real world that we want to reason about is indeed made up of
collections of fundamental particles,
those fundamental particles, whatever they are,
cannot be the elements of the domain
that we use for representation and reasoning.
This is simply because there are far too many of them,
even to describe a grain of rice.

Instead, depending upon the focus of study,


one can represent atoms, or molecules, or biological cells,
or animal organs, or living creatures,
or societies of living creatures.

Every domain of study defines it own ontology.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


The Choice of Predicates
• The logic community is focused on proofs
• On Soundness, Completeness, Consistency and Decidability
• Logicians work with arbitrary predicates
• They invent predicate names as and when needed
• Usually some word from the English, or any other natural language
• But natural languages are rich
• The same thing can be said in many ways
• Loves(a, b), Adores(a,b), DotesOn(a,b), InLoveWith(a,b)…
• Choosing predicates arbitrarily necessitates adding rules which work
on the predicates
• An explosion in the number of rules!
• And in the complexity of theorem proving algorithms

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Choosing predicates
• The domain D of first order logic is a set of individuals
• The predicates of FOL capture
• relations between individuals. For example, Friend(sumedha, shreya)
• categories or concepts. For example, Man(socrates)
• relations between categories. For example, ∀x (Deer(x) ⊃ Mammal(x))
• relations between named relations. For example, ∀x,y (Brother(x, y) ⊃ Sibling(x, y)
• Inferences involve traversing from the known to the unknown
• Rules of inference facilitate this traversal
• The more the number of predicates the more the rules
• What should be the set of predicates in a domain?
• to make the representation compact and canonical
• to avoid a tsunami of rules and inferences
• English verbs and and adjectives are far too many!

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Closed Worlds and Open Worlds
Do we know the world completely? Or is our knowledge incomplete?

The closed world assumption says that


what you know is all there is to know about the world.
This implies that if you do not know something, it is false.

The open world assumption says we have


only partial knowledge of the world around us.
This implies that the conclusions we make now
may have to be withdrawn
when more facts come to light.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Domain: A set of Individuals
• From the perspective of logic the domain is a set of individuals and
predicates define relations between the individuals
• From the perspective of knowledge representation the question is what
should those individuals in the domain be?
• We cannot represent the physical world as seen by physics
• that is made of of some fundamental particles
• We need to represent concepts in our cognitive models
• A person, for example, Socrates.
• But if Socrates is an individual in the domain
what about the right hand of Socrates?
• Is the right hand another individual? What about his index finger?

• What about concepts like water, air, and sky?

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Aggregation and Reification
• The individuals in our cognitive models are not the individual elements in
the domain – which are the elementary particles
• Instead we invent our own concepts in our heads
• people, trees, dogs, nations, organizations, football teams, governments, rivers,
parks, shopping malls, shops, cars, trains, bicycles, cakes, bread, cities, galaxies,
protein molecules.
• we also think of concepts like length and colour.
• these are all abstract or reified composites that we think of as individuals.
• when we say “the rose is red” we mean an individual rose
• but when we say “violets are blue” we mean categories
• we also think of time, events, actions
• We also think of entities like air, water, and sky
• but it is not clear whether they are individuals
• or even categories
• What does a “glass of water” represent?

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Hierarchies of Structured Knowledge

Abstraction: is-A

rl d
w o
e d
g i n d
a o rl
e im l w
Th rea
e
Th Aggregation: is-part-of

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


A team of bridge players Bridge-Team
Pair1
Pair2
Pair3

Human Bridge-Pair
Player1 (Blue_Team
Player2 (Belladonna-Avarelli)
Bridge-Player (Garozzo-Forquet)
(Pabis-Ticci-D'Alelio))
Sportperson
Computer-Bridge-Player
(Pair1-Blue-Team
(Belladonna-Avarelli))
Human-Bridge-Player
(Pair2-Blue-Team
(Garozzo-Forquet ))
Giorgio Belladonna
(Pair3-Blue-Team
Walter Avarelli (Pabis-Ticci-D'Alelio))
Benito Garozzo
Pietro Forquet
Camillo Pabis-Ticci
Massimo D'Alelio
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Beyond categories and concepts
The language of logic is concerned with sentences.

A sentence is something that is either true or false (whether we know the


truth value or not). For example,
• Roses are red, and violets are blue.
• A blade of grass contains information of the entire world.
• A butterfly flapping its wings in Brazil can cause a storm in Texas.

But knowledge about the world goes beyond simple sentences.

Complex organisms can be described only


by collecting a large number of sentences
and organizing them into meaningful structures.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Situational Knowledge
Consider the following observation:
“Anisa walked into the bookstore”
• That is a fact that you know. What can you infer from this?
• If you know about bookstores…
• Anisa will probably browse through the books
• Or look for a specific one
• Perhaps she will go to the counter and pay for it
• She may emerge with a book in hand
• If you know that Anisa is the sister of the owner
• Maybe she was just passing by and wanted to meet her.
• Maybe she is going to sit in for the owner for a while.
• Maybe she is also looking for a specific book.
• Maybe she had a gun and wanted to rob the store?
• If she lives in a country where it is common to carry guns.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Knowledge Structures
• How does one represent knowledge about bookstores?
• Or about restaurants, or about dental clinics?

• In some sense we collect and organize individual bits of facts about the
typical knowledge about these entities
• Aggregated representations
• Roger Schank called such structures Scripts
• Marvin Minsky called them Frames
• And gave rise to the idea of Object Oriented Programming Systems

• If you are blindfolded and touching something


how can you guess that it is an elephant?
• You have to know about elephants in the first place
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
Taxonomies
• One approach to representing knowledge would be to have a large pool of
sentences
• An algorithm for making inferences would search through the sentences to
make the right connections
• This would be at the cost of computational complexity
• Instead we tend to organize facts into taxonomies
• Taxonomies facilitate inheritance
• For example, mammals have two eyes
• Implies that cats have two eyes
• Taxonomies facilitate compactness
• We only need store a property in a super class
• And inherit it into a subclass
• Minsky’s frames led to OOPs

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


A quick tour
of
logic languages

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Propositional Logic
Which of the arguments are valid arguments?
• If the earth were spherical, it would cast curved shadows
on the moon. It casts curved shadows on the moon. So
it must be spherical.

• If he used good bait and the fish weren’t smarter than he


was, then he didn’t go hungry. But he used good bait and
he did go hungry, so the fish must have been smarter
than he was.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


First Order Logic
One of Tinker, Tailor, Soldier, or Spy is the culprit. The culprit stole
the document. Tinker and Soldier did not steal the document. If
Tailor or Spy is the culprit, then the document must be in Paris.
Given the above facts show that the following sentence is true
"The document is in Paris.”

Notion of variables and quantifiers over variables


Timeless, changeless, a logic of relations
between elements of sets

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Description Logics
A progressive high tech company is one with at least five women on
its board of directors and one in which all the employees have
technical degrees where the minimum salary is 100000.
A tech company is one all whose employees have technical degrees.

A progressive high tech company is a tech company.

A family of logics of noun phrases


The formal basis of ontologies

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Default Reasoning

If Tweety is a bird then one can conclude that Tweety can fly,

because even though there exist birds, for example the


ostrich, that cannot fly, in general most birds fly.

In the real world an intelligent agent has to make


inferences even with incomplete information. In such a
scenario one has to make use of what is generally true
in a typical scenario.

New information may contradict and defeat


the default conclusion.
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
The Event Calculus

Jogesh made a cup of tea and left it on the table.


Meanwhile Smita saw the cup of tea and drank it.
When Jogesh came back he saw that the cup was
empty.

Reasoning about time, action, and change.

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Epistemic reasoning

Jogesh made a cup of tea and left it on the table. Meanwhile Smita
saw the cup of tea and drank it. When Jogesh came back he saw that
the cup was empty.

He concluded that Smita had polished off his cup of tea.


Smita knew that Jogesh knew that she drank the tea.

Knowledge and belief of agents

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Syllabus
Logic and Languages
Soundness and Completeness
Propositional Logic
Tableau Method
Direct Proof Representation
First Order Logic Reification CD Theory
Frames and Scripts
Forward Chaining Rete Net Taxonomies
Backward Chaining Inheritance

Logic Programming Resolution Refutation Description Logics


RDF and OWL
Prolog
Default Reasoning
Circumscription
Event Calculus
Epistemic Logic

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning


Text books and references
Text Books
1. Ronald J. Brachman, Hector J. Levesque: Knowledge Representation and
Reasoning, Morgan Kaufmann, 2004.
2. Deepak Khemani. A First Course in Artificial Intelligence, McGraw Hill Education
(India), 2013.
Reference Books
1. Schank, Roger C., Robert P. Abelson: Scripts, Plans, Goals, and Understanding: An
Inquiry into Human Knowledge Structures. Hillsdale, NJ: Lawrence Erlbaum, 1977.
2. R. C. Schank and C. K. Riesbeck: Inside Computer Understanding: Five Programs
Plus Miniatures, Lawrence Erlbaum, 1981.
3. Murray Shanahan: A Circumscriptive Calculus of Events. Artif. Intell. 77(2), pp. 249-
284, 1995.
4. Grigoris Antoniou and Frank van Harmelen, A Semantic Web Primer, 2nd Ed, MIT
Press, 2008.
5. John F. Sowa: Conceptual Structures: Information Processing in Mind and Machine,
Addison–Wesley Publishing Company, Reading Massachusetts, 1984.
6. John F. Sowa: Knowledge Representation: Logical, Philosophical, and
Computational Foundations, Brooks/Cole, Thomson Learning, 2000.
Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning
We begin with the relation between

Symbols and Thought

Deepak Khemani Artificial Intelligence: Knowledge Representation and Reasoning

You might also like