0% found this document useful (0 votes)
5 views

LM01 - Introduction to knowledge representation

Uploaded by

raghadsad2001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

LM01 - Introduction to knowledge representation

Uploaded by

raghadsad2001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Knowledge Representation & Reasoning

Lecture 1
Introduction

1
Overview
n Lecture time:
g See “Course Syllabus” for details…
g Lecture pre-recordings, on occasions…
n Office times: Sunday 10:00AM, Monday 1:30PM (By
appointment preferable)
n Assignments:
g 1 major.
Implementation of a solver
Implementing Expert system
Implementing Ontology system
Theoretical study, presentation, and discussion of research papers
(select your preferred choice)
2
Overview
n Aims
g Development of skills in Knowledge
Representation & Reasoning

g Understanding of various ways to


represent and reason with knowledge

g Practical Applications of Knowledge


Representation & Reasoning

g Motives for Research

3
Overview
n Prerequisites:

g Artificial Intelligence
· Search Algorithms
g Logic
· Propositional & First Order Logic
g Algorithms & Data Structures
· Algorithmic Complexity
g Programming!
· C  C++  Java, python

4
Overview
n Bibliography:
g General stuff on AI
· Artificial Intelligence: A Modern Approach, Russell & Norvig
· http://www.cs.berkeley.edu/~russell/aima.html

· http://aima.cs.berkeley.edu/

· Artificial Intelligence: A New Synthesis, Nilsson


· Essentials of Artificial Intelligence: Ginsberg
g Knowledge Representation
· Knowledge Representation and Reasoning, Ronald J. Brachman, Hector J. Levesque
g Constraint Programming
· Constraint Processing, Rina Dechter
g LOTS OF PAPERS…
· More after specific lectures (where applicable…)

5
ΑΙ and KR
n A description of Artificial
Intelligence is:
g The study and development of systems
that demonstrate intelligent behavior

n Based on the above, a description


of Knowledge Representation KR&R is the part of AI that is
& Reasoning is: concerned with thinking and
how thinking contributes to
g The study of ways to represent and intelligent behavior
reason with information in order to
achieve intelligent behavior

6
What is KR&R?
n There are many ways to approach the topic of intelligence and
intelligent behavior
g neuroscience, psychology, evolution, philosophy
n KR suggests an approach to understanding intelligent behavior that is
radically different
g Instead of studying humans very carefully (biology, nervous systems,
psychology, sociology, etc.), it argues that what we need to study is what
humans know.
g It is taken as given that what allows humans to behave intelligently is that they
know a lot of things about a lot of things and are able to apply this knowledge as
appropriate to adapt to their environment and achieve their goals.

n KR&R focuses on the knowledge, not on the knower. We ask what


any agent—human, animal, electronic, mechanical—would need to
know to behave intelligently, and what sorts of computational
mechanisms might allow its knowledge to be manipulated.
7
Knowledge
n What is knowledge? This is a question that has been discussed by philosophers
since the ancient times, and it is still not totally clarified.
g Will not attempt to define it formally…
n Observe that when we say something like “John knows that …,” we fill in the blank
with a simple
g “John knows that Mary will come to the party,”
g “John knows that Spain won the Euro”
n Among other things, knowledge is a relation between a knower and a proposition
g knower : John
g proposition: the idea expressed by a simple declarative sentence, like “Mary will come
to the party.”
n What can we say about propositions? For KR&R, what matters about propositions is
that they are abstract entities that can be true or false, right or wrong.
g When we say, “John knows that p,” we can just as well say, “John knows that it is true
that p.”

8
9
What is Intentional Stance?
n A philosophical concept introduced by Daniel Dennett that
is relevant to Knowledge Representation and Reasoning
(KR&R) in AI.

n A way of understanding and predicting the behavior of


complex systems, such as intelligent agents, by attributing
to them beliefs, desires, and intentions as if they were
rational and goal-directed.

KNOWLEDGE REPRESENTATION & 10


REASONING - Lecture 1
What is Intentional Stance?
n In the context of KR&R, the intentional stance can be used
as a modeling approach that assumes that an intelligent
agent has mental states that can be represented and reasoned
about using a suitable representation language.

n For example, an expert system for medical diagnosis may


use the intentional stance to represent a patient's symptoms,
medical history, and treatment options as if the system had
beliefs, desires, and intentions to help the patient by making
accurate diagnoses and treatment recommendations.

KNOWLEDGE REPRESENTATION & 11


