You are on page 1of 129

Short Trip to Artificial Intelligence

Lecturer Adrian Groza

Intelligent Systems Group


Department of Computer Science
Technical University of Cluj-Napoca

March 25, 2016


Short Trip Knowledge Representation and Reasoning

Warm-up
Short Trip Knowledge Representation and Reasoning

A Logician’s View of the World

Let’s start for the very beginning:


John loves Mary
Short Trip Knowledge Representation and Reasoning

A Logician’s View of the World

Let’s start for the very beginning:


John loves Mary
But let’s view it in a more graphical way:

Something important is missing


Short Trip Knowledge Representation and Reasoning

A Logician’s View of the World

Let’s start for the very beginning:


John loves Mary
Short Trip Knowledge Representation and Reasoning

And now we said too much!!!


Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Who said that Mary was wearing a skirt?
Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Who said that Mary was wearing a skirt?
And what does a heart to do with love?
Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Who said that Mary was wearing a skirt?
And what does a heart to do with love?
What we know is that:
Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Who said that Mary was wearing a skirt?
And what does a heart to do with love?
What we know is that:
There is something called John
Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Who said that Mary was wearing a skirt?
And what does a heart to do with love?
What we know is that:
There is something called John
There is something called Mary
Short Trip Knowledge Representation and Reasoning

And now we said too much!!!

Who said that John was a man?


Who said that Mary was wearing a skirt?
And what does a heart to do with love?
What we know is that:
There is something called John
There is something called Mary
There is something called Love going on between John
and Mary
Short Trip Knowledge Representation and Reasoning

Knowledge Representation and Reasoning


From cognitive psychology, human problem solving and learning are
processes that involve:
1 the representation and utilization of several types of knowledge

2 the combination of several reasoning methods: rule based reasoning,

causal reasoning, model based reasoning, contraints based reasoning


Short Trip Knowledge Representation and Reasoning

Outline

1 Short Trip
Semantic Web and Ontologies
Fuzzy expert systems
Reasoning with constraints
Knowledge acquisition
Case-based reasoning
Reasoning about knowledge
Model-based reasoning
2 Knowledge Representation and Reasoning
Reasoning
Logics
Knowledge engineering
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Web Vision


”The Semantic Web is not a separate Web
but an extension of the current one, in which
information is given well-defined meaning,
better enabling computers and people to
work in cooperation.” Tim Barners Lee

Semantic Web
Social Web
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Web Vision


”The Semantic Web is not a separate Web
but an extension of the current one, in which
information is given well-defined meaning,
better enabling computers and people to
work in cooperation.” Tim Barners Lee

Social Web

Semantic Web
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Search
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Search
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Search
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Search
Short Trip Knowledge Representation and Reasoning

Semantic Web and Ontologies

Semantic Search
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Rule-based systems

Definition (Expert system)


A computer system that emulates the decision making ability of
a human expert in a restricted domain.

The knowledge of the expert is represented as rules:


Example
If gross cost is greater or equals to 20.00 then add 10%
discount to the shopping cart
If the engine does not turn over and the lights do not come
on then the problem is battery or cables
If blood pressure is likely to be high then risk of heart
failure is high
a ⇒ b, b ⇒ c...
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Fuzzy Knowledge

Thinking humanly: ”The cognitive modeling approach.”


Cognitive techniques used in engineering: soft computing :
neural networks, genetic algorithm, fuzzy logic

FuzzyLogic
←→

Fuzzy knowledge can be expressed in a very natural way using


linguistic variables.
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Paradoxes?

The world is made up of opposites, for The world is filled with contradictions, that
example male versus female, hot versus almost everything contains some of its
cold, dry versus wet, active versus opposite, or in other words, that things can
passive. Everything has to be A or not-A, be A and not-A at the same time.
it can’t be both.
Law of noncontradiction: A ∧ ¬A 6= 0 Law of excluded middle: A ∨ ¬A 6= 1
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Fuzzy Versus Probability


