source: src/main/java/negotiator/parties/TimeoutNegotiationParty.java@ 126

Last change on this file since 126 was 126, checked in by Aron Hammond, 6 years ago

Added function to calculate opposition to MultiLateralAnalysis.java

Moved code to add RLBOA listeners to RLBOAUtils is misc package

Added input for strategyParameters to SessionPanel (gui)

!! close SessionInfo after tournament; this caused /tmp/ to fill up with GeniusData files

Our own package:

  • Added opponents and strategies that are mentioned in the report
  • Change class hierarchy, agents can now extend from RLBOAagentBilateral to inherit RL functionality.
  • States extend from AbstractState
File size: 1.3 KB
Line 
1package negotiator.parties;
2
3import java.util.List;
4
5import genius.core.AgentID;
6import genius.core.actions.Accept;
7import genius.core.actions.Action;
8import genius.core.actions.ActionWithBid;
9import genius.core.parties.AbstractNegotiationParty;
10
11/**
12 * Agent that sleeps..
13 * <p/>
14 * The class was created as part of a series of agents used to understand the
15 * api better
16 *
17 * @author David Festen
18 */
19public class TimeoutNegotiationParty extends AbstractNegotiationParty {
20
21 /**
22 * If offer was proposed: Accept offer, otherwise: Propose random offer
23 *
24 * @param possibleActions
25 * List of all actions possible.
26 * @return Accept or Offer action
27 */
28 @Override
29 public Action chooseAction(final List<Class<? extends Action>> possibleActions) {
30
31 try {
32 Thread.sleep(Long.MAX_VALUE);
33 } catch (InterruptedException e) {
34 // do nothing
35 }
36
37 return new Accept(getPartyId(), ((ActionWithBid) getLastReceivedAction()).getBid());
38 }
39
40 /**
41 * We ignore any messages received.
42 *
43 * @param sender
44 * The initiator of the action
45 * @param arguments
46 * The action performed
47 */
48 @Override
49 public void receiveMessage(final AgentID sender, final Action arguments) {
50 super.receiveMessage(sender, arguments);
51 }
52
53 @Override
54 public String getDescription() {
55 return "Sleeping Party";
56 }
57
58}
Note: See TracBrowser for help on using the repository browser.