<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Using Jason to Develop Declarative Prototypes of Automated Negotiations</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alex Muscar</string-name>
          <email>silie@software.ucv.ro</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Laura Surcel</string-name>
          <email>laura_surcel@yahoo.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Costin B a˘dic a˘</string-name>
          <email>cbadica@software.ucv.ro</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>BCI'12, September 16-20, 2012, Novi Sad, Serbia.</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Copyright c 2012 by the paper's authors. Copying permitted only for private and</institution>
          ,
          <addr-line>academic purposes. This volume is published and copyrighted by its editors., Local Proceedings also appeared in ISBN 978-86-7031-200-5</addr-line>
          ,
          <institution>Faculty of Sciences, University of Novi Sad.</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Craiova, Software Engineering, Department</institution>
          ,
          <addr-line>Bvd. Decebal 107, Craiova, 200440</addr-line>
          ,
          <country country="RO">Romania</country>
        </aff>
      </contrib-group>
      <fpage>136</fpage>
      <lpage>138</lpage>
      <abstract>
        <p>We propose a declarative approach for prototyping automated negotiations in multi-agent systems. Our approach is demonstrated by using Jason agent programming language to describe English and Dutch auctions.</p>
      </abstract>
      <kwd-group>
        <kwd>Artificial intelligence</kwd>
        <kwd>computer programming</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        Automated negotiations are common in multi-agent systems (MAS)