Stochastics and Fuzzy Logic complement each other
A person suffering from hepatitis shows in 60% of all cases a strong fever, in
45% of all cases yellowish colored skin.

Example
A bottle of liquid has a probability of 0.5 of being rat poison
and 0.5 of being pure water.A second bottle’s contents, in the
fuzzy set of liquids containing lots of rat poison, is 0.5. 50%
probability means 50% chance that the water is clean. 50%
fuzzy membership means that the water has poison.

Remark
1 Probability deals with uncertainty, fuzzy logic deals with ambiguity and
vagueness.
2 Probability is only valid for future/unknown events; fuzzy set
membership continues after the event.
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Fuzzy Versus Probability


Stochastics and Fuzzy Logic complement each other
A person suffering from hepatitis shows in 60% of all cases a strong fever, in
45% of all cases yellowish colored skin.

Example
A bottle of liquid has a probability of 0.5 of being rat poison
and 0.5 of being pure water.A second bottle’s contents, in the
fuzzy set of liquids containing lots of rat poison, is 0.5. 50%
probability means 50% chance that the water is clean. 50%
fuzzy membership means that the water has poison.

Remark
1 Probability deals with uncertainty, fuzzy logic deals with ambiguity and
vagueness.
2 Probability is only valid for future/unknown events; fuzzy set
membership continues after the event.
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Fuzzy Versus Probability


Stochastics and Fuzzy Logic complement each other
A person suffering from hepatitis shows in 60% of all cases a strong fever, in
45% of all cases yellowish colored skin.

Example
A bottle of liquid has a probability of 0.5 of being rat poison
and 0.5 of being pure water.A second bottle’s contents, in the
fuzzy set of liquids containing lots of rat poison, is 0.5. 50%
probability means 50% chance that the water is clean. 50%
fuzzy membership means that the water has poison.

Remark
1 Probability deals with uncertainty, fuzzy logic deals with ambiguity and
vagueness.
2 Probability is only valid for future/unknown events; fuzzy set
membership continues after the event.
Short Trip Knowledge Representation and Reasoning

Fuzzy expert systems

Fuzzy Versus Probability


Stochastics and Fuzzy Logic complement each other
A person suffering from hepatitis shows in 60% of all cases a strong fever, in
45% of all cases yellowish colored skin.

Example
A bottle of liquid has a probability of 0.5 of being rat poison
and 0.5 of being pure water.A second bottle’s contents, in the
fuzzy set of liquids containing lots of rat poison, is 0.5. 50%
probability means 50% chance that the water is clean. 50%
fuzzy membership means that the water has poison.

Remark
1 Probability deals with uncertainty, fuzzy logic deals with ambiguity and
vagueness.
2 Probability is only valid for future/unknown events; fuzzy set
membership continues after the event.
Short Trip Knowledge Representation and Reasoning

Reasoning with constraints

Constraints everywhere...

Simplification Combination Contradiction Redundancy


Short Trip Knowledge Representation and Reasoning

Reasoning with constraints

Constraints everywhere...

Combination Contradiction Redundancy

Simplification
Short Trip Knowledge Representation and Reasoning

Reasoning with constraints

Constraints everywhere...

Contradiction Redundancy

Combination

Simplification
Short Trip Knowledge Representation and Reasoning

Reasoning with constraints

Constraints everywhere...

Redundancy

Combination Contradiction

Simplification
Short Trip Knowledge Representation and Reasoning

Reasoning with constraints

Constraints everywhere...

Combination Contradiction Redundancy

Simplification
Short Trip Knowledge Representation and Reasoning

Knowledge acquisition

Datamining
”Everything about you is being tracked - get over it.”

Trends leading to dataflood


1 More data is generated:
Business entities:
banks, telecom,
business transactions,
Scientific Data:
astronomy, biology,
physics, ...
Web 2.0: wikis, blogs,
forums, ...
2 More data is captured
Short Trip Knowledge Representation and Reasoning

Knowledge acquisition

Datamining

Definition
Extraction of interesting knowledge (rules, regularities patterns,
constraints ) from data in large datasets.

