Skip to content
forked from becheru/aicnet

Augmented Iterated Contract Net Experimental System

License

Notifications You must be signed in to change notification settings

randodev/aicnet

 
 

Repository files navigation

Augemented Iteracted Contract Net (AICNET) Experimentation System

An experimentation platform for negotiation protocols in a Freight Transport Multi Agent System.

As per current development we are offering two negotiation protocols:

  • Iterated Contract Net (ICNET)
  • Augmented Iterated Contract Net (AICNET)

Prerequisites

The Experimental System (ES) was developed in Python 3, through the help of PyCharm IDE and IPython. We recommed using the ES in an IPython/Jupyter interface, as it facilitates experimentation.

The ES is dependent on the following standard Python3 libraries:

  • os, for file operations.
  • random, for generating pseudo-random numbers.
  • copy, for object manipulation operations.

The ES is dependent on the following external Python3 libraries:

Running the experiments

Just copy/download/replicate the code in main.py your Python IDE, then run it. The results of the experiments largely depend on the environment variables, which we recommend playing with before running the experiment.

Example of running experiments

Keep in mind that e is an object of the type Environment, through which the experiments are governed.

  1. Run an ICNET experiment with 1000 rounds (transport requests).
e.icnet_experiment(1000)
  1. Run an AICNET experiment with 1000 rounds (transport requests), considering a ranking based on PageRank. The third parameter, with boolean True/False values, determines if the ranking is increasing (False) or decreasng (True).
e.aicnet_experiment(1000,"pagerank",False)

At this point two sets of bids experiments bids_icnet (set 1) and bids_aicnet (set 2). The first have been obtained by running 2000 rounds of ICNET, while the second was obtained from 1000 rounds of ICNET followed by 1000 rounds of AICNET. Hence, the following commands are oriented on extracting results on the above simulations.

  1. Determine the average number of iterations per negotiation process for each bid set.
e.stats.get_avg_no_iterations_per_negotiation(1)
e.stats.get_avg_no_iterations_per_negotiation(2)
  1. Determine the average gain of transport providers for each bid set and the standard deviation. The average gain is computed as the winning price over the initial broker estimated price.
e.stats.get_transporter_gain_stats(1)
e.stats.get_transporter_gain_stats(2)
  1. Determine a statistics on the winning transport providers' personalities per bid set.
e.stats.get_winning_transporter_personality_stats(1)
e.stats.get_winning_transporter_personality_stats(2)
  1. Determine the number of failed negotiations per bids set.
e.stats.get_nr_of_failed_negotiations(1)
e.stats.get_nr_of_failed_negotiations(2)
  1. Plot a comparison on the number of transport provider' wins between bids sets.
e.stats.plot_sorted_winning_transporters()

Nr. Wins Plot

  1. Plot a comparison on the transport provider' PageRank coefficients between the bids sets.
e.stats.plot_metric_comparison("pagerank")

PageRank Plot

In order to compute the PageRank coefficient, ES has performed an operation of building social graphs automatically for each bid set, which can also be done through the commands:

e.stats.build_graph(1)
e.stats.build_graph(2)
  1. ES is capable of exporting the social graphs in a .gml format (in current folder), for further analysis with other tools.
e.stats.save_graph(1,"icnet_graph")
e.stats.save_graph(2,"aicnet_graph")
  1. In our case we have used Gephi graph visualization and exploration platform, by importing the above mentioned .gml files.

About

Augmented Iterated Contract Net Experimental System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 98.9%
  • Jupyter Notebook 1.1%