0

Im trying to implement the logic of AA grounded extension in prolog logic but I can't figure out how to do it. I have some arguments "argument(a)", "argument(b), and some attacks attacks(a,b). I wan't to check if an argument belongs to the grounded extensions or not. The definition is a grounded extension is:

  1. A set of arguments S is admissible if it doesn't attack itself and attacks all arguments that attack S.
  2. S is complete if it is admissible and contains all the arguments it is defending. (attacking the attacker)
  3. Grounded set is the minimal set of the complete sets.

So for example argument(a), argument(b), argument(c), attacks(a,b), attacks(b,c) should give

admissible: (a), (a,c) () complete: (a,c) grounded: (a,c)


So far I tried:

%noone is attacking you
admissible(X) :-
argument(X),
\+ attacks(_,X).

%Y is attacking you and you are attacking Y
admissible(X) :-
argument(X),
attacks(Y,X),
attacks(X,Y).

%Y is attacking you and Z is defending you
admissible(X) :-
argument(X),
attacks(Y,X),
attacks(Z,Y),
\+ attacks(Z,X),
\+ attacks(X,Z).

%If someone attacks you then you must be defended by someone of your set
complete(X) :-
admissible(X),
attacks(Y,X),
attacks(Z,Y),
\+ attacks(Z,X),
\+ attacks(X,Z).

%TO-DO: I attack Y, check if all Y attacks belong to my set
complete(X) :-
admissible(X),
attacks(X,Y),

attacks(Y,Z),
\+ attacks(Z,X),
\+ attacks(X,Z).

%TO-DO: How do you find the minimum set of complete?
grounded(X) :-
argument(X).
  • If you have a *set* `S` of arguments, what's the specific definition of *it doesn't attack itself*? Do you mean no one argument in `S` attacks any other argument in `S`? And an argument `A` attacks `S` if `A` attacks at least one argument in `S`? And for `S` to attack an argument `A` means that at least one argument within `S` attacks `A`? Your question has mashed up sets of arguments versus individual arguments, so it's a little hard to tell. – lurker Mar 02 '15 at 01:43
  • Yeah, sry about that, I was a little vague. So a set S1 attacks another set S2 if at least one argument of S1 attacks one argument of S2. So a set (a,b) doesnt attack itself if either a or b have no attacks incoming from a or b. – mephisto001 Mar 02 '15 at 15:16
  • the semantics can be visualised here : http://rull.dbai.tuwien.ac.at:8080/ASPARTIX/loadGraph.faces – mephisto001 Mar 02 '15 at 15:31

0 Answers0