Example (Cern experiment)


15 million gigabytes of data annually most of the data is
uninteresting since it contains already known physics.
all the information about the detector is programmed into
several thousand computers or computing cluster who is the
only guy around with the complete knowledge about the
whole experiment since combine the knowledge of all the
scientists.
data mining challenge: collision between atomic nucleus will
occur 40 million times per second; potential interesting
collisions will occur around 1000 times per second.
Short Trip Knowledge Representation and Reasoning

Case-based reasoning

Case-based Reasoning

CBR uses specific past experiences to generate


knowledge
Form of problem solving by analogy in which a new
problem is solved by recognizing its similarity to a specific
known problem, then transferring the solution of the known
problem to the new one.

Example
Medicine: Find which diagnosis was made for
similar symptoms in the past, and adapt
treatment appropriately.
Law: Find what judgment was made for
similar cases in the past (’precedents’), and
adapt appropriately
Short Trip Knowledge Representation and Reasoning

Model-based reasoning

Model-based Checking

Motivation for automatically fault diagnosis

Actuator faults caused airplane to crash Sensor faults caused rollercoaster to


The Intel Pentium bug (1994)
http://www.planecrashinfo.com stop

The Intel Pentium bug (1994), was the ”disaster” that got
model checking on the map in the hardware industry
We examine the applications of computational tree logic to
verify the correctness of computer systems.
Short Trip Knowledge Representation and Reasoning

Outline

1 Short Trip
Semantic Web and Ontologies
Fuzzy expert systems
Reasoning with constraints
Knowledge acquisition
Case-based reasoning
Reasoning about knowledge
Model-based reasoning
2 Knowledge Representation and Reasoning
Reasoning
Logics
Knowledge engineering
Short Trip Knowledge Representation and Reasoning

Pyramid of knowledge

Wisdom ? Using knowledge in a b


way

Meta- danger ⇒ rule r1 is not applicable Rules about knowledge


knowledge
Knowledge r1 : if temperature ≤ 82 ⇒ start engine Rules about information

Information temperature = 82 Potential useful for know

ASCII rules

Data 74 65 6D 70 65 72 61 74 75 72 61 3D 38 32 Potentially useful inform

Rules: r’:group in 2 letters, r”:delete ≤ 30

Signal 1374656D702965726174757261003D383215 No aparent information


Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 2000 years ago


the syllogism
2 17t h century Aristotel
the algebra of thoughts
human reasoning can be reduced to calculations
Leibniz
3 19t h century
boolean logic
Bool
Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 2000 years ago


the syllogism Aristotel
2 17t h century
the algebra of thoughts
human reasoning can be reduced to calculations
3 19t h century
boolean logic Leibniz

Bool
Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 2000 years ago Aristotel

the syllogism
2 17t h century
the algebra of thoughts
human reasoning can be reduced to calculations
Leibniz
3 19t h century
boolean logic

Bool
Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 19t h century
analitycial engine (Babbage, 1791-1871)
the first programmer
Babbage
2 20t h century Imitationgame
Turing’s (1912-1954) ideas about thought and
computation McCarthy
McCarthy (1927) reasoning can be reduced to
calculations
Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 19t h century
analitycial engine (Babbage, 1791-1871)
the first programmer

Babbage
Imitationgame

2 20t h century McCarthy


Turing’s (1912-1954) ideas about thought and
computation
McCarthy (1927) reasoning can be reduced to
calculations
Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 19t h century
analitycial engine (Babbage, 1791-1871)
the first programmer

Babbage
Imitationgame

2 20t h century McCarthy


Turing’s (1912-1954) ideas about thought and
computation
McCarthy (1927) reasoning can be reduced to
calculations
Short Trip Knowledge Representation and Reasoning

Intelectual origins

1 19t h century
analitycial engine (Babbage, 1791-1871)
Babbage
the first programmer

Imitationgame
2 20t h century
Turing’s (1912-1954) ideas about thought and
computation
McCarthy (1927) reasoning can be reduced to
calculations McCarthy
Short Trip Knowledge Representation and Reasoning

