430 likes | 580 Views
Logic for Knowledge Representation. Sindhu Kutty. Why Knowledge Representation?. What else is there?? Lack of motivation for ‘reinventing the wheel’! Declarative semantics. Logical AI. An agent’s knowledge of its world and goals represented by sentences in logic
E N D
Logic for Knowledge Representation Sindhu Kutty
Why Knowledge Representation? • What else is there?? • Lack of motivation for ‘reinventing the wheel’! • Declarative semantics
Logical AI • An agent’s knowledge of its world and goals represented by sentences in logic • Sound and complete inference rules lead to useful deductions • Epistemological and heuristic problems
Classical Logic • Logic of truth • Operators • ,,, • (ab) (ab) • Quantifiers • ,
Some examples • Everyone has a father childman father(man,child) • Everyone loves someone personsomeone loves(person,someone) • There is someone who everyone loves someoneperson loves(person,someone)
The truth about implication • The truth table • apple(x)fruit(x) Am I a liar if ‘x’ happens not to be an apple?
Classical Logic - Issues • Truth as opposed to knowledge • What does yx father(x,y) mean? • Is that enough?
Computability Logic - Motivation • The difference between • yx father(x,y) • ㄇyㄩx father(x,y)
Computability Logic • Logic of computability • Logic of interaction • Resource conscious • Some very expressive fragments are recursively enumerable • It captures constructive ability as distinct from truth
Semantics • Computational problems understood as games played by a machine against the environment • Representation: - environment ㄒ - machine
Elementary Games • Move • An observable action by an agent • Run • Sequence of moves • Legal runs • Even(5) • Who wins this? • What are the moves? • What is the run? Legal runs?
Elementary Games • Even(5) Even(4) • Who wins this? • What are the moves? • What is the run? Legal runs? • (Even(5) Even(4)) • Who wins this? Role reversal • What are the moves? • What is the run? Legal runs?
Constant Games • Even(5) ㄩ Even(4) • Choice disjunction • Who wins this? • What are the moves? • What is the run? Legal runs? • (Even(5) ㄇ Even(4)) • Choice conjunction • Who wins this? • What are the moves? • What is the run? Legal runs?
Games • Even(x) ㄩ Even(x) • Who wins this? • What are the moves? • What is the run? Legal runs?
Games • A game is a function from valuations to constant games • A valuation is a function from the set of variables to the set of constants
Games • A = Even(x) ㄩ Even(x) • A(x/5) • Who wins this? • What are the moves? • What is the run? Legal runs?
Choice Existential Quantifier • A = ㄩx (Even(x) ㄩ Even(x)) • <ㄒ5>(ㄩx (Even(x) ㄩ Even(x))) • <ㄒ2>( Even(5) ㄩ Even(5)) • Run • <ㄒ5, ㄒ2 > • ㄒ- won run
Choice Universal Quantifier • A = ㄇx (Even(x) ㄩ Even(x)) • < 5>(ㄇx (Even(x) ㄩ Even(x))) • <ㄒ2>( Even(5) ㄩ Even(5)) • Run • < 5, ㄒ2 > • ㄒ- won run • Run • <> • ㄒ- won run
Blind Quantifiers • A = x (Even(x) ㄩEven(x)) • What run makes this ㄒ- won ? • A = x (Even(x) ㄩEven(x)) • What run makes this ㄒ- won ?
Games • ㄇx ((Odd(x) ㄩ Odd(x)) → (Even(x) ㄩ Even(x))) • Who wins this? • Resource • x (Even(x) ㄩOdd(x) → ㄇy(Even(x*y) ㄩ Odd(x *y))) • Can this be won?
Interesting Observations! • A A is valid. Why? • For A = Even(5) • A ㄩA is not valid. Why? • The difference between • yx father(x,y) • ㄇyㄩx father(x,y)
CL4 • Operators used so far • CL4├ F iff F is valid • Uniform constructive soundness • Strong completeness • F* not computable for some interpretation
An example • ㄩxㄇy Has(x,y) • ㄇx(ㄩs Symptoms(x,s) ㄇt (Positive(x,t)ㄩ Positive(x,t)) ㄩy Has(x,y)) • How can ㄒ win this game?
Parallel Recurrence • Parallel Recurrence • A A A … or A • When does ㄒ win this?
Branching vs. Parallel Recurrence • Branching Recurrence • Legal run of A can be thought of as a tree where each branch spells a legal run • ㄒ wins iff it wins in all branches • Root is the empty run • Only has the capability of making a splitting move - easier for to win - why? • Which is easier for to win: • A or A? Why?
Some Examples • Potential knowledge of everyone’s gender • ㄇx(Female(x) ㄩ Female(x)) • Any difference if we say • ㄇx(Female(x) ㄩ Female(x))
Back to the Game… • ㄇx(ㄩs Symptoms(x,s) ㄇt (Positive(x,t)ㄩ Positive(x,t)) ㄩy Has(x,y))
Resource Consciousness • What if n tests were needed? • -conjunction of n identical conjuncts • What if an unbounded number of tests was needed? • ㄇt (Positive(x,t)ㄩ Positive(x,t))
Another Example • x (Red(x) Acid(x)) • x (Acid(x) Red(x)) • ㄇx(Red(x)ㄩRed(x)) • Does KB ㄇx(Acid(x)ㄩAcid(x))?
Possible Worlds Analysis • TRUE(KNOW(A,IMP(ACID,RES(DO(A,TEST),AND(ACID,RED))))) • TRUE(KNOW(A,IMP(NOT(ACID),RES(DO(A,TEST),AND(NOT(ACID),NOT(RED)))))) • TRUE(ACID) • Prove: TRUE(RES(DO(A,TEST),KNOW(A,ACID)))
Computability Logic • Epistemic variants of classical logic get messy • They are also non-semidecidable • The KNOW operator is not constructive
An Epistemic Variant • Axioms • M1 P, s.t. P is an axiom of ordinary propositional logic • M2 KNOW(A,P) P (knowledge axiom) • M3 KNOW(A,P) KNOW(A,KNOW(A,P)) (positive introspection axiom) • M4 KNOW(A,(PQ)) (KNOW(A,P) KNOW(A,Q)) (logical omniscience) • M5 If P is an axiom, then KNOW(A,P) is an axiom
Possible World Analysis • Individual propositions known by an agent • State of affairs compatible with what agent knows • Model theory
Accessibility Relation • K(A, W1, W2) Possible world W2 is compatible or consistent with what A knows in possible world W1 • For the following illustrations Agent A knows PW0 is the actual world • Goal: Capture axioms M1-M5 model-theoretically
Accessibility Relation - Definition • If agent A knows P in W0, then P is true in every accessible world P KA W1 P KA P W0 W2 KA P Wn
Accessibility Relation - Properties • M2 KNOW(A,P) P • If agent A knows P, then P is true a1 K(a1, W0, W0) KA P W0
Accessibility Relation - Properties • M4 KNOW(A,(PQ)) (KNOW(A,P) KNOW(A,Q)) • If P is true in every world W1 s.t. K(A,W0,W1) then A knows that P in the actual world P KA KA W1 P KA P W2 W0 KA P Wn
Accessibility Relation - Properties • M3 KNOW(A,P) KNOW(A,KNOW(A,P)) • a1 w1 w2 (K(a1, W0, w1) (K(a1, w1, w2) K(a1, W0, w2))) KA P KA P KA KA P KA KA P KA KA W0 P KA P KA
Accessibility Relation - Properties • M5 If P is an axiom, then KNOW(A,P) is an axiom • Generalize these constraints to hold not just for the actual world but for all possible worlds and for all agents
The Example Revisited • x (Red(x) Acid(x)) • x (Acid(x) Red(x)) • ㄇx(Red(x)ㄩRed(x)) • Then CL4├ KB ㄇx(Acid(x)ㄩAcid(x))
The Example Revisited • TRUE(KNOW(A,IMP(ACID,RES(DO(A,TEST),AND(ACID,RED))))) • TRUE(KNOW(A,IMP(NOT(ACID),RES(DO(A,TEST),AND(NOT(ACID),NOT(RED)))))) • TRUE(ACID) • Prove: TRUE(RES(DO(A,TEST),KNOW(A,ACID)))
To Sum Up • Classical Logic • Querying unnatural • Epistemic variants • not constructive • messy • Advantages of Computability Logic • Simplicity • Resource consciousness • Uniform Constructive Soundness of CL4
References • Japaridze, G. Introduction to computability logic. Annals of Pure and Applied Logic, 123 (2003), pp.1-99. • Japaridze, G. Computability logic: a formal theory of interaction, 2004. • Moore, R. A formal theory of knowledge and action, Formal Theories of Commonsense Worlds(1985), pp. 319-358. • McCarthy, J. Concepts of Logical AI, in progress.