knowledge representation 최윤정
DESCRIPTION
KNOWLEDGE REPRESENTATION 최윤정. Knowledge Representation Methods. Declarative Methods --knowledge is knowing WHAT Logical Approach Predicate Calculus Nonstandard Logics Fuzzy Logic Non-Logical Approach Semantic Net Frame (procedural features) Conceptual Dependency. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/1.jpg)
KNOWLEDGE REPRESENTATION
최윤정
![Page 2: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/2.jpg)
Knowledge Representation Methods
2
Declarative Methods --knowledge is knowing
WHAT Logical Approach
Predicate Calculus Nonstandard Logics Fuzzy Logic
Non-Logical Approach Semantic Net Frame (procedural features) Conceptual Dependency
Procedural Methods --knowledge is
knowing HOW
PLANNER, CONNIVER Rule-based systems
![Page 3: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/3.jpg)
Semantic Net(1/3) (Quillian(1968) Psychological Model)
3
Basic Constructs Node-Object, Concept Links-Relation
property inheritance-Property Inheritance is the main inference
mechanism!
Tweety Robin Bird
Wings Wings Wings
isa
isa has-part
![Page 4: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/4.jpg)
Semantic Net(2/3)4
Example
Furniture Furniturestore
SeatChair
My-ChairPark
Person Leather Black
Sold-by
has-part
isa
isa
ownerisa cover
Color
![Page 5: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/5.jpg)
Semantic Net(3/3)5
Internal Representation(LISP) My-Chair: ((ISA CHAIR)(COLOR BLACK) (OWNER PARK)(COVER LEATHER)) Chair: ((ISA FURNITURE)(HASPART SEAT))
(get `My-CHAIR `COLOR)= `BLACK
![Page 6: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/6.jpg)
Action and Event(1/2)6
“John gave the book to Mary.”
Event
EV-1 BK-1 BookJohn
Mary
Give Past
isaobject isaagen
t
beneficiary
action
time
![Page 7: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/7.jpg)
Action and Event(2/2)7
“John is taller than Bill.”
John Bill
John Bill
H1 Number H2
Is-taller
height
isa isa
height
greater-than
![Page 8: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/8.jpg)
Reasoning with Semantic Nets(1/2)
8
Spreading Activation
“What is the relation between John and Mary?”
John ? Mary
![Page 9: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/9.jpg)
Reasoning with Semantic Nets(2/2)
9
Matching
Fact Goal Net
Direct Match vs. Semantic Match What is Tweety?
Tweety Robin Bird
Tweety ?
isa isa
isa
isa
![Page 10: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/10.jpg)
Problems of Semantic Net(1/2)10
1. Different people use different nets to represent the same thing.
John Mary
Marriage
Event
M1John Mary
married
isa
isa
femalemale
![Page 11: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/11.jpg)
Problems of Semantic Net(2/2)11
2. Same Net interpreted differently by different person.
3. Quantification
Jack TomFather-of
![Page 12: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/12.jpg)
Dealing with Exceptions(1/2)
12
Fly
Bird
Ostrich
Henry
Exception node
CAN
ISA
ISA
![Page 13: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/13.jpg)
Dealing with Exceptions(2/2)
13
Inferential Distance(Touretzky)
Grey
Elephant
Royal Elephant
Circus Elephant
Clyde
isa
COLOR
ISA
ISA
ISA
![Page 14: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/14.jpg)
Frame (1/2) -Minsky14
Slot-Filler Concept : Typical Expected Situation
[frame: Vehicle ISA: Object Slots: (Weight (a wt-measure)) (color (a color(default black))) (number-of-wheel (a integer))]
[frame: Trailer-Truck ISA: Vehicle Slots: (trailer-size (a length-measure)) (weight (default 8)) (number-of-wheel (default 18))]
[frame: Sedan ISA: Vehicle Slots: (number-of-
wheel 4)]
[frame: My-truck instance-of: Trailer-
Truck Slots: (trailer-size = 12) (color red)]
![Page 15: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/15.jpg)
Frame(2/2)15
Object
Vehicle
Trailer-truck
My-Truck
weight=color= blackwheel=
weight=8trailer-size=wheel=18Color=black
Weight=8Trailer-size=12Wheel=18Color=red
ISA
ISA
ISA
![Page 16: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/16.jpg)
Procedural Attachment(1/2)-Procedural knowledge is attached to slots
16
If-Added: Triggered to fill in If-Needed: Triggered when filled in If-Modified: Triggered when changed
Employee: ISA: Person Sex: (M, F) Birthday: Date
Age: integer If-Needed: CALC-AGE
Skill: code If-Added: ADD-TO-SKILL-FILE
![Page 17: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/17.jpg)
Procedural Attachment(2/2)17
Proc CALC-AGE; x:= get-current-year; y:= get-birth-year; age:= x-y end;
Proc ADD-TO-FILE; c:= get-code; open-file(skill); put-file(c, skill) end;
![Page 18: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/18.jpg)
LOGICAL PRELIMINARIES18
LOGIC- ARTIFICIAL LANGUAGE TALKING ABOUT “TRUTH”
LOGIC AS LANGUAGE SYNTAX(GRAMMAR) -Symbol -WFF(Well Formed Formula) -Deductive Closure -Proof Theory SEMANTICS -Meaning -Model -Validity, Consistency -Model Theory
LOGIC AS A PROGRAMMING LANGUAGE SYNTAX SEMANTICS
![Page 19: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/19.jpg)
LOGIC - LANGUAGE and its MEANING19
LOGIC LANGUAGE MODEL
PROPOSITIONALLOGIC
PREDICATECALCULUS
MODAL LOGIC
P, Q, P->Q(P->((-Q->R) ∨P))
Variables x,yFunctions f, gPredicates P,QQuantifiers ∀,∃
ᄆ P, ◇P
Truth Assignment
First Order Structure<D,C,F,P>
Kripke Structure<W, R, V>
Possible WorldSemantics
![Page 20: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/20.jpg)
PROPOSITIONAL LOGIC (1/2)20
(P∧Q)R
P Q R P∧Q (P∧Q)->R F F FF F TF T F
F T T T F F T F TT T FT T T
F TF TF TF TF TF T
T [F]T T
Falsifying Model
![Page 21: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/21.jpg)
PROPOSITIONAL LOGIC (2/2)21
((PQ)∧~Q)~P
VALID TRUE in Every Model(Tautology) INCONSISTENT FALSE in Every Model CONSISTENT TRUE in at least ONE Model
VALID INVALID INCONSISTENT CONSISTENT (Unsatisfiable) (Satisfiable)
P Q P->Q (P->Q)∧~Q ((P->Q) ∧~Q)->~PF FF TT FT T
T T T T F T F F T T F T
![Page 22: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/22.jpg)
FORMAL SYSTEM22
Well Formed Formula Language
AXIOM + THEOREM ├ AINFERENCE RULES
VALID ╞ A
PROOF THEORY MODEL THEORY
THEOREM VALID SOUNDNESS (→) COMPLETENESS (←)
![Page 23: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/23.jpg)
Types of Logical Reasoning23
Deduction Given A, AB infer B Induction Given A, B find the rule AB Abduction (Not logically valid!) Given AB, B infer A Refutation Proof
![Page 24: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/24.jpg)
Proof by Cases24
Is there a Red Box right next to a Non-Red Box?
?
![Page 25: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/25.jpg)
Refutation Proof25
A, AB want to prove B
Assume ¬B and find a contradiction
Most Common Method using Computer- Resolution, Tableau Method etc.
![Page 26: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/26.jpg)
PROVING VALIDITY in PROPOSITIONAL LOGIC
26
1. TRUTH TABLE 2. TABLEAU METHOD 3. SEQUENT CALCULUS 4. RESOLUTON
![Page 27: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/27.jpg)
TABLEAU METHOD27
Refutation Method(Assuming FALSE and draw CONTRADICTION)
(( P Q) ∧ -Q ) -P
F T F
T T TT F CONTRADICTION
![Page 28: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/28.jpg)
RESOLUTION (Robinson)28
A B, B C, A C?
-A ∨ B A-B ∨ C -C
-A ∨ C
C
![Page 29: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/29.jpg)
Example 1 (1/2)29
“Head I win, Tail you lose.”Prove I win.H: headT: tail H WW: I win T LL: You lose(Hidden information)H ∨ TW LL W
![Page 30: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/30.jpg)
Example 1 (2/2)30
-H∨W -T∨L H∨T -W∨L -L∨W -W
HW
~T
~L
![Page 31: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/31.jpg)
Example: Lion Sleeps Tonight31
Lion always sleeps except when he is hunting.
Lion cannot sleep when he is hungry. When he is tired he cannot hunt. Lion is tired when he does not sleep. Prove Lion is not hungry.
![Page 32: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/32.jpg)
Resolution Strategies (1/4)32
1. UNIT RESOLUTION (Wos) Not complete
UNIT PREFERENCE RESOLUTION Unit clause always reduces the size!
P ∨ Q P ∨ -Q -P ∨ Q
P
Q -Q
-P ∨ -Q
![Page 33: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/33.jpg)
Resolution Strategies (2/4)33
2. INPUT RESOLUTION Not complete
INPUT CLAUSES HAVE MEANINGFUL INFORMATION
P
Q -Q
INPUT CLAUSES
P ∨ Q P ∨ -Q -P ∨ Q -P ∨ -Q
![Page 34: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/34.jpg)
Resolution Strategies (3/4)34
3. LINEAR RESOLUTION(Loveland) Chain of Reasoning
Depth First COMPLETE
P
Q-P
P ∨ Q P ∨ -Q -P ∨ Q -P ∨ -Q
![Page 35: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/35.jpg)
Resolution Strategies (4/4)35
4. LOCK RESOLUTION(BOYER) COMPLETE Index every literal (Lock) : consider smallest
P1 Q2 P3 -Q4 -P6 Q5
-P6
Q2 -Q4
-P8 -Q7
![Page 36: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/36.jpg)
Predicate Calculus36
Variable : object x, y, z, .. Constant : a, b, c, tom, 1, 2, .. Function : f, g, h, father(tom),… Predicate : P, Q, R Quantifier : ∀, ∃
![Page 37: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/37.jpg)
Well Formed Formula37
Term constant, variable, f(t1, .. tn): ti term Atom P(t1,..tn) Formula(wff) 1. atom 2. F∨G, -F, FG 3. (∀x)F, (∃x)F
![Page 38: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/38.jpg)
Nested Quantifiers38
Describe each statement ∀x ∀y Love(x, y)
∀x ∃y Love(x, y)
∃x ∀y Love(x, y)
∃x ∃y Love(x, y)
∀x ∃y Love(y, x)
∃x ∀y Love(y, x)
Negation of these?
![Page 39: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/39.jpg)
Symbolize the Statement39
Every rational number is a real number. There exists a number that is prime. For every number x, there exists a number y such that x<y. Not every real number is a rational number. Everybody has somebody who loves him. There is someone whom everybody loves. Mimi loves only those who is younger than her. Everyone who eats BigMac listens Jazz music.
![Page 40: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/40.jpg)
Clausal Form Conversion40
1. Eliminate 2. Reduce the scope of ~ 3. Rename the variables 4. Move quantifiers to the left
(prenex normal form) 5. Eliminate ∃ : Skolemize 6. Eliminate ∀ 7. Conjunctive Normal Form
![Page 41: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/41.jpg)
Reducing the Scope of ~41
~ (p ∧ q) = ~p ∨ ~q ~ (p ∨ q) = ~p ∧ ~q
~ Q1Q2..Qn P(x,y,..) = Q’1Q’2..Q’n ~P(x,y,..) where Q’ = ∃ if Q=∀ ∀ if Q= ∃
![Page 42: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/42.jpg)
Prenex Normal Form42
Prenex normal form:
Q1Q2..Qn P(x,y,..) where Q i = ∀, ∃
∀x (P(x) ∨ ∀y (Q(y)))
= ∀x ∀y (P(x) ∨ Q(y))
∀x (P(x) ∨ ∃y (Q(x, y)))
= ∀x ∃y (P(x) ∨ Q(x, y))
![Page 43: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/43.jpg)
Skolem Function43
Eliminating ∃’s
∃x P(x) P(sk1) : sk1 is skolem constant ∃x ∀y P(x,y) ∀y P(sk1, y) ∀y ∃x P(x,y) ∀y P(sk1(y),y) ∀x ∃y ∀z ∃w P(x,y,z,w) ∀x ∀z P(x,sk1(x),z,sk2(x,z))
![Page 44: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/44.jpg)
Example : Clausal Form44
∀x((∀y P(x,y) ~∀y(Q(x,y) R(x,y)))
∀x( ~∀y P(x,y) ∨ ~∀y (~Q(x,y) ∨ R(x,y))) … (1)
∀x( ∃y ~P(x,y) ∨ ∃y (Q(x,y) ∧~R(x,y))) … (2)
∀x( ∃y ~P(x,y) ∨ ∃z (Q(x,z) ∧~R(x,z))) … (3)
∀x∃y∃z (~P(x,y) ∨((Q(x,z) ∧~R(x,z))) … (4)
∀x(~P(x,s1(x))∨((Q(x,s2(x))∧~R(x,s2(x)))) … (5)
~P(x,s1(x))∨((Q(x,s2(x))∧~R(x,s2(x))) … (6)
(~P(x,s1(x))∨Q(x,s2(x)))∧(~P(x,s1(x))∨~R(x,s2(x)))
![Page 45: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/45.jpg)
Matching45
Rule : Mother(x, y) Like(x, y)
“Every Mother Like their Son” Fact
Like(Joe, Jack), Like(Kim, Mary)
Mother(Judy, Jack), Mother(Mary, Jay) Query
Like(Judy Jack)?
Like(Mary, ?)
![Page 46: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/46.jpg)
Unification(2-way Matching)46
Find a substitution σ(unifier) which makes two clause equal
Essential step for Resolution of Predicate Calculus Usually unification tries to find a most general unifier
![Page 47: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/47.jpg)
Most General Unifier (mgu)47
Substitution : σ C = Like(x, father(x)) σ = {jack/x} C • σ = Like(Jack, father(Jack)) C, D are unifiable iff there is σ s.t. C • σ = D • σ (σ is called unifier) Mgu least specific unifier Like(x, y), Like(Jack, y) σ1={Jack/x}, σ2={Jack/x, Mary/y}
![Page 48: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/48.jpg)
Unification - Examples48
Like(x, y) Like(joe, father(joe))Like(jack, y) Like(x, father(x))Like(x, father(x)) Like(joe, y)Like(x, father(joe)) Like(jack, father(y))Like(x, father(x)) Like(jack, father(joe)) Like(x, father(x)) Like(father(y),z)Like(x, x) Like(father(z), z) ?
![Page 49: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/49.jpg)
Factoring49
If 2 literals in a clause C have mgu σ then C • σ is called a factor of C If C = P(x) ∨ P(f(y)) ∨ ~Q(x) Then σ = {f(y)/x} P(f(y))∨P(f(y))∨~Q(f(y)) P(f(y))∨~Q(f(y)) : factor of C
![Page 50: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/50.jpg)
Subsumption50
Clause C subsumes D iff
∀ C D
(A ∧ B) subsumes A
A subsumes A ∨ B Subsumed clause can be deleted C=P(x) D=P(a) delete P(a) Note: factoring – within a clause
subsumption – between two clauses
![Page 51: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/51.jpg)
Example51
1. All KU students are handsome&pretty.
2. Kim only likes an intelligent girl.
3. Pretty girls do not read books.
4. Intelligent girls are either good reader or music lovers.
5. Kim likes Mimi who attends to KU.
* Prove that Mimi is a music lover
E(x): KU students P(x): Pretty
B(x): Book reader M(x): Music lover
Like(x, y): x likes y I(x): intelligent
![Page 52: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/52.jpg)
Example - Skolemize52
Customer officials search everyone who entered the country who is not a VIP
Some of the drug dealers entered the country and they were only searched by drug dealers.
No drug dealer was a VIP Conclusion: Some of the officials were drug dealers.
E(x) : x entered the country V(x): VIP
C(x) : custom official D(x): drug dealer
S(x,y): x searched y
![Page 53: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/53.jpg)
Types of Question - Resolution53
Type1: Yes/No Question “Is Mimi a Music Lover?” Type2: Short Answer “Who is a Music Lover?” Use special predicate: Ans(x) Type3: How to type Question
![Page 54: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/54.jpg)
Type2 Question54
Every Pompeian died in 79. Marcus was a Pompeian. When was Marcus died?
~Died(marcus, x) ∨ Ans(x)
![Page 55: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/55.jpg)
Type3:Monkey Banana Problem
55
P(x, y, z, s) : x: monkey y: banana z: chair s: state R(s) : monkey reachable to banana at s Functions walk(l1, l2, s) : at state s, monkey walk from l1 to l2 carry(l1, l2, s) : carry chair from l1 to l2 climb(s) : at s, monkey climb to the chair
![Page 56: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/56.jpg)
Monkey – continue56
P(x,y,z,s) P(z,y,z, walk(x,z,s))P(x,y,x,s) P(y,y,y, carry(x,y,s))P(kit,kit,kit,s) R(climb(s))P(liv, kit, din, s1)R(x) Ans(x)-----Ans(climb(carry(din,kit,(walk(liv,din,s1)))))
![Page 57: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/57.jpg)
Merit of using Logic as KR57
Flexible (Rich) Representation Natural Language > Logic Formula Note: flexibility is also a weak point of logic
Powerful Inference Mechanism Resolution, Graphical methods
Theoretical Background Solid
![Page 58: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/58.jpg)
Weak Points of Logic a KR58
Too Rigid (Not Flexible) - no contradiction - no exception - no change
Complexity - NP-complete Horn-clause (restricted form)
![Page 59: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/59.jpg)
Spin-off Products of Logic59
Prolog Language - Specification Language - Horn clause
Knowledge-base Systems - Rules & Inference Engine
New Breed of Logics
![Page 60: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/60.jpg)
Real World vs Logic World60
Dynamic - Static
- keeps on changing Incomplete Knowledge
- implicit vs explicit, Default Rules, Closed World Assumption
Belief vs Truth Non-monotonic vs Monotonic Uncertainty – Statistical Reasoning
![Page 61: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/61.jpg)
TMS (1/2)61
Truth Maintenance System - Doyle
Intended to Model Belief Changes Information is linked together by its justifications Dependency-directed backtracking Basic Data Structure
Node: belief Justification: reason to believe http://www.aistudy.com/problem/exercise/%
EC%A7%84%EB%A6%AC%EA%B0%92%20%EC%9C%A0%EC%A7%80%20%EC%8B%9C%EC%8A%A4%ED%85%9C.htm
http://www.aistudy.com/ai/logic_rich.htm
![Page 62: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/62.jpg)
TMS (2/2)62
2 states of node IN – current belief OUT – not believed (cf. believed to be not true)
A node is assigned a justification set A node is IN iff there is at least one valid
justification A node is OUT iff there is no valid justification
![Page 63: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/63.jpg)
SL justification (1/3)63
(SL (list of IN-nodes)(list of OUT-nodes)) SL-justification is valid if all the nodes in the IN-node list
are currently IN, and those in the OUT-node list are OUT.
Statement-1: (SL (x)(y)) Meaning:
If x is believed and y is not believed, the statement-1 is believed.
![Page 64: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/64.jpg)
SL justification (2/3)64
Special nodes: Premise – nodes with (SL ()()) always IN Assumption – nodes with nonempty OUT-list which is
currently IN. (Default Rule) eg. 1. There is other schedule 2. I will be at the party. (SL ()(1))
“Unless there is other schedule, I will be at a party.”
![Page 65: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/65.jpg)
SL justification (3/3)65
1. X : (SL (2)()) : If Y Then X (normal rule) 2. Y
1. X : (SL ()(2)) : X unless Y (strong default rule – CWA)
2. Y 1. X: (SL (2)(3)) : If Y Then X Unless Z (default
rule) 2. Y 3. Z
![Page 66: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/66.jpg)
Example 1- Dream66
If I win Lotto, I’ll be Rich unless it is a Dream.
1. Rich : (SL (2)(3)) 2. Lotto Win! 3. Dream I win Lotto!!!
1. Rich : (SL (2)(3)) 2. Lotto Win! ------------- (SL ()()) 3. Dream I pinched myself, and woke up.. 1. Rich : (SL (2)(3)) 2. Lotto Win! (SL()()) 3. Dream -----------------(SL ()())
![Page 67: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/67.jpg)
Example 267
1. It is winter OUT 2. It is cold (SL(1)(3)) OUT 3. It is warm (SL(4)(2)) IN 4. It is summer (SL()(1)) IN
It is winter. 1. It is winter (SL()()) IN 2. It is cold (SL(1)(3)) ? 3. It is warm (SL(4)(2)) ? 4. It is summer (SL()(1)) ?
It is warm outside. 1. It is winter (SL()()) IN 2. It is cold (SL(1)(3)) ? 3. It is warm (SL(4)(2)) (SL()()) IN 4. It is summer (SL()(1)) ?
![Page 68: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/68.jpg)
Example 3 (1/5)68
This is how Mimi likes to see as her marriage partner. Not OK unless she really likes him. She likes a rich man as long as he doesn’t have a problem. She likes a man if he is healthy and kind as long as he does not
have a problem and is not the eldest son. A man is problematic if he is older than 35 unless he is
exceptional. Married man is problematic Love is an exception.
![Page 69: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/69.jpg)
Example 3(2/5)69
Nodes: 1. Not OK (SL()(2)) OUT IN 2. She likes him (SL(3)(4)) (SL(5,6)(4,7)) OUT 3. He is rich OUT 4. He has a problem (SL(8)(9)) (SL(10)()) OUT 5. He is healthy OUT 6. Kind OUT 7. The eldest son OUT 8. Older than 35 OUT 9. Exception (SL(11)()) OUT10. Married OUT11. Love OUT
![Page 70: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/70.jpg)
Example 3(3/5)70
He looks healthy and kind 1. Not OK (SL()(2)) IN -- OUT 2. She likes him (SL(3)(4)) (SL(5,6)(4,7)) OUT -- IN 3. He is rich OUT 4. He has a problem (SL(8)(9)) (SL(10)()) OUT 5. He is healthy(SL()())IN 6. Kind (SL()())IN 7. The eldest son OUT 8. Older than 35 OUT 9. Exception (SL(11)()) OUT10. Married OUT11. Love OUT
Currnet belief:He is healthy and kindShe likes him --- OK
![Page 71: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/71.jpg)
Example 3(4/5)71
His age is 38! 1. Not OK (SL()(2)) OUT -- IN 2. She likes him (SL(3)(4)) (SL(5,6)(4,7)) IN -- OUT 3. He is rich OUT 4. He has a problem (SL(8)(9)) (SL(10)()) OUT -- IN 5. He is healthy IN 6. Kind IN 7. The eldest son OUT 8. Older than 35 (SL()())IN 9. Exception (SL(11)()) OUT10. Married OUT11. Love OUT
![Page 72: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/72.jpg)
Example 3(5/5)72
Mimi finds herself that she is in love with him. 1. Not OK (SL ()(2)) IN -- OUT 2. She likes him (SL(3)(4)) (SL(5,6)(4,7)) OUT -- IN 3. He is rich OUT 4. He has a problem (SL(8)(9)) (SL(10)()) IN -- OUT 5. He is healthy IN 6. Kind IN 7. The eldest son OUT 8. Older than 35 (SL()())IN 9. Exception (SL(11)()) OUT -- IN10. Married OUT11. Love (SL()())IN
-- So they married, and happily there
after …
![Page 73: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/73.jpg)
Cyc : KB for Commonsense73
Lenat,D (MCC) Limitation of Logic
Predicate Symbol – No Semantics
Need More Background Knowledge Build a Huge Knowledgebase to cover human everyday
commonsense Enough to Understand –
Newspaper Article or Encyclopedia
![Page 74: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/74.jpg)
Cyc: Structure74
Cyc KB – Knowledgebase CycL – Representation Language Environment (UE, MUE) Interface Editing/BrowsingUE: Spread Sheet TypeMUE: Museum Type (Graphic)(Note: Cyc Needs Lot of Update/Expansion)
![Page 75: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/75.jpg)
CycL : Cyc Language75
CycL is Frame-Based Slot-Value Texas capital: (Austin) residents: (Fred Tom Park) stateOf: (UnitedStatesOfAmerica)
![Page 76: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/76.jpg)
CycL (2)76
Constraint Language (on Top of Frame) Predicate Calculus Type (#%ForAll x #%Number (#%LogImplication (#%GreaterThan x 1) (#%GreaterThan (#%NumOfDiv x) 1)))
![Page 77: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/77.jpg)
Constraint Language77
First Order Logic ‘All of Fred’s Friends are artists’(#%ForAll x(#%Fred #%friends) (#%allInstanceOF x #%Artist))
‘Some of Fred’s Friends are artists’(#%ThereExists x(#%Fred #%friends) (#%allInstanceOF x #%Artist))
![Page 78: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/78.jpg)
Frame Types of Cyc78
Normal Texas, Fred, Red, Walking.. Etc. SlotUnit Frames to Define Slots SeeUnit Meta-level Info for certain slot of a unit SlotEntryDetail SeeUnit for a member of slot entry (eg. Park of resident slot of Texas frame)
![Page 79: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/79.jpg)
Slot Unit79
Slot Frame is a Frame about a Slot Define, Constraints, Interrelationships among SlotsResidents instanceOf: (Slot) inverse: (residentOf) entryIsA: (Person) …..
![Page 80: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/80.jpg)
SeeUnit80
Metalevel Information for particular slot for particular unit (footnote)
Texas capital: (Austin) *residents: (Tom Jack Park..) … SeeUnitFor-residents.Texas instanceOf: (SeeUnit) modifiesUnit: (Texas) *rateOfChange: ..
![Page 81: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/81.jpg)
SlotEntry-Details81
Similar to SeeUnit except it talks about single entry of a slot
Texas capital: (Austin) residents: (Tom Jack *Park..) … SeeUnitFor-Park∈residents.Texas instanceOf: (SlotEntryDetailTypeofSeeUnit) modifiesUnit: (Texas) modifiesSlot: (residents) modifiesEntry: (Park) …
![Page 82: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/82.jpg)
Inference in CycL82
What Does Cyc “Do”? More than 20 Special Purpose Inference
Schemes Inheritance Automatic Classification Constraint Maintenance TMS Guessing by Closed World Assumption Analogy Reasoning
![Page 83: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/83.jpg)
Meta-Level Inference83
Inference Schemes are Divided into Several Levels
Simple and Fast Schemes are Used before more Slow and Complex Ones
Level1: Simply Access the Data Structure Level2: Inheritance Level3: Subsumption, Classification Level4: Constraint …. Level n : Analogy, Guess, etc.
![Page 84: KNOWLEDGE REPRESENTATION 최윤정](https://reader035.vdocuments.net/reader035/viewer/2022062502/56814acd550346895db7e3e3/html5/thumbnails/84.jpg)
Cyc Review84
First Attempt for Global Ontology Frame-based Mixture of Inference Reference: ‘Building Large Knowledge-Based Systems’ by
Lenat & Guha