Reasoning

Cognitive Processing
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room1

Mother goes into her teenage daughter’s bedroom.


Her instant impression is that it is a big mess. There
is stuff scattered everywhere. Mother’s impression is
that it is not characteristic of the girl to be like this.
What has happened?

1
Example taken from D. M. Gabbay, Sampling Logic and Argumentation
Networks: A Manifesto, 2010
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room1

Mother goes into her teenage daughter’s bedroom.


Her instant impression is that it is a big mess. There
is stuff scattered everywhere. Mother’s impression is
that it is not characteristic of the girl to be like this.
What has happened?
Conjecture: The girl has boyfriend problems.

1
Example taken from D. M. Gabbay, Sampling Logic and Argumentation
Networks: A Manifesto, 2010
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room1

Mother goes into her teenage daughter’s bedroom.


Her instant impression is that it is a big mess. There
is stuff scattered everywhere. Mother’s impression is
that it is not characteristic of the girl to be like this.
What has happened?
Conjecture: The girl has boyfriend problems.

Further Analysis: Mother noticed a collapsed shelf. Did the girl


smash it? Upon further observation, mother notices that the
pattern of chaos shows that a shelf has collapsed because of
excessive weight and scattered everything around, giving the
impression of a big mess. But, actually, it is not a mess, it does
make some (gravitational) sense.
1
Example taken from D. M. Gabbay, Sampling Logic and Argumentation
Networks: A Manifesto, 2010
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room

There are several modes of reasoning:


1

Remarks
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room

There are several modes of reasoning:


1 Neural nets type of reasoning: She recognises the mess
instantly, like we recognise a face.
2

Remarks
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room

There are several modes of reasoning:


1 Neural nets type of reasoning: She recognises the mess
instantly, like we recognise a face.
2 Nonmonotonic deduction: Mother reasons from context
and her knowledge of her daughter that the girl is not
disorganised like this. She asks ”what happened?”.
3

Remarks
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room

There are several modes of reasoning:


1 Neural nets type of reasoning: She recognises the mess
instantly, like we recognise a face.
2 Nonmonotonic deduction: Mother reasons from context
and her knowledge of her daughter that the girl is not
disorganised like this. She asks ”what happened?”.
3 Abduction: She offers a reasonable explanation that the
girl has boyfriend problems. This is common to that age.
4

Remarks
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room


There are several modes of reasoning:
1 Neural nets type of reasoning: She recognises the mess
instantly, like we recognise a face.
2 Nonmonotonic deduction: Mother reasons from context
and her knowledge of her daughter that the girl is not
disorganised like this. She asks ”what happened?”.
3 Abduction: She offers a reasonable explanation that the
girl has boyfriend problems. This is common to that age.
4 Deduction: She then applies deduction and recognises
that the mess is due to gravity. This deduction is no longer
a neural net impression. It is a careful calculation.
Remarks
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room


There are several modes of reasoning:
1 Neural nets type of reasoning: She recognises the mess
instantly, like we recognise a face.
2 Nonmonotonic deduction: Mother reasons from context
and her knowledge of her daughter that the girl is not
disorganised like this. She asks ”what happened?”.
3 Abduction: She offers a reasonable explanation that the
girl has boyfriend problems. This is common to that age.
4 Deduction: She then applies deduction and recognises
that the mess is due to gravity. This deduction is no longer
a neural net impression. It is a careful calculation.
Remarks
Item (4) can be a neural net impression: one who sees
many shelf collapsing mess cases recognises the pattern.
Short Trip Knowledge Representation and Reasoning

Reasoning

The Messy Room


