230 likes | 247 Views
This research explores the integration of abductive reasoning and constraint optimization in SCIFF, showcasing how ALP and CLP can be combined for reasoning from effects to causes. The text delves into the practical applications and operational semantics of optimization in ALP, showcasing examples and strategies for effective implementation.
E N D
Integration of abductive reasoning and constraint optimization in SCIFF Marco Gavanelli – Università di Ferrara, Italy Marco Alberti – Universidade nova de Lisboa, Portugal Evelina Lamma – Università di Ferrara, Italy
Abductive Logic Programming • ALP = < KB, A, IC > • KB = logic program (set of clauses) • A = atoms without definitions, can be assumed • IC = Integrity constraints (usually, implications) KB ╞═ G KB ╞═ IC • Reasoning from effects to causes
Abductive Constraint Logic Programming • E.g., ALP+CLP(FD), • KB = { p(X) :- a(X), 1 ≤ X ≤ 2. } G = p(X)
Optimization in ALP • Find the best explanation, plan, … w.r.t. some given objective function • Syntax: min( X : p(X,Y) ) = M means M = min{ X : p(X,Y) }
Use the minimize predicate of CLP(FD) • Operational semantics p(X,Y) ok! X≤3 X≤3 X≤3 X=3
Implementation ok! • Depends on the implementation of ALP • CHR [Abdennadher&Christiansen, Christiansen&Dahl, Alberti et al., Badea et al.] • can call all the predicates of the host (CLP) language -> also minimize! • p(X) :- a(X), 1 ≤ X ≤ 2. min( X : p(X)) = M
Semantics of optimization • Semantics of optimization in CLP [Fages, Marriot&Stuckey] min( X : p(X,Y) ) • Naïve abductive semantics: min( X : p(X,Y) ) p(X,Y) not( p(X1,Y1), X1 < X ) KB ╞═p(X,Y) not( p(X1,Y1), X1 < X )
Naïve declarative semantics • KB = { p(X) :- a(X), 1 ≤ X ≤ 2. } ?- min(X : p(X)) = M KB |= p(X) not( p(X1), X1 < X ) KBÈ{a(1), a(2)} |= p(1) Ùnot(p(X1),X1<1) M=1 KBÈ{a(1)}|= p(1) Ùnot(p(X1),X1<1) M=1 KBÈ{a(2)} |= p(2) Ùnot(p(X1),X1<2) M=2
What is wrong? • We are not optimizing w.r.t. the set : • We want the minimum to be among all the possible sets . • Let us consider programs stratified both w.r.t. negation and optimization KB ╞═min( X : p(X,Y) )
3-valued completion H p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). False not True
3-valued completion H p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). False not True
3-valued completion H p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). False not True
3-valued completion for abducibles 2 1 p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). p(1) :- not q(1). not 3 4
Tp for optimization (simplified) • Given the atom min( X : p(X) ) = M • Suppose that all atoms from the grounding of p(X) are either true or false • then min( X : p(X) )=M is true iff: • there exists some value v such that • p(v) is true • there is no v’<vs.t. p(v’) is true with the same • there is no v’’<vs.t. p(v’’) is true with another . • (false otherwise)
Example: Game Theory • [Gavanelli et al. ECAI 2008]
Interactions? a(Ma,Xa),b(Mb,Xb)->Xa=Xb=f(Ma,Mb). max(Vb : a(Ma,Xa), min(Xb : b(Mb,Xb), ) = Vb ) max a(0) a(1) min b(0) b(1) b(0) b(1) 5 10 4 3 • true iff for each possible , there is no better value • Thus, the only option is ={a(1),b(1)} • Second player plays also the move of the first!
Solution Am • Add the set of literals Am that can be abduced “inside”min in the syntax: minAm ( X : p(X) ) ’’ • Suppose that all atoms from the grounding of p(X) are either true or false • then minAm( X : p(X) )=M is true iff: • there exists some value v such that • p(v) is true • there is no v’<vs.t. p(v’) is true with the same • there is no v’’<vs.t. p(v’’) is true with another ’’ ∆’’ ∩ (A \ ∆ ) ⊆ Am , ∆’’ ∩ (A \ Am ) = ∆ ∩ (A \ Am )
Interactions? max a(0) a(1) min max{a,b}(Vb : a(Ma,Xa), min{b}(Xb : b(Mb,Xb), ) = Vb ) • Now min{b} is • true in {a(0),b(o)} and {a(1),b(1)} • false in {a(1), b(0)} {a(0),b(1)} b(0) b(1) b(0) b(1) 5 10 4 3 Am={b} Am={b} b(0) b(1) a(0) a(1) b(1) b(0) ’’ ’’
Interactions? max a(0) a(1) min max{a,b}(Vb : a(Ma,Xa), min{b}(Xb : b(Mb,Xb), ) = Vb ) • Now min{b} is • true in {a(0),b(o)} and {a(1),b(1)} • false in {a(1), b(0)} {a(0),b(1)} • max{a,b} is true for {a(0),b(o)} b(0) b(1) 5 3 Am={b} Am={b} b(0) b(1) a(0) a(1)
Soundness • Soundness of success: if P├─∆G with abductive answer (∆, σ), then P |= ∆σGσ • Soundness of failure: if the SCIFFopt derivation for a goal G finitely fails, then PG • Proved for SCIFF, but should hold for most (sound) abductive procedures
Limitations We do not currently consider the following cases • Optimization goals in the conditions of integrity constraints: min( X : p(X,Y) ) -> … • Conjunctions of optimization atoms min( X : p(X) ), max( X : p(X) ) min( X : p(X),X>0 ), min( Y : q(Y),Y>0 ) p(X),q(X) -> false • Protected variables
Conclusions • First declarative semantics for abductive logic programming (ALP) with optimization (for finding the optimal ) • Proof of soundness of ALP+optimization • Proved for SCIFF, should hold for all (sound) abductive procedures • Directly usable in abductive proof-procedures implemented in CHR
Thank you for your attention! Questions?