Skip to content

Running a negotiation session via command line

Taha Doğan Güneş edited this page Nov 15, 2017 · 5 revisions

First you need to create an xml file which contains the details of a negotiation session. An example xml file (multilateraltournament.xml can be:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<multilateralTournamentsConfiguration>
  <tournaments>
    <tournament>
      <deadline>
        <value>180</value>
        <type>TIME</type>
      </deadline>
      <protocolItem hasMediatorProfile="false" hasMediator="false"
        description="Each agents makes offer, counter-offer, or accepts"
        classPath="negotiator.protocol.StackedAlternatingOffersProtocol"
        protocolName="Stacked Alternating Offers Protocol for Multi-Lateral Negotiation (SAOPMN)" />
      <partyRepItems>
        <party classPath="../out/production/ExampleAgent/ExampleAgent.class">
          <properties />
        </party>
        <party classPath="agents.anac.y2015.pokerface.PokerFace">
          <properties />
        </party>
        <party
          classPath="agents.anac.y2015.TUDMixedStrategyAgent.TUDMixedStrategyAgent">
          <properties />
        </party>
      </partyRepItems>
      <partyProfileItems>
        <item url="file:etc/templates/partydomain/party1_utility.xml" />
        <item url="file:etc/templates/partydomain/party2_utility.xml" />
        <item url="file:etc/templates/partydomain/party3_utility.xml" />
      </partyProfileItems>
      <repeats>1</repeats>
      <numberOfPartiesPerSession>3</numberOfPartiesPerSession>
      <repetitionAllowed>false</repetitionAllowed>
      <persistentDataType>DISABLED</persistentDataType>
    </tournament>
  </tournaments>
</multilateralTournamentsConfiguration>

You can add multiple tournaments, different deadline and repeat configuration in this file.

Then, you can run the xml tournament configuration via command line without Genius GUI by running this command:

java -cp negosimulator.jar negotiator.xml.multipartyrunner.Runner multilateraltournament.xml

You should expect these outputs:

➜  genius git:(master) ✗ pwd
/Users/tdgunes/Projects/ExampleAgent/genius
➜  genius git:(master) ✗ java -cp negosimulator.jar negotiator.xml.multipartyrunner.Runner multilateraltournament.xml
This is the Genius multilateral tournament runner command line tool
Currently you are using using Genius 7.1.6
Input file: multilateraltournament.xml
Provide path to output logfile [default: logs/Log-XmlRunner-20171102-114228.csv]:
Starting tournament negotiator.config.MultilateralTournamentConfiguration@475530b9
Session exited.
approx. < 1 minute remaining

Clone this wiki locally