Documentation for MARGO

Copyright © 2007,2008 Maxime Morge and members of the MARGO Project

Table of contents

What is MARGO?
Products: eAuctionTool JMARGO
Bug report


The ARGUGRID project have two generic aims. We want to provide the representation of the agents' overall internal state and we want to provide computational frameworks for the automatisation of the agents' internal reasoning. This representation is meant to be suitable for deploying the agents to support grid-based applications and in particular service selection and composition in these applications, and for engaging the agents in virtual organisations. The computational frameworks for the agent reasoning needs to support the argumentative features required to deal with the multitude of choices available to the agents (within the given applications) and to deal with the negotiation and conflict resolution posed by virtual organisation. It also needs to be computationally viable.

In this document, our objective is to present the computational counterpart of the argumentative process that we propose in ARGUGRID. We propose a Prolog prototype implementation encompassing all features of the dialectical argumentation model and the representation of the agents' overall internal state. Being a logic-based programming language, Prolog allows for easy prototyping and testing. Moreover, GOLEM, an extension of PROSOCS, on which argumentative agents will need to be plugged, already includes APIs for Prolog.

What is MARGO ?

Developed for the ARGUGRID project, MARGO implements an argumentation-based mechanism for decision making detailed in(Morge ArgMAS 2008). A logic language is used as a concrete data structure for holding statements representing knowledge, goals, and decisions of an agent. Different qualitative and quantitative priorities are attached to these items, corresponding to the probability of the knowledge, the preferences between goals, and the expected utilities of decisions. These concrete data structures consist of information providing the backbone of arguments. Due to the abductive nature of decision making, we built arguments by reasoning backwards, possibly by making suppositions. Moreover, arguments are defined as tree-like structures. In this way, MARGO evaluates the possible decisions, suggests some solutions, and provides an interactive and intelligible explanation of the choice made.

Project features

Homepage:, Alternatively,
Projects Admins:
Maxime Morge
Development Status:
OSI Approved GNU General Public License (GPL)
CaSAPI, eventually Interprolog and JGraph
Actual version:
Operating System:
OS Independent
Programming Languages:
Artificial Intelligence


The authors and the maintainers of this software are:


This work is supported by the Sixth Framework IST programme of the EC, under the 035200 ARGUGRID project.


COPYRIGHT of all files Maxime Morge and Paolo Mancarella (C) 2007-2008. All rights reserved. Exception for the following files:


