Knowledge Representation Knowledge Representation An artificial intelligence system

  • Slides: 28
Download presentation
Knowledge Representation

Knowledge Representation

Knowledge Representation • An artificial intelligence system is capable of not only storing and

Knowledge Representation • An artificial intelligence system is capable of not only storing and manipulating data, but also of acquiring, representing, and manipulating knowledge.

Knowledge Representation In automated AI systems, key issues: • Knowledge acquisition: The transformation of

Knowledge Representation In automated AI systems, key issues: • Knowledge acquisition: The transformation of potential problemsolving expertise from some knowledge source to a program. • Knowledge representation: As a set of sentences of first order logic symbolic encoding of propositions

 • Knowledge reasoning: Deducing logical consequences manipulation of symbols encoding propositions to produce

• Knowledge reasoning: Deducing logical consequences manipulation of symbols encoding propositions to produce representations of new propositions.

Knowledge Representation • Knowledge representation concerns the mismatch between human and computer 'memory’. •

Knowledge Representation • Knowledge representation concerns the mismatch between human and computer 'memory’. • We call these representations knowledge bases, and the operations on these knowledge bases, inference engine

What to Represent? • Facts: truths about the real world and what we represent.

What to Represent? • Facts: truths about the real world and what we represent. • Representation of the facts: Which we manipulate. We define the representation in terms of symbols that can be manipulated by programs.

Knowledge Representation Four major representation types • Logical Representations(First order logic) • Semantic Networks

Knowledge Representation Four major representation types • Logical Representations(First order logic) • Semantic Networks • Production Rules • Frames

Outline • Why FOL? • Syntax and semantics of FOL

Outline • Why FOL? • Syntax and semantics of FOL

First-order logic • Whereas propositional logic assumes the world contains facts, • first-order logic

First-order logic • Whereas propositional logic assumes the world contains facts, • first-order logic (like natural language) assumes the world contains – Objects: people, houses, numbers, colors, baseball games, wars, … – Relations: has brother of, bigger than, … – Functions: has father, plus, angle in cosine …

Example • “One plus two equals three” – Objects: One, Two, Three – Relation:

Example • “One plus two equals three” – Objects: One, Two, Three – Relation: equals – Function: plus • “Evil King John ruled England in 1200” – Objects: John, England, 1200 – Relation: ruled – Properties: evil, King

First-order logic • In proposition logic every expression is a sentence which represent a

First-order logic • In proposition logic every expression is a sentence which represent a fact • FOL also has sentences, but it also has • Terms which represents objects

Syntax of FOL: Basic elements • Constants King. John, A, B, 2. . .

Syntax of FOL: Basic elements • Constants King. John, A, B, 2. . . – An interpretation must specify which object in the world is referred to by each constant. – Each constant symbol names exactly one object – But not all the objects need to have names – Some have several names. For example, the symbol john in one particular interpretation might refers to evil King John, King of England from 1199 to 1216 and younger brother of Richard the Lionheart.

Syntax of FOL: Basic elements • Predicates Brother, >, . . . – An

Syntax of FOL: Basic elements • Predicates Brother, >, . . . – An interpretation specifies that a predicate symbol refers to a particular relation in the model – For example, the Brother symbol might refer to the relation of brotherhood – In a given model, the relation is defined by the set of tuples of objects that satisfy it – For example, in the model containing two objects John and Richard, relation of brotherhood is defined by set of tuples {(John, Richard), (Richard, John)}

Syntax of FOL: Basic elements • Functions Sqrt, Left. Leg. Of, . . .

Syntax of FOL: Basic elements • Functions Sqrt, Left. Leg. Of, . . . – Functional relation are those in which any given object is related to one other object by the relation – For example, angle has only one number that is its cosine or any person has only one person that is his or her father – Unlike predicate symbols which are used to state that relations hold among certain objects, functional symbols are used to refer to particular objects without using their names • • Variables x, y, a, b, . . . Connectives , , Equality = Quantifiers ,

Syntax of FOL • • • Nor implies and or if and only if

Syntax of FOL • • • Nor implies and or if and only if

Universal and Existential • Universal quantification – ( x)P(x) means that P holds for

Universal and Existential • Universal quantification – ( x)P(x) means that P holds for all values of x in the domain associated with that variable – E. g. , ( x) dolphin(x) # mammal(x) • Existential quantification – ( x)P(x) means that P holds for some value of x in the domain associated with that variable – E. g. , ( x) mammal(x) ! lays-eggs(x) – Permits one to make a statement about some object without naming it/

FOL • It is raining. RAINING • It is sunny. SUNNY • It is

FOL • It is raining. RAINING • It is sunny. SUNNY • It is windy. WINDY • If it is raining, then it is not sunny. RAINING SUNNY

 (x) dog(x)

(x) dog(x)

Examples

Examples

Examples

Examples

Atomic sentences Atomic sentence = predicate (term 1, . . . , termn) or

Atomic sentences Atomic sentence = predicate (term 1, . . . , termn) or term 1 = term 2 Term = function (term 1, . . . , termn) or constant or variable • E. g. , Brother(King. John, Richard. The. Lionheart) • > (Length(Left. Leg. Of(Richard)), Length(Left. Leg. Of(King. John)))

Complex sentences • Complex sentences are made from atomic sentences using connectives S, S

Complex sentences • Complex sentences are made from atomic sentences using connectives S, S 1 S 2, E. g. Sibling(King. John, Richard) Sibling(Richard, King. John) >(2, 1) ≤ (1, 2) >(2, 1) >(1, 2)

Universal quantification <variables> <sentence> Everyone at NUS is smart: x At(x, NUS) Smart(x) x

Universal quantification <variables> <sentence> Everyone at NUS is smart: x At(x, NUS) Smart(x) x P is true in a model m iff P is true with x being each possible object in the model Roughly speaking, equivalent to the conjunction of instantiations of P . . . At(King. John, NUS) Smart(King. John) At(Richard, NUS) Smart(Richard) At(NUS, NUS) Smart(NUS)

A common mistake to avoid • Typically, is the main connective with • Common

A common mistake to avoid • Typically, is the main connective with • Common mistake: using as the main connective with : x At(x, NUS) Smart(x) means “Everyone is at NUS and everyone is smart”

Existential quantification • <variables> <sentence> • Someone at NUS is smart: • x At(x,

Existential quantification • <variables> <sentence> • Someone at NUS is smart: • x At(x, NUS) Smart(x) • x P is true in a model m iff P is true with x being some possible object in the model • Roughly speaking, equivalent to the disjunction of instantiations of P At(King. John, NUS) Smart(King. John) At(Richard, NUS) Smart(Richard) At(NUS, NUS) Smart(NUS) . . .

Another common mistake to avoid • Typically, is the main connective with • Common

Another common mistake to avoid • Typically, is the main connective with • Common mistake: using as the main connective with : x At(x, NUS) Smart(x) is true if there is anyone who is not at NUS!

Using FOL The kinship domain: • Brothers are siblings x, y Brother(x, y) Sibling(x,

Using FOL The kinship domain: • Brothers are siblings x, y Brother(x, y) Sibling(x, y) • “Sibling” is symmetric x, y Sibling(x, y) Sibling(y, x)

Interacting with FOL KBs Substituting Values of Variables: • Given a sentence S and

Interacting with FOL KBs Substituting Values of Variables: • Given a sentence S and a substitution σ, • Sσ denotes the result of plugging σ into S; e. g. , – S = Smarter(x, y) – σ = {x/Hillary, y/Bill} – Sσ = Smarter(Hillary, Bill)