There are several modes of reasoning:
1 Neural nets type of reasoning: She recognises the mess
instantly, like we recognise a face.
2 Nonmonotonic deduction: Mother reasons from context
and her knowledge of her daughter that the girl is not
disorganised like this. She asks ”what happened?”.
3 Abduction: She offers a reasonable explanation that the
girl has boyfriend problems. This is common to that age.
4 Deduction: She then applies deduction and recognises
that the mess is due to gravity. This deduction is no longer
a neural net impression. It is a careful calculation.
Remarks
Item (4) can be a neural net impression: one who sees
many shelf collapsing mess cases recognises the pattern.
Item (2) could have been a Bayesian network.
Short Trip Knowledge Representation and Reasoning

Reasoning

Logical Inferences

Making inferences involves the derivation of


new facts from a set of true facts. Given a set of
premises known and a reasoning method
certain conclusions can be inferred to be also
true.
Short Trip Knowledge Representation and Reasoning

Reasoning

Deduction, Abduction, Induction

Deduction:
 apply a general principle to infer some fact.
r1 : A ⇒ B
B is true.
A is true.
Short Trip Knowledge Representation and Reasoning

Reasoning

Deduction, Abduction, Induction

Deduction:
 apply a general principle to infer some fact.
r1 : A ⇒ B
B is true.
A is true.
Abduction
 : allows inffering A as an explanation of B
r1 : A ⇒ B
A is true.
B is true.
r2 : C ⇒ B → nondeterminism

Example (E. Ionescu’s play Rhinoceros)



All cats die.
Socrates is a cat.
Socrates is dead.
Short Trip Knowledge Representation and Reasoning

Reasoning

Deduction, Abduction, Induction


Deduction:
 apply a general principle to infer some fact.
r1 : A ⇒ B
B is true.
A is true.
Abduction
 : allows inffering A as an explanation of B
r1 : A ⇒ B
A is true.
B is true.
r2 : C ⇒ B → nondeterminism

Example (E. Ionescu’s play Rhinoceros)



All cats die.
Socrates is a cat.
Socrates is dead.
Induction: reasoning from particular facts to a general
conclusion 
P(a) is true.
For all X , P(X ) is true.
P(b) is true.
Short Trip Knowledge Representation and Reasoning

Reasoning

Deduction, Abduction, Induction


Deduction:
 apply a general principle to infer some fact.
r1 : A ⇒ B
B is true.
A is true.
Abduction
 : allows inffering A as an explanation of B
r1 : A ⇒ B
A is true.
B is true.
r2 : C ⇒ B → nondeterminism

Example (E. Ionescu’s play Rhinoceros)



All cats die.
Socrates is a cat.
Socrates is dead.
Induction: reasoning from particular facts to a general
conclusion 
P(a) is true.
For all X , P(X ) is true.
P(b) is true.
Short Trip Knowledge Representation and Reasoning

Reasoning

Deduction, Abduction, Induction


Deduction:
 apply a general principle to infer some fact.
r1 : A ⇒ B
B is true.
A is true.
Abduction
 : allows inffering A as an explanation of B
r1 : A ⇒ B
A is true.
B is true.
r2 : C ⇒ B → nondeterminism

Example (E. Ionescu’s play Rhinoceros)



All cats die.
Socrates is a cat.
Socrates is dead.
Induction: reasoning from particular facts to a general
conclusion 
P(a) is true.
For all X , P(X ) is true.
P(b) is true.
Short Trip Knowledge Representation and Reasoning

Reasoning

Deduction, Abduction, Induction


Deduction:
 apply a general principle to infer some fact.
r1 : A ⇒ B
B is true.
A is true.
Abduction
 : allows inffering A as an explanation of B
r1 : A ⇒ B
A is true.
B is true.
r2 : C ⇒ B → nondeterminism

Example (E. Ionescu’s play Rhinoceros)



All cats die.
Socrates is a cat.
Socrates is dead.
Induction: reasoning from particular facts to a general
conclusion 
P(a) is true.
For all X , P(X ) is true.
P(b) is true.
Short Trip Knowledge Representation and Reasoning

Logics

Logics for Computer Science

Expressive power 1 Boolean Logic


