/** * Adds all arguments and attacks of the given theory to * this theory * @param theory some Dung theory * @return "true" if this Dung Theory has been modified */ public boolean add(DungTheory theory){ boolean b1 = this.addAll(theory); boolean b2 = this.addAllAttacks(theory.getAttacks()); return b1 || b2 ; }
DungTheory newTheory = new DungTheory(); newTheory.addAll(theory); newTheory.addAllAttacks(theory.getAttacks()); newTheory.add(new Attack(a,b)); if(!this.isIsomorphic(newTheory, newTheories))
@Override public double getUtility(DialogueTrace<Argument,Extension> trace, Set<Argument> additionalArguments, Set<Attack> additionalAttacks){ DungTheory theory = new DungTheory(this.theory.getRestriction(trace.getElements())); theory.addAll(additionalArguments); theory.addAllAttacks(additionalAttacks); Extension groundedExtension = new SimpleGroundedReasoner().getModel(theory); return this.getUtility(groundedExtension, trace); }
public Double getUtility(Agent agent){ DungTheory theory = new DungTheory(); // get theory of audience for(Agent b: this.getMultiAgentSystem()) if(b instanceof DummyLotteryAgent){ theory.addAll(((DummyLotteryAgent)b).getTheory()); theory.addAllAttacks(((DummyLotteryAgent)b).getTheory().getAttacks()); break; } // get disclosed arguments and attacks for(DungTheory action: ((LotteryArgumentationEnvironment)this.getMultiAgentSystem().getEnvironment()).getDialogueTrace().getElements()){ theory.addAll(action); theory.addAllAttacks(action.getAttacks()); } // get utility return ((AbstractLotteryAgent)agent).getUtility(theory, ((AbstractLotteryAgent)agent).getSemantics()); }