REASONING - Lecture 1
What is Intentional Stance?
n The intentional stance can also be used to analyze and
interpret the behavior of human agents in various domains,
such as social psychology, cognitive science, and
philosophy.

n By attributing to a human agent beliefs, desires, and


intentions, one can generate hypotheses and explanations of
the agent's behavior and predict their future actions.

KNOWLEDGE REPRESENTATION & 12


REASONING - Lecture 1
Representation
n Roughly, representation is a relationship between two domains,
where the first is meant to “stand for” or take the place of the second.
g Usually, the first domain, the representor, is more concrete, immediate, or
accessible in some way than the second.
· For example, a drawing of a hamburger on a sign might stand for a less immediately
visible fast food restaurant;
· an elected member of parliament might stand for his or her constituency.
g The type of representor that we will be most concerned with here is the formal
symbol, that is, a character or group of characters taken from some
predetermined alphabet.
· The digit “7,” for example, stands for the number 7, as does the group of letters “VII”
g Knowledge representation, then, is the field of study concerned with using
formal symbols to represent a collection of propositions believed by some
agent.

13
14
15
& Reasoning
n What is reasoning? In general, it is the formal manipulation of the
symbols representing a collection of believed propositions to produce
representations of new ones.
g Here that we use the fact that symbols are more accessible than the propositions
they represent: They must be concrete enough that we can manipulate them
(move them around, take them apart, copy them, string them together) in such a
way as to construct representations of new propositions.
· We might start with the sentences “John loves Mary” and “Mary is coming to the
party” and after a certain amount of manipulation produce the sentence, “Someone
John loves is coming to the party”
· We would call this form of reasoning logical inference because the final sentence
represents a logical conclusion of the propositions represented by the initial ones.
n Reasoning is a form of calculation, not unlike arithmetic, but over
symbols standing for propositions rather than numbers.

16
17
How can knowledge be represented ?
n Symbolic methods
g Declarative Languages (Logic)
g Imperative Languages (C, C++, Java, etc.)
g Hybrid Languages (Prolog)
g Rules
g Frames
g Semantic Networks
g …

n Non-symbolic methods
g Neural Networks
g Genetic Algorithms

18
Symbolic Methods of Knowledge
Representation
Natural Language
Frames
First-order Logic
Semantic Networks
Non-monotonic Logic
Rules Hybrid systems
Constraints Fuzzy Logic
XML/RDF Prolog Bayes Networks
Ontologies Description Logics
C/C++/Java
Scripts Propositional Logic
19
Types of Knowledge
n Declarative Knowledge
g Description of notions, facts, and rules of the world

n E.g.
g For each lecture there is a specific time and place
g Only one lecture can take place at each time and place

n Description knowledge, nonprocedural, independent of


targets and problem solving

20
Types of Knowledge
n Procedural Knowledge
g Description of procedures required to achieve targets
g Knowledge of the order in which actions must be performed
g Heuristic knowledge

n E.g.
g To construct the exams timetable, assign first the classes of the first year
g To reach Athens faster, take the airplane

n It depends on the targets and problems

21
Types of Knowledge
n Basic Difference
g declarative knowledge is right or wrong
· Lectures are on Wednesdays
g procedural knowledge can be executed
· the procedure of constructing the exams timetable

Knowledge Representation
&
n Which of the two interests us? Reasoning
g Both of course

22
The Language of Propositional Logic
n Before any system aspiring to intelligence can even begin to reason,
learn, plan, or explain its behavior, it must be able to formulate the
ideas involved.
g You will not be able to learn something about the world around you, for
example, if it is beyond you to even express what that thing is.

n So, we need to start with a language, in terms of which knowledge can


be formulated. We will examine in detail one specific language that
can be used for this purpose: the language of propositional logic
g Propositional logic is not the only choice, of course, but is a simple and
convenient one to begin with.

n What does it mean to “have” a language? Once we have a set of words


or a set of symbols of some sort, what more is needed? As far as we
are concerned, there are two main things:
g A KR language is defined by its syntax and its semantics
23
Syntax of a KR language
n We need to specify which groups of symbols, arranged in
what way, are to be considered properly formed.
g In English, for example, the string of words “the cat my mother loves” is
a well-formed phrase, but “the my loves mother cat” is not.

n The syntax consists of a set of symbols used by the


language and a set of rules according to which the symbols
can be combined to form proper sentences.

24
Semantics of a KR language
n We need to specify what the well-formed expressions are supposed to
mean.
g Some well-formed expressions like “the recently divorced decimal holiday”
might not mean anything. We need to be clear about what idea about the world
is being expressed.
n The semantics determine a mapping between symbols, combinations
of symbols, propositions of the language and concepts of the world to
which they refer

