Title: Representing Knowledge with Calculus
1Representing Knowledge with Calculus
- Knowledge-Based Agents
- Propositional Logic
- Predicate Logic
- Summary
2Knowledge-Based Agents
- Central component is a knowledge-base
- Knowledge is made of sentences
- Sentences are expressed in a language
- We wish to derive new sentences through
- inference.
3Example
4Declarative vs Procedural
- Two approaches to store knowledge
- Declarative.
- Sentences representing knowledge
- Procedural.
- Encode behavior directly as code.
5Representing Knowledge with Calculus
- Knowledge-Based Agents
- Propositional Logic
- Predicate Logic
- Summary
6Logic
- Important terms
- Syntax .- rules to represent well-formed
- sentences
- Semantics.- define the truth of each sentence.
- Model.- Possible world
7Syntax
- Atomic sentences propositional symbols
- Complex sentences use logical connectives
- Negation,conjunction,disjunction
- Implication and biconditional.
8Syntax
To create well-formed formulas
sentence ? atom complex structure atom
? true false symbol symbol
? P Q R complex s ? sentence
( sentence sentence )
( sentence V
sentence ) (
sentence ? sentence) (
sentence ?? sentence)
9Semantics
Semantics defines the meaning of sentences. The
truth value assignment to a sentence is called an
interpretation. An interpretation maps a symbol
to T,F.
10Semantics
- Review truth assignments for
- Conjunction
- Disjunction
- Implication
- Equivalence
11Historical Background
Newell and Simon developed the Logic Theorist in
1956. It used transformations of expressions to
prove theorems extracted from Principia
Mathematica by Whitehead and Russell.
12Comparison
- Propositional logic
- Less expressive than predicate logic.
- It lacks power to describe situations
concisely. - Assumes facts are true or false
13Representing Knowledge with Calculus
- Knowledge-Based Agents
- Propositional Logic
- Predicate Logic
- Summary
14Syntax and Semantics
- What is a model?
- Propositional logic sets of truth values for
symbols - First-order logic
- Domain of the model (objects it contains)
- Relations (tuples of objects related)
-
15Example
Stars, Galaxies, Quasars
A kind of AGN in galaxies
Made of stars
Surrounded by planets
16Symbols and Interpretations
Symbols 1. Constants earth, moon, sun,
milky-way 2. Predicate Symbols
neighbor-planets(x,y) 3. Function Symbols
3rdPlanet(sun)
17Syntax
sentence ? atomic-sentence (
sentence connective sentence )
( quantifier variable, sentence )
sentence atomic-sentence ?
predicate(term) term term term ?
function(term) constant
variable
18Syntax
Connective ? ? V ??
Quantifier ? V
E
Symbols
Constant ? a x1 sun Variable ? A V S
Predicate ? neighborPlanets typeGalaxy
colorStar Function ? firstPlanet
19Semantics
Interpretation Symbol sun refers to star
sun Symbol earth refers to planet earth Star
3x45f refers to specific star
20Terms
Logical expression that refers to an
object. Examples Constant symbols sun, earth,
mars, venus. Function symbols 3rdplanet(sun)
21Sentences
Statements or facts. Examples neighbor-planets
(earth,mars) neighbor-galaxies(milky-way,androme
da)
22Universal Quantifiers
How do we express properties of entire
collections of objects? Universal
quantification V
All stars are burning hydrogen V x star(x) ?
burning-hydrogen(x)
True in all extended interpretations.
23Existential Quantifiers
x Star(x) burning-hydrogen(x)
E
Normally Universal quantifier connects with
? Existential quantifiers connect to
24More on Quantifiers
We can use multiple quantifiers Vx Vy Star(x)
Galaxy(y) InGalaxy(x,y) ?
Contains(y,x)
Vx y Star(x) Star(y) Neighbor(x,y) All
stars have a neighbor star
E
25More on Quantifiers
De Morgans rules apply Vx P x P Vx P
x P Vx P x P x P Vx P
E
E
E
E
26Equality
x,y neighborStars(x,y)
neighborStars(y,x) (x y)
E
27Representing Knowledge with Calculus
- Knowledge-Based Agents
- Propositional Logic
- Predicate Logic
- Summary
28Summary
- Propositional logic talks about facts predicate
- logic talks about relations (more expressive)
- A model is made of objects, relations, and
- functions.
- An interpretation maps symbols to the model
- Complex sentences use connectives and
- quantifiers