Able to represent the problem 2 Predicate Logic
3 First Order Logic
Correctness of entailment procedure 4 Second Order Logic
No false conclusion are drawn
5 Modal Logics
6 Temporal Logic
Completeness of entailment procedure
7 Epistemic Logic
8 Fuzzy Logic
All correct conclusions are drawn
9 Nonmonotonic Logics
10 Default Logic
Decidability of entailment problem
11 Defeasible Logic
There exists a terminating algorithm
12 Intuitionistic Logic
13 Linear Logic
Complexity 14 Description Logics
Resources needed for computing the solution 15 ...
Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart


Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart
Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Not all students take KBS
Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Not all students take KBS

∃x, Student(x) ⇒ ¬Take(KBS, x)


Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Not all students take KBS

∃x, Student(x) ⇒ ¬Take(KBS, x)


Only one student failed KBS
Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Not all students take KBS

∃x, Student(x) ⇒ ¬Take(KBS, x)


Only one student failed KBS

∃x, [Student(x)∧Fail(KBS, x)∧∀y, [¬(x = y )∧Student(y) ⇒ ¬Fail(KBS, y )]]


Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up

Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Not all students take KBS

∃x, Student(x) ⇒ ¬Take(KBS, x)


Only one student failed KBS

∃x, [Student(x)∧Fail(KBS, x)∧∀y, [¬(x = y )∧Student(y) ⇒ ¬Fail(KBS, y )]]

There is a woman who likes all men who are not vegetarians
Short Trip Knowledge Representation and Reasoning

Logics

FOL Warm-up
Everyone in this room is smart

∀x In(x, F ) ⇒ Smart(x)
Someone in the other room is smart

∃x In(x, 45) ∧ Smart(x)


Not all students take KBS

∃x, Student(x) ⇒ ¬Take(KBS, x)


Only one student failed KBS

∃x, [Student(x)∧Fail(KBS, x)∧∀y, [¬(x = y )∧Student(y) ⇒ ¬Fail(KBS, y )]]


There is a woman who likes all men who are not vegetarians

∃x Woman(x) ∀y Man(y ) ∧ ¬Vegetarian(y ) ⇒ Likes(x, y)


.
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up

There is a barber who shaves all men in town who do not