n A proposition in a KR language does not mean anything on its own


g The semantics (i.e., the meaning) of the proposition must be defined by the
language author through an interpretation.

25
Knowledge Representation Languages
n An expression is true under a certain interpretation if the
facts of the real world that it represents are valid.
n We say that a proposition (α) is entailed by a set of
propositions (s) when whenever the set of propositions s is
true then α is true.
g entailment is usually notated by s |= α
entails
proposition proposition
Representation semantics semantics
Real world
fact fact
entails
KNOWLEDGE REPRESENTATION & 26
REASONING - Lecture 1
Desired Features of KR languages
n Epistemological Level
g Clarity
g Expressiveness
n Logical Level CONFLICT !
g Elegant syntax & semantics
g Decidability / Tractability
g Sound and complete inference mechanism

n Implementation Level
g Space & Time efficiency
g Extensibility

27
Chapter 16. The Tradeoff between Expressiveness and Tractability
DOI: 10.1016/B978-155860932-7/50101-1
In book: Knowledge Representation and Reasoning, Ronald J. BrachmanHector J. Levesque

n This chapter begins with a simple description language and reveals how a very
small change in its expressiveness completely changes the sort of reasoning
procedure it requires. It also considers the idea of languages in a more limited way
than first-order logic (FOL) and examines what seems to happen as they are
generalized to full FOL. To illustrate the tradeoff between expressiveness and
tractability it begins by examining a very concrete case involving description logics
and the subsumption task. It suggests that one way of dealing with the tradeoff is to
allow very expressive languages, but to preserve tractability by doing a form of
reasoning that is somehow less demanding. Researchers have proposed alternative
logical systems with weaker notions of entailment that might be candidates for
exploration of limited reasoning with expressive representation languages. The
tradeoff between expressiveness and complexity is so fundamental to the
understanding of knowledge representation and reasoning the chapter also
concentrates on that issue and leaves aside the consideration of weak logics.

KNOWLEDGE REPRESENTATION & 28


REASONING - Lecture 1
Expressiveness vs. Tractability
n Assume you are requested to describe a painting. You can use either
of the following languages
1. The Greek language, i.e., all syntactically and semantically correct statements
in Greek
2. The tiny subset of the Greek language that only includes words “ωραίος”,
“άσχημος”
n Your descriptions are:
1. “Ο πίνακας αυτός είναι διανθισμένος με εξαίσιες πινελιές χρωμάτων που τονίζουν
την ομορφιά του τοπίου που απεικονίζει ο καλλιτέχνης. Από την άλλη εύκολα
εντοπίζει κανείς και συγκεκριμένες ατέλειες που κυρίως αφορούν την
προοπτική....”
2. “ωραίος”
n Which description is more accurate/expressive?
n Which description allows you to answer the query “είναι ο πίνακας
ωραίος?” faster?
29
Logic for KR
n Historically logic is the first KR language
g 1959-1965: First Order Logic is the KR language for AI
g 1965: Resolution (Robinson) means real hope for universally applicable

proof method
· computational & representational problems
g 1970s: Rivals emerge (semantic networks, rules, frames)
· unclear semantics & inference
g 1975: Logic Programming (Kowalski)
· decrease expressivity to increase efficiency
· declarative & procedural knowledge in one language
g 1980…: Non-monotonic reasoning (McCarthy, Reiter)
· common sense knowledge

30
Advantages of Logic for KR
n Like all declarative languages:
g compact
g task-independent
g modular representation
g reusable, flexible, maintainable
n Logic has formal well-defined semantics
n Logic is expressive
g incomplete knowledge
g temporal logics
g second order logic
g …

31
Disadvantages of Logic for KR
n Inefficiency !!!
g implementation level
n Difficulty in describing procedural knowledge

n Expressivity vs. Tractability


g the more expressive the less tractable
g “Problem solving based on expressive logics is impossible”
In the worst case !
g Why ?
· expressiveness broader problems => harder problems

32
Logic-based Reasoners
n Knowledge Representation Languages based on Logic
SAT solvers
g Propositional logic
g First order logic Theorem Provers
g Answer set programming ASP solvers
g Prolog
SICStus Prolog
ECLiPSe Prolog at ECRC
ECLiPSe Prolog at IC-PARC
CIAO Prolog
XSB Prolog
Yap Prolog
CHIP

33

You might also like