This package contains the following softwares:

  • JMARGO, a graphical user interface for MARGO;
  • eAuctionTool, a software application allowing to decide if an electronic-auction is suitable for a procurement.
  • This package includes the following external libraries :

  • CaSAPI 2.1 (including minor modifications to adapt it for our usage): hybrid argumentation system implemented in Prolog. See
  • InterProlog 2.1.2: a Java front-end and enhancement for Prolog. See
  • Jgraph beta 2: a Java library for graph. See
  • Installation

    In order to install MARGO, you have to perform the following steps:

    1. A Prolog installation (e.g. SWI-Prolog) is needed as a requirement for MARGO.
    2. First, untar or move this folder into the final installation location;
    3. You're done! Check out the examples that come bundled with the distribution.

    Additionnaly, if you want to use JMARGO, you will have to consider the following steps:

    1. A Java Runtime Environment is a requirement of JMARGO.
    2. The variables in bin/ (alternatively in bin\env.bat) must be modified, in particular JAVA_BIN, JAVA_DOC, PL_BIN and MARGO_DIR.
    3. Execute the script bin/ (alternatively bin\run_JMARGO.bat).


    1. Create a file to hold the domain description;
    2. Add the following lines in the top of the file:
      :- multifile decision/1, incompatibility/2, sincompatibility/2, goalrule/3, decisionrule/3, epistemicrule/3, goalpriority/2, decisionpriority/2, epistemicpriority/2, assumable/1, confidence/2.
    3. Write your domain description in the file load it into a Prolog shell (e.g. by typing sicstus in a terminal and once Prolog is running, type [example] in order to load the MARGO and the example.
    4. Ask for all the admissible arguments with the following predicate: admissibleArgument(+CONCLUSION,?PREMISES,?ASSUMTIONS);
    5. MARGO provides the premises and suppostions of admissible arguments for a given conclusion.


    We present here the final products built upon MARGO.


    eAuctionTool is a software application allowing to decide if an electronic-auction is suitable for a procurement. This tool is inspired by the eAuction decision tool provided by the office of government commerce.


    For using this tool, you need of:


    How to set it up ? Modifiy the variables in bin/ (alternatively in bin\env.bat).

    How to run it ? Execute the script bin/ (alternatively bin\run_eAuctionTool.bat).

    How to compile it ? Execute the script bin/ (alternatively bin\built_eAuctionTool.bat).

    How to generate the Java API ? Execute the script bin\ (alternatively bin\document_eAuctionTool.bat).


    You simply need to answer, when it is possible, to the questions. Please note that, contrary to the OGC tool, an answer for each question is not required. Then, you will see the different criteria (decision points, steps, conclusion) light up red, green, amber, or black.

    Obviously, you can save/load your case (See File> Save).


    JMARGO is a graphical user interface for MARGO. This tool is built upon:

  • InterProlog 2.1.2: a Java front-end and enhancement for Prolog. See
  • Jgraph beta 2: a Java library for graph. See
  • Requirement

    For using this tool, you need of:


    You simply need to:

    1. Run the software A Prolog console appears.
    2. Load a case (File> Consult). The Prolog console output specifies if the loading succeeds.
    3. Ask for the visualization of an argument with the predicate gadmissibleArgument(c,PREMISES,SUPPOSITIONS)., where c is an atom. The graphical representation of the argument appears.
    4. Ask for another admissible argument with ";" or terminate the query with ".".
    5. Obviously, you ask for an admissible argument with another conclusion or load another case (See File> Consult).


    We present here an example about an agent arguing over what action should be taken in the particular moral dilemma.

    Hal is diabetic. Through no fault of his own, he has lost his supply of insulin and needs to urgently take some to stay alive. Hal is aware that Carla has some insulin kept in her house, but Hal does not have permission to enter Carla's house. The question is whether or not Hal is justified in breaking into Carla's house in order to get some insulin to save his life. The main goal, that consists in ``taking a moral decision'', is addressed by a decision, \ie a choice between breaking or not into Carla's house in order to get some insulin. The main goal (moral}) is split into sub-goals: an abstract subgoal (life, i.e. respect for life) and a concrete sub-goals (prop, i.e. respect for propriety). The former is split into two concrete sub-goals (hlife, i.e. respect Hal's life, and clife, i.e. respect Carla's life). Actually, Carla will die if she is diabetic and she is left with no insulin. The knowledge about the situation is expressed with propositions such as: diabetic (Carla is diabetic), or supply (Carla has ample supplies of insulin).

    The file which contains the domain description is represented in Figure 1. According to the goal theory, the achievement of both life and prop is required to reach moral. Due to the priorities, this constraint can be relaxed and the achievement of life is more important than the achievement of prop to reach moral. According to the epistemic theory, the agent has conflicting beliefs about the fact that Carla is diabetic. Due to the priorities, f1 is more plausible than f2. Since we do not know if Hal takes Carla's insulin will leave her any insulin, supply is an assumption. According to the decision priorities, leaving (r41) or breaking out Carla's house if she is diabetic and has ample supplies of insulin (r42) are more credible than breaking out Carla's house without information about her supplies (r43).

    Domain description

    % ==================================================== %
    % DIABETIC DILEMMA                             	       %
    % from                                                 %
    % Morge, M and Mancarella P. Modèle d'argumentation    %
    % pour le raisonnement pratique. Proc. of the Journées %
    % Francophones Planification, Décision, Apprentissage  %
    % pour la conduite de systèmes (JFPDA'07), p 123-134,  %
    % Grenoble, France 2007. Slides.             %
    % ==================================================== %
    :- compile('../src/').
    :- multifile decision/1, incompatibility/2, sincompatibility/2, 
    	goalrule/3, decisionrule/3, epistemicrule/3,
    	goalpriority/2, decisionpriority/2, epistemicpriority/2,
    	assumable/1, confidence/2.
    goalrule(r012,moral,[life, prop]).
    goalrule(r134,life,[hlife, clife]).
    decisionrule(r22, prop, [d(leaving)]).
    decisionrule(r31, hlife, [d(breaking)]).
    decisionrule(r40, clife, [d(nothing)]).
    decisionrule(r41, clife, [d(leaving), diabetic]).
    decisionrule(r42, clife, [d(breaking), diabetic, supply]).
    goalpriority(r012, r01).
    goalpriority(r134, r13).
    decision([d(breaking), d(leaving)]).

    admissibleArgument(moral,P,A) returns:

    P can be understood as the strongest combination of sub-goals which can be reached by an alternative. This sub-goal can be challenged.

    admissibleArgument(life,P,A) returns:

    Since this argument is a subargument of the previous one, they suggest the same alternatives.

    If you run JMARGO, gadmissibleArgument(life,P,A) will draw the following argument

    A graphical representation of a MARGO

    Bug report

    If there are any rough areas or problems, please feel free to report them and assist us in correcting them.


    (Morge ArgMAS 2008) Maxime Morge. The hedgehog and the Fox. An Argumentation-Based Decision Support System. Argumentation in Multi-Agent Systems: Fourth International Workshop ArgMAS, Revised Selected and Invited Papers. Iyad Rahwan and Simon Parsons and Chris Reed (eds). Lecture Notes in Artificial Intelligence, Volume 4946, Springer-Verlag, Berlin, Germany, 2008.