– e.g. bargaining, auctions [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], multi-criteria negotiation [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
multicommodity negotiations. Some of the practical applications of
automated negotiations are: price negotiation for e-commerce ([
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]),
cooperative design, and task allocation.
      </p>
      <p>Although there are many methods of automated negotiations,
they generally fail to properly address the reusability and the
extensibility of the proposed approaches. In most applications the
negotiation mechanism is very specific and hard coded, making the
reusability of research results difficult.</p>
      <p>In order to treat these issues we have set up a research project
aiming to develop a generic, reusable negotiation framework. One
of the key insights of our approach is that an (automated)
negotiation has two main components: the protocol which governs agents’
interaction during negotiation and the strategy of participating agents.
While the analysis and design of specific negotiations mechanisms
and the development of appropriate strategies with desired
properties (e.g. stability, equilibrium, efficiency, a.o) has received a lot of
attention in the context of particular situations, they have not been
properly addressed with regard to reusability and extensibility.</p>
      <p>
        This paper is a follow-up of our initial proposal [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Our results
consisted in the identification of a minimal yet viable Generic
Negotiation Protocol (GNP) as well as of a declarative approach of
representing rules and constraints specific to negotiation types. Our aim
was to combine them for deriving the basis of a generic, reusable
negotiation framework that would allow agents to specify and
understand customizable negotiation protocols and strategies. In [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
we introduced a prototype MAS for English auctions based on
Jason agent programming language [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Here we take a closer look at
the implementation of this prototype and extend it to support Dutch
auctions.
2.
      </p>
    </sec>
    <sec id="sec-2">
      <title>BACKGROUND</title>
      <p>
        The system architecture is based on our work [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], which
distinguished between several types of agents:1 (i) Auction Service (AS)
manages auction-related activities (e.g. creation, termination),
coordinates the auction participants, and acts as a yellow page service
for ongoing auctions; (ii) Auction Host (AH) is an arbitrator agent
responsible with coordinating the agents participating in a single
auction instance (AI); and (iii) Auction Participant (AP) which
participates by bidding in an AI – out of all the participants one is
distinguished as the Auction Initiator Participant (AIP).
      </p>
      <p>Conceptually, the declarative specification of a negotiation is
composed of three essential ingredients: (i) Generic Negotiation
Protocol (GNP) which defines and governs the interaction between
the agents that are part of the system and it is the same for all
of them, independently of their role in the negotiation (i.e. buyer,
seller); (ii) Declarative Negotiation Mechanism (DNM) is specific
to a given negotiation type and it serves to customize the GNP for
representing the specific conditions and events that enable the
permissible actions of specific AP agents; and (iii) Custom Negotiation
Strategy (CNS) is specific to a given AP and must be consistent with
the DNM. It is used by the AP to select and configure a specific
negotiation action that could be most useful in a given negotiation
context.</p>
      <p>Based on the three features described above we can define the
following metaphorical equations that more succinctly describe the
agents present in our framework:</p>
      <p>AH = GNPhost + DN Mhost</p>
      <p>AP = GNPparticipant + DN Mparticipant + CNS</p>
      <p>
        These ingredients can be consistently bound into descriptions of
AH and respectively AP behaviors by making them to refer a
common core vocabulary of terms that can be used for defining and
parameterizing the space of negotiation types [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This vocabulary
is called Core Negotiation Ontology (CNO). The development of a
more complete CNO is is part of our future research.
1Note that the initial framework targeted auctions, so we have used
the term ‘auction’ interchangeably with ‘negotiation’.
+register[source(A)]
: can_register(A)
&lt;- +registered(A);
?buy_it_out(Sum);
?increment(Increment);
?items(Left_items);
?last_offer(Offer);
?state(State);
.send(A, tell,
      </p>
      <p>registered(info(Sum,Increment),
status(Offer, Left_items, State))).
+fold[source(A)]
: registered(A)
&lt;- -registered(A);
.send(A, tell, not_registered).
+bid(Offer,Items)[source(A)]
: check_protocol(A)
&amp; check_proposal(Offer,Items)
&amp; not(terminate(Offer,Items))
&lt;- -+state(processing);
!update_status(A,Offer,Items);
!inform_participants(A,Offer);
-+state(bidding).
+!close
: check_winner
&lt;- ?initiator(I);
-+state(closed);
?bidders(A);
.send(I, tell, winner(A));
.send(A, tell, winner).</p>
    </sec>
    <sec id="sec-3">
      <title>THE GENERIC NEGOTIATION PROTOCOL</title>
      <p>The GNP describes the permissible conversations involving a set
of negotiation agents comprising the following generic roles: (i)
role of AH; there is a single agent playing this role in a negotiation;
and (ii) role of AP; there are one or more agents playing this role
in a negotiation. Thus the GNP is agnostic of any details that are
specific to a particular negotiation type. Consequently, it must only
expose the basic negotiation actions that are common to as many
negotiation types, leaving unspecified the specific details of a certain
negotiation type. Those details can be captured and declaratively
represented with the help of the DNM.</p>
      <p>We have identified the following set of actions as sufficient for
the purpose of introducing our proof-of-concept implementation:
(1) register used by an AP to register itself with a specific AH;
(2) bid used to place a bid; (3) tell/ask depending on the push/pull
semantics, the protocol can expose information to the participants
either automatically or on request; (4) fold used by an AP to get
out of an auction; (5) close used by the AH to notify the APs about
the auction termination; and (6) winner used by the AH to notify
the winner participants.</p>
    </sec>
    <sec id="sec-4">
      <title>IMPLEMENTATION DETAILS</title>
      <p>Jason is probably the best known example of agent programming
language that follows the Belief-Desire-Intention (BDI) model. It
supports a declarative programming style, closer to logic
programming. We chose Jason as we believe that the mix of declarative,
goal-oriented and knowledge representation features of Jason make
it a good candidate implementation language for our prototype.
Furthermore its meta-programming features (e.g. representing
programs as code) has helped with our implementation.</p>
      <p>Our implementation provides an internal action that loads the
rules for a specific negotiation type. This has to be called by agents
before they start the negotiation in order to customize their GNP.
Once loaded, the rules can be used like any other rule defined in
the Jason agent source file.</p>
      <p>The Jason implementation of the AH role of the GNP, presented
in listing 1, closely follows the definition of the GNP outlined
above. Very briefly, the plan for +register registers a participant
and sends it the current quote (i.e. the value of the outstanding bid)
– this presumes push semantics; the +bid plan updates the quote
and pushes messages with the new value to all the participants; the
+close plan ends the auction and notifies any winner if there is one.
All the plans keep track of the current state the agent is in.</p>
      <p>Note that the plans make use of rules that are defined by the</p>
      <p>DNM, which we will discuss next. While an AS conceptually
implements a type of auction, an AH is spawned for each new auction
started by the AS. When initially started the AH loads the DNM
specific to the auction implemented by the AS and a further
message from the AIP is responsible for initializing the parameters of
the DNM with appropriate values.</p>
      <p>
        We chose a rule-based representation for our DNM, which builds
on our previous approach presented in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Moreover, this
representation was mapped naturally to Jason.
      </p>
      <p>Listing 2 shows the rules used to customize the AH for our
running example, an English auction. Note that these rules illustrate
the DNM from the AH perspective.</p>
      <p>Besides their formal parameters, the rules are also implicitly
parameterized by the current state of the negotiation process – here
we are using the annotations mechanism from Jason to achieve this,
e.g. the [state(bidding)] annotation on the check_proposal
rule makes it applicable only when the agent is in the bidding
state.
5.</p>
    </sec>
    <sec id="sec-5">
      <title>CONCLUSION AND FUTURE WORK</title>
      <p>We have presented our approach on developing a generic
negotiation mechanism (as part of a generic negotiation framework)
using the Jason programming language. We believe the solution is
elegant and promising, due to its declarative nature and modular
nature. Basically the GNP is independent of the negotiation type,
negotiation rules are used to customize it.</p>
      <p>One of the necessary next steps is to find a suitable serialization
format for the rules used to customize the GNP, such as RuleML.2
Another direction, as mentioned earlier, is to define a suitable CNO
for the negotiation framework. Yet a third research direction is to
factor out the GNP so that it can be used in multiple platforms–e.g.
Jason, Java+JADE.
6.</p>
    </sec>
    <sec id="sec-6">
      <title>ACKNOWLEDGMENTS</title>
      <p>The work of Alex Muscar was supported by the strategic grant
POSDRU / CPP107 / DMI1.5 / S / 78421, Project ID 78421 (2010),
co-financed by the European Social Fund Investing in People, within
the Sectoral Operational Programme Human Resources
Development 2007 - 2013. The work of Costin Ba˘dica˘ was supported by the
multilateral agreement on academic cooperation in 2012 between
Serbia (Novi Sad), Romania (Craiova), and Poland (Warsaw and
Gdansk) on “Agent Technologies, Tools, Environments,
Applications”.
2RuleML – http://ruleml.org/
// Dutch auction
check_proposal(Offer,Items)
[state(bidding)]
:asked_price(AskedPrice) &amp;
items(Left_items) &amp;
Left_items&gt;=Items &amp;</p>
      <p>Offer &lt;= AskedPrice.
+!update_status(A,Offer,Items)
&lt;- .time(H,M,Sec2);
?items(I);
?increment(Increment);
?asked_price(AskedPrice);
?bidders(B);
-+last_offer(Offer);
-+items(I-Items);
-+bidders([A|B]);
-+asked_price(AskedPrice+Increment);
-+last_update(Sec2).
// English auction
check_proposal(Offer,Items)
[state(bidding)]
:increment(Increment) &amp;
last_offer(Quote) &amp;
items(Left_items) &amp;
Left_items&gt;=Items &amp;</p>
      <p>Offer &gt;= Quote + Increment.
+!update_status(A,Offer,Items)
&lt;- -+last_offer(Offer);
-+bidders([A]).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Bordini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Hübner</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Wooldridge</surname>
          </string-name>
          .
          <article-title>Programming Multi-Agent Systems in AgentSpeak using Jason</article-title>
          . Wiley Series in Agent Technology. Wiley,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.</given-names>
            <surname>Ba</surname>
          </string-name>
          ˘dica˘,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ganzha</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Paprzycki</surname>
          </string-name>
          .
          <article-title>Implementing rule-based automated price negotiation in an agent system</article-title>
          .
          <source>Journal of Universal Computer Science</source>
          ,
          <volume>13</volume>
          (
          <issue>2</issue>
          ):
          <fpage>244</fpage>
          -
          <lpage>266</lpage>
          , feb
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>C.</given-names>
            <surname>Ba</surname>
          </string-name>
          <article-title>˘dica˘,</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Giurca</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Wagner</surname>
          </string-name>
          .
          <article-title>Using rules and r2ml for modeling negotiation mechanisms in e-commerce agent systems</article-title>
          .
          <source>In Trends in Enterprise Application Architecture, 2nd International Conference, TEAA</source>
          <year>2006</year>
          , volume
          <volume>4473</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>84</fpage>
          -
          <lpage>99</lpage>
          , Berlin, Heidelberg,
          <year>2007</year>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dobriceanu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Biscu</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Ba˘dica˘, and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Ba˘dica˘. The design and implementation of an agent-based auction service</article-title>
          .
          <source>IJAOSE</source>
          ,
          <volume>3</volume>
          (
          <issue>2</issue>
          /3):
          <fpage>116</fpage>
          -
          <lpage>134</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Muscar</surname>
          </string-name>
          and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Ba˘dica˘. Exploring the design space of a declarative framework for automated negotiation: initial considerations (in press)</article-title>
          .
          <source>In Proc.Artificial Intelligence Applications and Innovations 2012 - AIAI 2012</source>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Scafes</surname>
          </string-name>
          ¸ and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Ba˘dica˘. Computing equilibria for constraint-based negotiation games with interdependent issues</article-title>
          .
          <source>In Proceedings of Federated Conference on Computer Science and Information Systems - FedCSIS</source>
          <year>2011</year>
          , pages
          <fpage>597</fpage>
          -
          <lpage>603</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>V.</given-names>
            <surname>Tamma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Phelps</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dickinson</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Wooldridge</surname>
          </string-name>
          .
          <article-title>Ontologies for supporting negotiation in e-commerce</article-title>
          .
          <source>Engineering Applications of Artificial Intelligence</source>
          ,
          <volume>18</volume>
          (
          <issue>2</issue>
          ):
          <fpage>223</fpage>
          -
          <lpage>236</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P. R.</given-names>
            <surname>Wurman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. P.</given-names>
            <surname>Wellman</surname>
          </string-name>
          , and
          <string-name>
            <given-names>W. E.</given-names>
            <surname>Walsh</surname>
          </string-name>
          .
          <article-title>A parametrization of the auction design space</article-title>
          .
          <source>Games and Economic Behavior</source>
          ,
          <volume>35</volume>
          (
          <issue>2</issue>
          ):
          <fpage>304</fpage>
          -
          <lpage>338</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>