In this problem set you will apply the solution presented in

- Mark Klein, Peyman Faratin, Hiroki Sayama, and Yaneer
Bar-Yam. “Negotiating
Complex Contracts”.
*Group Decision and Negotiation,*March; 12p. 111--125, 2003.

Let `num-agents`

be the number of agents. Each agent
is randomly give two skills from a fixed list of 10 skills. At
each time step a number of new workflows appears. This number is
taken from a Poisson random distribution with mean
`workflow-arrival-rate`

. Each workflow contains a set
of 5 randomly generated skills (repetitions are allowed) and a
payment which is taken from a normal distribution with mean
`mean-payment`

. In order to perform (enact) a
workflow, we need to find 5 agents with the appropriate
skills. An agent can only perform 1 skill for 1 workflow at each
time step.

The system must allocate as many of the workflows as
possible. The agents, on the other hand, want to maximize their
own payments. The workflow payments are divided equally among the
agents in a workflow. Since all our workflows have 5 skills,
this means that for a workflow of payment *p* each agent
would receive a payment of *p/5*. The optimal solution
maximizes the sum of the payments given to the agents, at every
time step.

We modify the annealing mediator solutions, as presented in the paper above (Section 5), as follows (We do this to handle more than 2 agents) . Once a new set of workflows appears we begin a new negotiation. At each negotiation time step a mediator chooses an allocation of agents to workflows (note that there might not be enough agents or workflows, so some workflows might not get enacted or some agents might be idle). It broadcasts this allocation to all and they all give it one of their four votes: strong accept, weak accept, weak reject, strong reject. The mediator converts these votes into numbers using the values

- strong accept: 2
- weak accept: 1
- weak reject: -1
- strong reject: -2

The process ends when the temperature is low enough, at which point we say that the workflows have been allocated.

An agent determines its vote by first calculating the highest
payment it could get, which is 1/5 of the payment of the
highest-paid workflow that includes one of the agent's
skills. Let this payment be *maxp*. Let *p* be the
agent's payment under the proposed allocation. The **truth-telling
agent**'s vote is then decided as follows:

- If
*p < maxp/4*then strong reject. - If
*p < 2 * maxp/4*then weak reject. - If
*p < 3 * maxp/4*then weak accept. - Else, strong accept.

- If
*p < 2 * maxp/4*then strong reject. - Else, strong accept.

The new problem raises two immediate questions.

- Does this solution also find allocations that are near the pareto frontier?
- Does this solution also reward exaggerators in the presence of truth tellers?

The second question is easier to answer since it only requires you to compare the payments accrued by the various types of agents. You will run tests to show the payments accrued in situations where

- All agents but one use the same strategy.
- Half the agents use one strategy and half the other.
- All agents use the same strategy.

`run-tests`

) which runs the
set of tests and prints out the final data. These tests might
take a while to run as you will be running many
negotiations.
Finally, note that `num-agents`

,
`workflow-arrival-rate`

, and
`mean-payment`

should be sliders in your model.

I cannot think of a good way of using the turtle space to
visualize the negotiation process. If you can, that would be
great! Otherwise just use the `plot`

command to draw
some graphs representing the payment distribution among the
agents and the accumulated payment in each run.

As will all the problem sets, you will hand them in using our department's dropbox. You will only hand in your .nlogo file. You will place all your documentation in the documentation tab of your NetLogo model. The information tab needs to start with:

```
Name:
```

email:

I understand that it is the responsibility of every member of the
Carolina community to uphold an maintain the academic standards and
integrity of the University of South Carolina. Any member of the
University community, who has reasonable grounds to believe that an
infraction of the Code of Student Academic Responsibility has
occurred, has an obligation to report the alleged violation.

I certify that I have neither given nor received unauthorized aid on
this problem set.

José M. Vidal Last modified: Sun Sep 11 07:36:12 EDT 2005