Chapter 4 !
Chapter 4 !
1
Knowledge: What and Why?
• Knowledge includes facts about the real world entities and the
relationship between them
• Knowledge-based Systems (KBSs) are useless without the
ability to represent knowledge.
Knowledge Knowledge
acquisition Representation Knowledge
(Extract knowledge (choose KR Method & Base
of Human Expert) reasoning strategy)
4
The two main tasks of KE
•Knowledge acquisition: The knowledge engineer interview the
real human experts to be educated about the domain and to
elicit the required knowledge, in a process called knowledge
acquisition
•Knowledge Representation techniques such as logic are a
powerful tool for KR and reasoning. However, such techniques
consists of only the syntax, semantics and proof theory.
–KR techniques do not offer any guidance as to what facts should be
expressed, nor what vocabulary should be used to express them
•Knowledge base is used to store a set of facts and rules about
the domain expressed in a suitable representation language
–Each individual representation are called sentences
–Sentences are expressed in a (formal) knowledge representation
(KR) language 5
Knowledge Representation & Reasoning
•Knowledge Representation (KR): express knowledge
explicitly in a computer-tractable way such that the agent
can reason out.
•Parts of KR language:
–Syntax of a language: describes the possible configuration to form
sentences. E.g.: if x & y denote numbers, then x > y is a sentence
about numbers
–Semantics: determines the facts in the world to which the sentences
refer. E.g.: x > y is false when y is greater than x and true otherwise
•Reasoning: is the process of constructing new sentences
from existing facts in the KB.
–Proper reasoning ensures that the new configuration represent facts
that actually follow from the facts in the KB.
6
Logic as KR
•A Logic is a formal language in which knowledge can be
represented such that conclusions can easily be drawn.
–It is a declarative language to assert sentences and deduce
from sentences.
•Components of a formal logic include syntax, semantics,
reasoning and inference mechanism.
–Syntax: what expressions/structures are allowed in the
language. Describes how to make sentences
E.g. mycar (red) is ok, but mycar(grey or green) is not.
–Semantics: express what sentences mean, in terms of a
mapping to real world.
•The meaning of a sentence is not intrinsic to that sentence. Semantics
relate sentences to reality.
•E.g. mycar (red) means that my car is red.
–Proof Theory: It is a means of carrying our reasoning using a
set of rules. It helps to draw new conclusions from existing
7
statements in the logic.
Propositional logic
•A simple language useful for showing key ideas and
definitions
•Syntax: PL allows facts about the world to be represented
as sentences formed from:
Logical constants: True, False
Proposition symbols (P, Q, R, …) are used to represent
facts about the world: e.g.: P = "It is hot“, Q = "It is humid“, R
= "It is raining“
Logical connectives: not (), and (), or (), implies (), is
equivalent, if and only if ().
Precedence order from highest to lowest is: , ,,,
e.g. The sentence P v Q R S is equivalent to
[(P) v (Q R)] S
Parenthesis ( ): Used for grouping sentences and to specify
order of precedence 8
Propositional logic (PL) sentences
•A sentence is made by linking prepositional symbols
together using logical connectives.
– There are atomic and complex sentences.
– Atomic sentences consist of propositional symbol (e.g. P, Q,
TRUE, FALSE)
– Complex sentences are combined by using connectives or
parenthesis:
– while S and T are atomic sentences, S T, (S T), (S T),
(S T), and (S T) are complex sentences.
15
Syntax of FOL
• Constants symbol
–names (like Jonas, Kebede, …), numbers (like 1, 2, … n), ...
• Predicates:
–Predicates used to relate one object with another. E.g.
brother, >,...
• Functions: Returns value (Sqrt, mother-of,...)
• Variables: x, y, a, b,...
–Important to increase generalization capability of KB
• Connectives:
–retains connectives used in PL (, , , , )
• Quantifiers:
–Quantifiers specify whether all or some objects satisfy
properties or relations between objects
–Two standard quantifiers: Universal ( for all, for every) and
Existential ( there exists, some)
16
Universal quantification
• Universal Quantifiers: makes statements about every object
<variables> <sentence>
–Everyone at AAU is smart:
x At(x,AAU) Smart(x)
–All cats are mammals:
x cat(x) mammal(x)