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

Artificial Intelligence- Module 3_Part 3

Artificial Intelligence- Module 3_Part 3

Uploaded by

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

Artificial Intelligence- Module 3_Part 3

Artificial Intelligence- Module 3_Part 3

Uploaded by

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

Module–III: Knowledge

Representation and Planning

Knowledge representation,
propositional logic,
first order logic, classical planning,
automated planning
First Order Logic

 Propositional logic is a declarative language


because its semantics is based on a truth relation
between sentences and possible worlds.
 It also has sufficient expressive power to deal
with partial information, using disjunction and
negation.
 Propositional logic has a third property that is
desirable in representation COMPOSITIONALITY
languages, namely, compositionality.
The language of thought
 The modern view of natural language is
that it serves a as a medium for
communication rather than pure
representation.
 Natural languages also suffer from
ambiguity, a problem for a
representation language.
Combining the best of formal and
natural languages
 We can adopt the foundation of propositional
logic—a declarative, compositional semantics that
is context-independent and unambiguous—and
build a more expressive logic on that foundation,
borrowing representational ideas from natural
language while avoiding its drawbacks.
 When we look at the syntax of natural language,
the most obvious elements are nouns and noun
phrases that refer to objects (squares, pits,
wumpuses) and verbs and verb phrases that refer
to relations among objects (is breezy, is adjacent
to, shoots).
Examples of objects, relations,
and functions
 Objects: people, houses, numbers, theories,
Ronald McDonald, colors, baseball games, wars,
centuries . . .
 Relations: these can be unary relations or
properties such as red, round, bogus, prime,
multistoried . . ., or more general n-ary relations
such as brother of, bigger than, inside, part of,
has color, occurred after, owns, comes
between, . . .
 Functions: father of, best friend, third inning of,
one more than, beginning of . .
“One plus two equals three.”
Objects: one, two, three, one plus two; Relation:
equals; Function: plus. (“One plus two” is a name for
the object that is obtained by applying the function
“plus” to the objects “one” and “two.” “Three” is
another name for this object.)
“Squares neighboring the wumpus are smelly.”
Objects: wumpus, squares; Property: smelly;
Relation: neighboring.
“Evil King John ruled England in 1200.”
Objects: John, England, 1200; Relation: ruled;
Properties: evil, king.
 The primary difference between propositional
and first-order logic lies in the ontological
commitment made by each language—that is,
what it assumes about the nature of reality.
 The formal models are correspondingly more
complicated than those for propositional logic.
 Special-purpose logics make still further
ontological commitments; for example, temporal
logic assumes that facts hold at particular times
and that those times (which may be points or
intervals) are ordered.
 Higher-order logic views the relations and
functions referred to by first-order logic as
objects in themselves.
 A logic can also be characterized by its
epistemological commitments—the possible
states of knowledge that it allows with respect to
each fact.
 These logics therefore have three possible states
of knowledge regarding any sentence.
 Systems using probability theory, on the other
hand, can have any degree of belief, ranging
from 0 (total disbelief) to 1 (total belief).
SYNTAX AND SEMANTICS OF
FIRST-ORDER LOGIC
Models for first-order
logic
Models for first-order logic
are much more interesting.
First, they have objects in
them! The domain of a
model is the set of objects
or domain elements it
contains.
The domain is required to
be nonempty—every
possible world must contain
at least one object.
Symbols and
interpretations
 The basic syntactic elements of first-order
logic are the symbols that stand for objects,
relations, and functions.
 The symbols, therefore, come in three kinds:
constant symbols, which stand for objects;
predicate symbols, which stand for
relations; and function symbols, which
stand for functions.
 Each predicate and function symbol comes
with an arity that fixes the number of
arguments.
 As in propositional logic, every model must
provide the information required to determine if
any given sentence is true or false.
 Thus, in addition to its objects, relations, and
functions, each model includes an
interpretation that specifies exactly which
objects, relations and functions are referred to
by the constant, predicate, and function symbols.
 One possible interpretation for our example—
which a logician would call the intended
interpretation—is as follows:
 Richard refers to Richard the Lionheart and John refers to
the evil King John.
 Brother refers to the brotherhood relation, that is, the set
of tuples of objects given in Equation (8.1); OnHead refers
to the “on head” relation that holds between the crown
and King John; Person, King, and Crown refer to the sets of
objects that are persons, kings, and crowns.

 LeftLeg refers to the “left leg” function, that is, the


mapping given in Equation (8.2).
Terms
 A term is a logical expression that refers
to an object.
 Constant symbols are therefore terms, but
it is not always convenient to have a
distinct symbol to name every object.
Atomic sentences
 An atomic sentence (or atom for short)
is ATOMIC SENTENCE formed from a
predicate symbol optionally followed by a
parenthesized list of terms, such as
Brother (Richard , John).
 An atomic sentence is true in a given
model if the relation referred to by the
predicate symbol holds among the objects
referred to by the arguments.
Complex sentences
 We can use logical connectives to
construct more complex sentences, with
the same syntax and semantics as in
propositional calculus.
Quantifiers
 Once we have a logic that allows objects,
it is only natural to want to express
properties of entire collections of objects,
instead of enumerating the objects by
name.
 Quantifiers let us do this.
 First-order logic contains two standard
quantifiers, called universal and
existential.
Universal quantification (∀)
“All kings are persons,” is written in first-order logic as

∀ x King(x) ⇒ Person(x) .
∀ is usually pronounced “For all . . .”. (Remember that the
upside-down A stands for “all.”)
Thus, the sentence says, “For all x, if x is a king, then x is a
person.”
The symbol x is called a variable.
By convention, variables are lowercase letters.
A variable is a term all by itself, and as such can also serve
as the argument of a function—for example, LeftLeg(x).
A term with no variables is called a ground term.
Existential quantification (∃)
Universal quantification makes statements
about every object.
Similarly, we can make a statement about some
object in the universe without naming it, by
using an existential quantifier.
To say, for example, that King John has a crown
on his head, we write
∃ x Crown(x) ∧ OnHead(x, John) .
∃x is pronounced “There exists an x such that . .
.” or “For some x . . .”.
Connections between ∀ and

 The two quantifiers are actually intimately
connected with each other, through negation.
 Asserting that everyone dislikes parsnips is the
same as asserting there does not exist someone
who likes them, and vice versa:
∀ x ¬ Likes(x, Parsnips ) is equivalent to ¬∃ x
Likes(x, Parsnips) .
 We can go one step further: “Everyone likes ice
cream” means that there is no one who does not
like ice cream:
∀ x Likes(x, IceCream) is equivalent to ¬∃ x ¬
Likes(x, IceCream) .
Equality
 First-order logic includes one more way to make atomic
sentences, other than using a predicate and terms as described
earlier.
 We can use the equality symbol to signify that two terms refer
to the same object.
 For example, Father (John)=Henry
 The equality symbol can be used to state facts about a given
function, as we just did for the Father symbol.
 It can also be used with negation to insist that two terms are
not the same object.
 To say that Richard has at least two brothers, we would write
∃ x, y Brother (x,Richard ) ∧ Brother (y,Richard ) ∧ ¬ (x=y) .
 The sentence
∃ x, y Brother (x,Richard ) ∧ Brother (y,Richard )

You might also like