shave themselves.

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y):
∃y∀x(Loves(x, y):
∀y∃x(Loves(x, y):
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up

There is a barber who shaves all men in town who do not


shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )


Order of mixed quantifiers does matter
∀x∃y (Loves(x, y):
∃y∀x(Loves(x, y):
∀y∃x(Loves(x, y):
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up

There is a barber who shaves all men in town who do not


shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )

Politicians can fool all of the people some of the time, but
they can’t fool all of the people all of the time.

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y):
∃y∀x(Loves(x, y):
∀y∃x(Loves(x, y):
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up
There is a barber who shaves all men in town who do not
shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )

Politicians can fool all of the people some of the time, but
they can’t fool all of the people all of the time.

∀x, Politician(x) ⇒ (∀y ∃t Person(y) ⇒ Fools(x, y , t))

∧¬(∀y∀tPerson(y ) ⇒ Fool(x, y, t))

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y):
∃y∀x(Loves(x, y):
∀y∃x(Loves(x, y):
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up
There is a barber who shaves all men in town who do not
shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )

Politicians can fool all of the people some of the time, but
they can’t fool all of the people all of the time.

∀x, Politician(x) ⇒ (∀y ∃t Person(y) ⇒ Fools(x, y , t))

∧¬(∀y∀tPerson(y ) ⇒ Fool(x, y, t))

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y): everybody loves somebody
∃y∀x(Loves(x, y):
∀y∃x(Loves(x, y):
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up
There is a barber who shaves all men in town who do not
shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )

Politicians can fool all of the people some of the time, but
they can’t fool all of the people all of the time.

∀x, Politician(x) ⇒ (∀y ∃t Person(y) ⇒ Fools(x, y , t))

∧¬(∀y∀tPerson(y ) ⇒ Fool(x, y, t))

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y): everybody loves somebody
∃y∀x(Loves(x, y): there is someone who is loved by everyone
∀y∃x(Loves(x, y):
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up
There is a barber who shaves all men in town who do not
shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )

Politicians can fool all of the people some of the time, but
they can’t fool all of the people all of the time.

∀x, Politician(x) ⇒ (∀y ∃t Person(y) ⇒ Fools(x, y , t))

∧¬(∀y∀tPerson(y ) ⇒ Fool(x, y, t))

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y): everybody loves somebody
∃y∀x(Loves(x, y): there is someone who is loved by everyone
∀y∃x(Loves(x, y): everyone has someone who loves them
∃x∀y (Loves(x, y):
Short Trip Knowledge Representation and Reasoning

Logics

Warm-Up
There is a barber who shaves all men in town who do not
shave themselves.

∃x, Barber (x)∧∀y , Man(y )∧¬Shaves(y, y ) ⇒ Shaves(x, y )

Politicians can fool all of the people some of the time, but
they can’t fool all of the people all of the time.

∀x, Politician(x) ⇒ (∀y ∃t Person(y) ⇒ Fools(x, y , t))

∧¬(∀y∀tPerson(y ) ⇒ Fool(x, y, t))

Order of mixed quantifiers does matter


∀x∃y (Loves(x, y): everybody loves somebody
∃y∀x(Loves(x, y): there is someone who is loved by everyone
∀y∃x(Loves(x, y): everyone has someone who loves them
∃x∀y (Loves(x, y): there is someone who loves everyone
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly.


Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins?


Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions.
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston.
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston. But what if the battery is dead?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston. But what if the battery is dead? Your
license has expired?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston. But what if the battery is dead? Your
license has expired? There is a major snowstorm?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston. But what if the battery is dead? Your
license has expired? There is a major snowstorm?
Conflicting defaults.
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston. But what if the battery is dead? Your
license has expired? There is a major snowstorm?
Conflicting defaults.Quakers are pacifists, and Republicans
are not.
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Overgeneralizations. Birds fly. But what about penguins? A


day-old chick? A bird with a broken wing? A stuffed bird? A
sleeping bird? A bird in a cage?
Abnormal conditions. If you have a car, you can drive from
New York to Boston. But what if the battery is dead? Your
license has expired? There is a major snowstorm?
Conflicting defaults.Quakers are pacifists, and Republicans
are not. But what about Richard Nixon, who was both a
Quaker and a Republican? Was he or was he not a
pacifist?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books.
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth? A corneal transplant?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth? A corneal transplant? Contact lenses?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth? A corneal transplant? Contact lenses? Eyeglasses?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth? A corneal transplant? Contact lenses? Eyeglasses?
A tattoo?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth? A corneal transplant? Contact lenses? Eyeglasses?
A tattoo? Make-up?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

The Complexity of Knowledge Soup

Unanticipated applications. The parts of the human body


are described in anatomy books. But is hair a part of the
body? Hair implants? A wig? A wig made from a person’s
own hair? Fingernails? Plastic fingernail extender? A skin
graft? Artificial skin used for emergency patches? A
band-aid? A bone implant? An artificial implant in a bone?
A heart transplant? An artificial heart? An artificial leg?
Teeth? Fillings in the teeth? A porcelain crown? False
teeth? A corneal transplant? Contact lenses? Eyeglasses?
A tattoo? Make-up? Clothes?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

Ethical and Legal Considerations

Using expert systems implies that knowledge


engineers and domain experts will indirectly
participate in the medical decision process.

Who is responsible if the advice is wrong?


1 The user?
2 The domain expert?
3 The knowledge engineer?
4 The programmer?
5 The company selling the software?
Short Trip Knowledge Representation and Reasoning

Knowledge engineering

Google’s Autonomous Vehicle

Who’s liable when an autonomous car crashes? The driver?


Google? The programmer?
Do you make autonomous cars conform to current laws and
vehicle codes or establish new ones?
What about cybersecurity in vehicular networks?
Do you still allow manually operated cars when most cars are
autonomous?
Obtaining driver licence

You might also like