Download presentation
Presentation is loading. Please wait.
1
A I (Artificial Intelligence)
Professor I. J. Chung
2
AI (Artificial Intelligence)
Knowledge Representation Logical representation : Formal logic ( 1st order predicate calculus ) Inference rules and proof procedures Prolog Logic program as KBS / ES Variety : parallel logic program. Declarative representation. cf: Ada ( spec. + body ) Artificial Intelligence
3
AI (Artificial Intelligence)
Procedural representation : set of instructions for solving problems. If … then … else structure in RBS. Production system. Procedure for solving a goal in a problem domain. Network representation : Graph representation with nodes (objects) and arcs (representation). Semantic network, conceptual dependencies, conceptual graphs. Artificial Intelligence
4
AI (Artificial Intelligence)
Structured representation : Extension of network representation With a complex data structure consisting of slots and attached values. Script, frame, objects Artificial Intelligence
5
AI (Artificial Intelligence)
Logical representation schemes : English predicate calculus prolog and ∧ , or ∨ ; only if ← := not not E.g. spot is a dog dog ( spot ). Artificial Intelligence
6
AI (Artificial Intelligence)
E.g. 1) Marcus was a person. person ( marcus ). 2) Marcus was a pompeian. pompeian (marcus ). 3) All pompeian were Romans. ∀x pompeian(x) → roman(x) pompeian(x) ∨ roman (x) 4) Caesar was a ruler. ruler(caesar) Artificial Intelligence
7
AI (Artificial Intelligence)
5) All Romans were either loyal to Ceasar or hated him. ∀x roman(x) → (loyalto(x,caesar) ∨ hate(x,caesar)) ~roman(x) ∨ loyalto(x,caesar) ∨ hate(x,caesar) : clausal form 6) everyone is loyal to someone. ∀x ∃y loyalto (x,y) loyalto (x,f(x)) Skolem function 7) People only try to assassinate rulers they are not loyal to ∀x ∀y : person(x) ∧ ruler(y) ∧ trytoassassinate(x,y) → ~loyalto (x,y) ~person(x) ∨ ~ruler(y) ∨ ~trytoassassinate(x,y) ∨ ~loyalto(x,y) Artificial Intelligence
8
AI (Artificial Intelligence)
8) Marcus tried to assassinate Caesar. trytoassassinate(marcus,caesar) Question : “Did Marcus hate Caesar?” hate(marcus, caesar) 9) ~hate(marcus,caesar) Robinson’s resolution (pf. By contradiction) : negate the hypothesis to be proved & derive the contradiction (empty clause) Artificial Intelligence
9
AI (Artificial Intelligence)
Artificial Intelligence
10
AI (Artificial Intelligence)
Refutation graph : unsatisfiable set S={B(x),~B(x)∨C(x),~C(a)∨D(b), ~C(c)∨E(d),~D(x)∨~E(y)} Artificial Intelligence
11
AI (Artificial Intelligence)
Clausal form : well-formed formula of predicate calculus → clause form (∀x){P(x) ⇒ {(∀y){P(y) ⇒ P(f(x,y))} ∧ ~(∀y){Q(x,y) ⇒ P(y)}}} Eliminate implication sign A ⇒ B ⇔ ~A∨B (∀x){~P(x)∨{(∀y){~P(y) ∨ P(f(x,y))} ∧ ~(∀y){~Q(x,y) ∨ P(y)}}} Reduce scopes of negation signs ∴ (∀x){~P(x)∨{(∀y){~P(y)∨P(f(x,y))}∧(∃y){~{~Q(x,y)∨P(y)}}}} (∀x){~P(x)∨{(∀y){~P(y)∨P(f(x,y))}∧(∃y){Q(x,y)∧~P(y)}}} Standardize variables (∀x){~P(x)∨{(∀y){~P(y)∨P(f(x,y))}∧(∃w){Q(x,w)∧~P(w)}}} Artificial Intelligence
12
AI (Artificial Intelligence)
Eliminate existential quantifier (∀y) (∃x) P(x,y) (∀y) P(g(y),y) Skolem function ∴(∀x){~P(x)∨{(∀y){~P(y)∨P(f(x,y))}∧{Q(x,g(x))∧~P(g(x))}}} Convert to prenext form : (∀x∀y){~P(x)∨{{~P(y)∨P(f(x,y))}∧{Q(x,g(x))∧~P(g(x))}}} prefix Put matrix in CNF (∀x∀y){~P(x)∨~P(y)∨P(f(x,y))} ∧{~P(x)∨Q(x,g(x))}∧{~P(x)∨~P(g(x))}} Eliminate the universal quantifier & ‘and’ sign ∴ ~P(x)∨~P(y)∨P(f(x,y)) ~P(x)∨Q(x,g(x)) ~P(x)∨~P(g(x)) matrix Artificial Intelligence
13
AI (Artificial Intelligence)
Logic program Program paradigm where logical assertions are viewed as programs (Declarative Semantics) ATP with formal knowledge representation defined over 1st order calculus. Robinson’s resolution rule Logic itself is a PL. (declarative semantics) Prolog : verification, validation, proving them. Produce call : -q1,q2,…,qk ~q1∨~q2∨…∨~qk Logic : ‘what’ part control : ‘how’ part cf.Ada Artificial Intelligence
14
AI (Artificial Intelligence)
Problem of logic program Control problem : needs to provide a control information with extra-logical control features. Negation problem : imperfect version of NAF NAF : p.176 下 CWA : if ground atom A is not a logical consequence of program then infer ~A E.g. student (Kim) student (park) since student (lee) is not a logical consequence., we infer ~student (lee) Artificial Intelligence
15
AI (Artificial Intelligence)
Prolog : logical assertions Horn clause p:-q1,q2,…,qk ≡ p∨~q1∨~q2∨…∨~qk List: [ ] rather than ( ) sum ([ ],0) sum ([H|T],X) :- sum (T,Y), add (H,Y,X) sum of elements of the list add (X,Y,Z) :- Z is X+Y max ([ ],0) :- max ([H|T],X) :- max (T,N), comp (H,N,X) max of the list comp (X,Y,Z) :- X >= Y, Z is X comp (X,Y,Z) :- Z is Y Artificial Intelligence
16
AI (Artificial Intelligence)
fibo (0,0) :- ! fibo (1,1) :- ! fibo (X,Y) :- X1 is X-1, X2 is X-2, fibo (X1,Y1), fibo (X2,Y2), y is Y1+Y2 power (m,o,1) :- ! power (m,n,c) :- n1 is n-1, power (m,n1,c1), mn c is c1*m Artificial Intelligence
17
AI (Artificial Intelligence)
append ([ ],X,X) append ([X|XS],YS,[X|ZS]) :- append (XS,YS,ZS) :- append ([a,b],[c],[a,b,c]) 2 :- append ([b],[c],[b,c]) :- append ([ ],[c],[c]) 1 (SLD-tree) Artificial Intelligence
18
AI (Artificial Intelligence)
SLD-tree for PU{G} via R P: program, G:goal, R:rule ∀ node of the tree is a goal root is G :- A1,A2,…,Am,Ak Am :- Ba,…,Bq :- (A1,…,Am-1,B1,…,Bq,Am+1,…,Ak) Θ E.g. p(x,z) :- q(x,y), p(y,z) p(x,x) q(a,b) goal : :- p(x,b) Artificial Intelligence
19
AI (Artificial Intelligence)
AND-parallelism : computation rule in which pwc. Are evaluated concurrently. OR-parallelism : parallelism in the search rule → several clauses can be fired an currently Artificial Intelligence
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.