23
Marco Gavanelli – Università di Ferrara, Italy Marco Alberti – Universidade nova de Lisboa, Portugal Evelina Lamma – Università di Ferrara, Italy

Integration of abductive reasoning and constraint optimization in SCIFF

Embed Size (px)

DESCRIPTION

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 > - PowerPoint PPT Presentation

Citation preview

Page 1: Integration of abductive reasoning and constraint optimization in SCIFF

Marco Gavanelli – Università di Ferrara, ItalyMarco Alberti – Universidade nova de Lisboa,

PortugalEvelina Lamma – Università di Ferrara, Italy

Page 2: Integration of abductive reasoning and constraint optimization in SCIFF

Abductive Logic ProgrammingALP = < KB, A, IC >

KB = logic program (set of clauses)A = atoms without definitions, can be

assumedIC = Integrity constraints (usually,

implications)

KB ╞═ G KB ╞═ ICReasoning from effects to causes

Page 3: Integration of abductive reasoning and constraint optimization in SCIFF

Abductive Constraint Logic ProgrammingE.g., ALP+CLP(FD),

KB = { p(X) :- a(X), 1 ≤ X ≤ 2. }

G = p(X)

0={a(1)} 1={a(2)} 2={a(1), a(2)}

KB |= p(1)

KB |= p(2)

KB |= p(1)

KB |= p(2)

Page 4: Integration of abductive reasoning and constraint optimization in SCIFF

Optimization in ALPFind the best explanation, plan, … w.r.t. some

given objective functionSyntax:

min( X : p(X,Y) ) = Mmeans

M = min{ X : p(X,Y) }

Page 5: Integration of abductive reasoning and constraint optimization in SCIFF

Use the minimize predicate of CLP(FD)Operational semantics

p(X,Y)

X=3

X≤3

X≤3

X≤3

ok!

Page 6: Integration of abductive reasoning and constraint optimization in SCIFF

ImplementationDepends on the implementation of ALPCHR [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)) = M0={a(1)} 1={a(2)} 2={a(1),

a(2)}

KB |= p(1)

KB |= p(2)

KB |= p(1)

KB |= p(2)

ok!

Page 7: Integration of abductive reasoning and constraint optimization in SCIFF

Semantics of optimizationSemantics 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 )

Page 8: Integration of abductive reasoning and constraint optimization in SCIFF

Naïve declarative semanticsKB = { p(X) :- a(X), 1 ≤ X ≤ 2. }

?- min(X : p(X)) = MKB |= p(X) not( p(X1), X1 < X )

KB{a(1)}|= p(1) not(p(X1),X1<1)

M=1KB{a(2)} |=

p(2) not(p(X1),X1<2)

M=2

KB{a(1), a(2)} |= p(1) not(p(X1),X1<1)

M=1

Page 9: Integration of abductive reasoning and constraint optimization in SCIFF

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) )

Page 10: Integration of abductive reasoning and constraint optimization in SCIFF

3-valued completionp(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

H

True

False

Page 11: Integration of abductive reasoning and constraint optimization in SCIFF

3-valued completionp(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

H

True

False

Page 12: Integration of abductive reasoning and constraint optimization in SCIFF

True

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).

3-valued completion

not

H

False

Page 13: Integration of abductive reasoning and constraint optimization in SCIFF

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).

3-valued completion for abducibles

not

1 2

3 4

Page 14: Integration of abductive reasoning and constraint optimization in SCIFF

Tp for optimization (simplified)Given the atom

min( X : p(X) ) = MSuppose that all atoms from the grounding of p(X)

are either true or falsethen min( X : p(X) )=M is true iff:

there exists some value v such thatp(v) is truethere is no v’<v s.t. p(v’) is true with the same there is no v’’<v s.t. p(v’’) is true with another

.(false otherwise)

Page 15: Integration of abductive reasoning and constraint optimization in SCIFF

Example: Game Theory

[Gavanelli et al. ECAI 2008]

Page 16: Integration of abductive reasoning and constraint optimization in SCIFF

Interactions?a(Ma,Xa),b(Mb,Xb)-

>Xa=Xb=f(Ma,Mb).

max(Vb : a(Ma,Xa),min(Xb : b(Mb,Xb), ) = Vb

)

5 10 4 3

a(0) a(1)

b(0) b(0)b(1) b(1)

max

min

• 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!

Page 17: Integration of abductive reasoning and constraint optimization in SCIFF

SolutionAdd 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 truethere is no v’<v s.t. p(v’) is true with the

same there is no v’’<v s.t. p(v’’) is true with

another ’’ ∆’’ ∩ (A \ ∆ ) ⊆ Am , ∆’’ ∩ (A \ Am ) = ∆ ∩ (A \ Am )

Am

’’

Page 18: Integration of abductive reasoning and constraint optimization in SCIFF

Interactions?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)}

5 10 4 3

a(0) a(1)

b(0) b(0)b(1) b(1)

max

min

Am={b}

’’

a(0)

b(0)

b(1)’’

a(1)

b(1)

b(0)

Am={b}

Page 19: Integration of abductive reasoning and constraint optimization in SCIFF

Interactions?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)}

5 3

a(0) a(1)

b(0) b(1)

max

min

Am={b}

a(0)

b(0)

a(1)

b(1)

Am={b}

Page 20: Integration of abductive reasoning and constraint optimization in SCIFF

SoundnessSoundness of success: if

P ├─∆ G

with abductive answer (∆, σ), thenP |= ∆σ Gσ

Soundness of failure: if the SCIFFopt derivation for a goal G finitely fails, then

P GProved for SCIFF, but should hold for most

(sound) abductive procedures

Page 21: Integration of abductive reasoning and constraint optimization in SCIFF

LimitationsWe do not currently consider the following casesOptimization goals in the conditions of

integrity constraints:min( X : p(X,Y) ) -> …

Conjunctions of optimization atomsmin( 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

Page 22: Integration of abductive reasoning and constraint optimization in SCIFF

ConclusionsFirst declarative semantics for abductive

logic programming (ALP) with optimization (for finding the optimal )

Proof of soundness of ALP+optimizationProved for SCIFF, should hold for all (sound)

abductive proceduresDirectly usable in abductive proof-procedures

implemented in CHR

Page 23: Integration of abductive reasoning and constraint optimization in SCIFF

Thank you for your attention!

Questions?