Changeset 21 for exampleparties
- Timestamp:
- 09/22/20 08:52:04 (4 years ago)
- Location:
- exampleparties
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
exampleparties/anac2019/agentgg/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties.anac2019</groupId> 7 7 <artifactId>agentgg</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 60 60 <groupId>tudelft.utilities</groupId> 61 61 <artifactId>immutablelist</artifactId> 62 <version>1.1. 0</version>62 <version>1.1.1</version> 63 63 </dependency> 64 64 -
exampleparties/anac2019/agentgg/src/main/java/geniusweb/exampleparties/agentgg/AgentGG.java
r19 r21 19 19 import geniusweb.actions.PartyId; 20 20 import geniusweb.bidspace.AllBidsList; 21 import geniusweb.inform.ActionDone; 22 import geniusweb.inform.Finished; 23 import geniusweb.inform.Inform; 24 import geniusweb.inform.Settings; 25 import geniusweb.inform.YourTurn; 21 26 import geniusweb.issuevalue.Bid; 22 27 import geniusweb.issuevalue.Value; 23 28 import geniusweb.party.Capabilities; 24 29 import geniusweb.party.DefaultParty; 25 import geniusweb.party.inform.ActionDone;26 import geniusweb.party.inform.Finished;27 import geniusweb.party.inform.Inform;28 import geniusweb.party.inform.Settings;29 import geniusweb.party.inform.YourTurn;30 30 import geniusweb.profile.PartialOrdering; 31 31 import geniusweb.profileconnection.ProfileConnectionFactory; -
exampleparties/anac2019/agentgg/src/test/java/geniusweb/exampleparties/agentgg/AgentGGTest.java
r19 r21 34 34 import geniusweb.actions.PartyId; 35 35 import geniusweb.connection.ConnectionEnd; 36 import geniusweb.inform.ActionDone; 37 import geniusweb.inform.Finished; 38 import geniusweb.inform.Inform; 39 import geniusweb.inform.Settings; 40 import geniusweb.inform.YourTurn; 36 41 import geniusweb.issuevalue.Bid; 37 42 import geniusweb.party.Capabilities; 38 import geniusweb.party.inform.ActionDone;39 import geniusweb.party.inform.Finished;40 import geniusweb.party.inform.Inform;41 import geniusweb.party.inform.Settings;42 import geniusweb.party.inform.YourTurn;43 43 import geniusweb.profile.DefaultPartialOrdering; 44 44 import geniusweb.profile.PartialOrdering; -
exampleparties/anac2019/winkyagent/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties.anac2019</groupId> 7 7 <artifactId>winkyagent</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 60 60 <groupId>tudelft.utilities</groupId> 61 61 <artifactId>immutablelist</artifactId> 62 <version>1.1. 0</version>62 <version>1.1.1</version> 63 63 </dependency> 64 64 -
exampleparties/anac2019/winkyagent/src/main/java/geniusweb/exampleparties/anac2019/winkyagent/WinkyAgent.java
r12 r21 19 19 import geniusweb.actions.PartyId; 20 20 import geniusweb.bidspace.AllBidsList; 21 import geniusweb.inform.ActionDone; 22 import geniusweb.inform.Finished; 23 import geniusweb.inform.Inform; 24 import geniusweb.inform.Settings; 25 import geniusweb.inform.YourTurn; 21 26 import geniusweb.issuevalue.Bid; 22 27 import geniusweb.issuevalue.DiscreteValue; … … 26 31 import geniusweb.party.Capabilities; 27 32 import geniusweb.party.DefaultParty; 28 import geniusweb.party.inform.ActionDone;29 import geniusweb.party.inform.Finished;30 import geniusweb.party.inform.Inform;31 import geniusweb.party.inform.Settings;32 import geniusweb.party.inform.YourTurn;33 33 import geniusweb.profile.PartialOrdering; 34 34 import geniusweb.profileconnection.ProfileConnectionFactory; -
exampleparties/anac2019/winkyagent/src/test/java/geniusweb/exampleparties/anac2019/winkyagent/WinkyAgentTest.java
r12 r21 34 34 import geniusweb.actions.PartyId; 35 35 import geniusweb.connection.ConnectionEnd; 36 import geniusweb.inform.ActionDone; 37 import geniusweb.inform.Finished; 38 import geniusweb.inform.Inform; 39 import geniusweb.inform.Settings; 40 import geniusweb.inform.YourTurn; 36 41 import geniusweb.issuevalue.Bid; 37 42 import geniusweb.party.Capabilities; 38 import geniusweb.party.inform.ActionDone;39 import geniusweb.party.inform.Finished;40 import geniusweb.party.inform.Inform;41 import geniusweb.party.inform.Settings;42 import geniusweb.party.inform.YourTurn;43 43 import geniusweb.profile.DefaultPartialOrdering; 44 44 import geniusweb.profile.PartialOrdering; -
exampleparties/boulware/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>boulware</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 -
exampleparties/comparebids/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>comparebids</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 55 55 <groupId>tudelft.utilities</groupId> 56 56 <artifactId>immutablelist</artifactId> 57 <version>1.1. 0</version>57 <version>1.1.1</version> 58 58 </dependency> 59 59 -
exampleparties/comparebids/src/main/java/geniusweb/exampleparties/comparebids/CompareBids.java
r10 r21 12 12 import geniusweb.actions.ElicitComparison; 13 13 import geniusweb.actions.PartyId; 14 import geniusweb.inform.ActionDone; 15 import geniusweb.inform.Finished; 16 import geniusweb.inform.Inform; 17 import geniusweb.inform.Settings; 14 18 import geniusweb.issuevalue.Bid; 15 19 import geniusweb.party.Capabilities; 16 20 import geniusweb.party.DefaultParty; 17 import geniusweb.party.inform.ActionDone;18 import geniusweb.party.inform.Finished;19 import geniusweb.party.inform.Inform;20 import geniusweb.party.inform.Settings;21 21 import geniusweb.profile.PartialOrdering; 22 22 import geniusweb.profile.Profile; -
exampleparties/comparebids/src/test/java/geniusweb/exampleparties/comparebids/CompareBidsTest.java
r10 r21 29 29 import geniusweb.bidspace.AllBidsList; 30 30 import geniusweb.connection.ConnectionEnd; 31 import geniusweb.inform.ActionDone; 32 import geniusweb.inform.Inform; 33 import geniusweb.inform.Settings; 31 34 import geniusweb.issuevalue.Bid; 32 35 import geniusweb.party.Capabilities; 33 import geniusweb.party.inform.ActionDone;34 import geniusweb.party.inform.Inform;35 import geniusweb.party.inform.Settings;36 36 import geniusweb.profile.Profile; 37 37 import geniusweb.profile.utilityspace.LinearAdditive; -
exampleparties/conceder/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>conceder</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 -
exampleparties/hardliner/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>hardliner</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 -
exampleparties/humangui/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>humangui</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 46 46 <artifactId>profileconnection</artifactId> 47 47 <version>${geniusweb.version}</version> 48 </dependency>49 <dependency>50 <groupId>tudelft.utilities</groupId>51 <artifactId>immutablelist</artifactId>52 <version>1.1.0</version>53 48 </dependency> 54 49 <dependency> -
exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/BiddingInfo.java
r9 r21 13 13 import geniusweb.actions.PartyId; 14 14 import geniusweb.connection.ConnectionEnd; 15 import geniusweb.inform.Inform; 16 import geniusweb.inform.Settings; 15 17 import geniusweb.issuevalue.Bid; 16 import geniusweb.party.inform.Inform;17 import geniusweb.party.inform.Settings;18 18 import geniusweb.profile.Profile; 19 19 import geniusweb.profileconnection.ProfileInterface; -
exampleparties/humangui/src/main/java/geniusweb/exampleparties/humangui/HumanGui.java
r10 r21 11 11 import geniusweb.actions.Action; 12 12 import geniusweb.actions.Offer; 13 import geniusweb.inform.ActionDone; 14 import geniusweb.inform.Finished; 15 import geniusweb.inform.Inform; 16 import geniusweb.inform.Settings; 17 import geniusweb.inform.YourTurn; 13 18 import geniusweb.party.Capabilities; 14 19 import geniusweb.party.DefaultParty; 15 20 import geniusweb.party.Party; 16 import geniusweb.party.inform.ActionDone;17 import geniusweb.party.inform.Finished;18 import geniusweb.party.inform.Inform;19 import geniusweb.party.inform.Settings;20 import geniusweb.party.inform.YourTurn;21 21 import geniusweb.profileconnection.ProfileConnectionFactory; 22 22 import geniusweb.profileconnection.ProfileInterface; -
exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/BiddingInfoTest.java
r10 r21 29 29 import geniusweb.actions.Accept; 30 30 import geniusweb.actions.PartyId; 31 import geniusweb.inform.Settings; 31 32 import geniusweb.issuevalue.Bid; 32 import geniusweb.party.inform.Settings;33 33 import geniusweb.profile.Profile; 34 34 import geniusweb.profile.utilityspace.LinearAdditive; -
exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/HumanGuiTest.java
r11 r21 27 27 import geniusweb.actions.PartyId; 28 28 import geniusweb.bidspace.AllBidsList; 29 import geniusweb.inform.ActionDone; 30 import geniusweb.inform.Finished; 31 import geniusweb.inform.Settings; 32 import geniusweb.inform.YourTurn; 29 33 import geniusweb.issuevalue.Bid; 30 34 import geniusweb.party.Capabilities; 31 import geniusweb.party.inform.ActionDone;32 import geniusweb.party.inform.Finished;33 import geniusweb.party.inform.Settings;34 import geniusweb.party.inform.YourTurn;35 35 import geniusweb.profile.Profile; 36 36 import geniusweb.profile.utilityspace.LinearAdditive; -
exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/MyGUITest.java
r9 r21 19 19 import geniusweb.actions.PartyId; 20 20 import geniusweb.connection.ConnectionEnd; 21 import geniusweb. party.inform.Inform;22 import geniusweb. party.inform.Settings;21 import geniusweb.inform.Inform; 22 import geniusweb.inform.Settings; 23 23 import geniusweb.profileconnection.ProfileConnectionFactory; 24 24 import geniusweb.profileconnection.ProfileInterface; -
exampleparties/humangui/src/test/java/geniusweb/exampleparties/humangui/TestConnection.java
r9 r21 8 8 import geniusweb.actions.Action; 9 9 import geniusweb.connection.ConnectionEnd; 10 import geniusweb. party.inform.Inform;10 import geniusweb.inform.Inform; 11 11 import geniusweb.references.Reference; 12 12 import tudelft.utilities.listener.DefaultListenable; -
exampleparties/linear/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>linear</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 -
exampleparties/randomparty/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>randomparty</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 55 55 <groupId>tudelft.utilities</groupId> 56 56 <artifactId>immutablelist</artifactId> 57 <version>1.1. 0</version>57 <version>1.1.1</version> 58 58 </dependency> 59 59 -
exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java
r10 r21 5 5 import java.util.Arrays; 6 6 import java.util.HashSet; 7 import java.util.List; 7 8 import java.util.Random; 8 9 import java.util.logging.Level; 10 import java.util.stream.Collectors; 9 11 10 12 import geniusweb.actions.Accept; … … 12 14 import geniusweb.actions.Offer; 13 15 import geniusweb.actions.PartyId; 16 import geniusweb.actions.Vote; 17 import geniusweb.actions.Votes; 14 18 import geniusweb.bidspace.AllPartialBidsList; 19 import geniusweb.inform.ActionDone; 20 import geniusweb.inform.Finished; 21 import geniusweb.inform.Inform; 22 import geniusweb.inform.OptIn; 23 import geniusweb.inform.Settings; 24 import geniusweb.inform.Voting; 25 import geniusweb.inform.YourTurn; 15 26 import geniusweb.issuevalue.Bid; 16 27 import geniusweb.party.Capabilities; 17 28 import geniusweb.party.DefaultParty; 18 import geniusweb.party.inform.ActionDone;19 import geniusweb.party.inform.Finished;20 import geniusweb.party.inform.Inform;21 import geniusweb.party.inform.Settings;22 import geniusweb.party.inform.YourTurn;23 29 import geniusweb.profile.PartialOrdering; 24 30 import geniusweb.profile.Profile; … … 33 39 * A simple party that places random bids and accepts when it receives an offer 34 40 * with sufficient utility. 41 * <h2>voting</h2> If the party receives a parameter "minPower", it will 42 * {@link Vote} using that minPower instead of the default value 2 if it 43 * receives a {@link Voting} request. 35 44 */ 36 45 public class RandomParty extends DefaultParty { … … 41 50 protected ProfileInterface profileint; 42 51 private Progress progress; 52 private Settings settings; 53 private Votes lastvotes; 43 54 44 55 public RandomParty() { … … 58 69 this.me = settings.getID(); 59 70 this.progress = settings.getProgress(); 71 this.settings = settings; 60 72 } else if (info instanceof ActionDone) { 61 73 Action otheract = ((ActionDone) info).getAction(); … … 64 76 } 65 77 } else if (info instanceof YourTurn) { 66 myTurn(); 67 if (progress instanceof ProgressRounds) { 68 progress = ((ProgressRounds) progress).advance(); 69 } 78 makeOffer(); 79 nextRound(); 70 80 } else if (info instanceof Finished) { 71 81 getReporter().log(Level.INFO, "Final ourcome:" + info); 82 } else if (info instanceof Voting) { 83 lastvotes = vote((Voting) info); 84 getConnection().send(lastvotes); 85 nextRound(); 86 } else if (info instanceof OptIn) { 87 // just repeat our last vote. 88 getConnection().send(lastvotes); 89 nextRound(); 72 90 } 73 91 } catch (Exception e) { … … 76 94 } 77 95 96 private void nextRound() { 97 if (progress instanceof ProgressRounds) { 98 progress = ((ProgressRounds) progress).advance(); 99 } 100 101 } 102 78 103 @Override 79 104 public Capabilities getCapabilities() { 80 return new Capabilities(new HashSet<>(Arrays.asList("SAOP"))); 105 return new Capabilities( 106 new HashSet<>(Arrays.asList("SAOP", "AMOP", "MOPAC"))); 81 107 } 82 108 … … 86 112 } 87 113 88 private void myTurn() throws IOException { 114 /** 115 * send our next offer 116 */ 117 private void makeOffer() throws IOException { 89 118 Action action; 90 if (isGood(lastReceivedBid)) { 119 String protocol = settings.getProtocol().getURI().getPath(); 120 if ((protocol.equals("SAOP") || protocol.equals("SHAOP")) 121 && isGood(lastReceivedBid)) { 91 122 action = new Accept(me, lastReceivedBid); 92 123 } else { … … 105 136 } 106 137 107 private boolean isGood(Bid bid) throws IOException { 138 /** 139 * @param bid the bid to check 140 * @return true iff bid is good for us. 141 */ 142 private boolean isGood(Bid bid) { 108 143 if (bid == null) 109 144 return false; 110 Profile profile = profileint.getProfile(); 111 if (profile instanceof UtilitySpace) { 145 Profile profile; 146 try { 147 profile = profileint.getProfile(); 148 } catch (IOException e) { 149 throw new IllegalStateException(e); 150 } 151 if (profile instanceof UtilitySpace) 112 152 return ((UtilitySpace) profile).getUtility(bid).doubleValue() > 0.6; 113 }114 153 if (profile instanceof PartialOrdering) { 115 154 return ((PartialOrdering) profile).isPreferredOrEqual(bid, 116 155 profile.getReservationBid()); 117 156 } 118 throw new IllegalArgumentException( 119 "Can not handle profile type " + profile.getClass()); 157 return false; 158 } 159 160 /** 161 * @param voting the {@link Voting} object containing the options 162 * 163 * @return our next Votes. 164 */ 165 private Votes vote(Voting voting) throws IOException { 166 Object val = settings.getParameters().get("minPowwer"); 167 Integer n = (val instanceof Integer) ? (Integer) val : 2; 168 for (Bid bid : voting.getBids()) { 169 System.out.println("Bid " + bid + "=" 170 + ((UtilitySpace) profileint.getProfile()).getUtility(bid)); 171 } 172 List<Vote> votes = voting.getBids().stream().distinct() 173 .filter(bid -> isGood(bid)).map(bid -> new Vote(me, bid, n)) 174 .collect(Collectors.toList()); 175 return new Votes(me, votes); 120 176 } 121 177 -
exampleparties/randomparty/src/test/java/geniusweb/exampleparties/randomparty/RandomPartyTest.java
r10 r21 16 16 import java.nio.file.Files; 17 17 import java.nio.file.Paths; 18 import java.util.Arrays; 19 import java.util.Collections; 18 20 import java.util.LinkedList; 19 21 import java.util.List; … … 32 34 import geniusweb.actions.Offer; 33 35 import geniusweb.actions.PartyId; 36 import geniusweb.actions.Votes; 34 37 import geniusweb.bidspace.AllBidsList; 35 38 import geniusweb.connection.ConnectionEnd; 39 import geniusweb.inform.ActionDone; 40 import geniusweb.inform.Finished; 41 import geniusweb.inform.Inform; 42 import geniusweb.inform.Settings; 43 import geniusweb.inform.Voting; 44 import geniusweb.inform.YourTurn; 36 45 import geniusweb.issuevalue.Bid; 37 46 import geniusweb.party.Capabilities; 38 import geniusweb.party.inform.ActionDone;39 import geniusweb.party.inform.Finished;40 import geniusweb.party.inform.Inform;41 import geniusweb.party.inform.Settings;42 import geniusweb.party.inform.YourTurn;43 47 import geniusweb.profile.Profile; 44 48 import geniusweb.profile.utilityspace.LinearAdditive; … … 53 57 public class RandomPartyTest { 54 58 59 private static final PartyId PARTY1 = new PartyId("party1"); 55 60 private static final String SAOP = "SAOP"; 56 61 private static final PartyId otherparty = new PartyId("other"); … … 60 65 private RandomParty party; 61 66 private final TestConnection connection = new TestConnection(); 62 private final ProtocolRef protocol = mock(ProtocolRef.class);67 private final ProtocolRef protocol = new ProtocolRef(SAOP); 63 68 private final ProgressRounds progress = mock(ProgressRounds.class); 64 69 private Settings settings; … … 70 75 IOException, URISyntaxException { 71 76 party = new RandomParty(); 72 settings = new Settings( new PartyId("party1"),77 settings = new Settings(PARTY1, 73 78 new ProfileRef(new URI("file:" + PROFILE)), protocol, progress, 74 79 parameters); … … 189 194 } 190 195 196 @Test 197 public void testVoting() { 198 party.connect(connection); 199 party.notifyChange(settings); 200 201 Bid bid = findGoodBid(); 202 party.notifyChange(new Voting(Arrays.asList(bid), 203 Collections.singletonMap(PARTY1, 1))); 204 assertEquals(1, connection.getActions().size()); 205 Action action = connection.getActions().get(0); 206 assertTrue(action instanceof Votes); 207 assertEquals(1, ((Votes) action).getVotes().size()); 208 assertEquals(bid, ((Votes) action).getVotes().get(0).getBid()); 209 } 210 191 211 } 192 212 -
exampleparties/randompartypy/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>randompyparty</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 48 48 <groupId>tudelft.utilities</groupId> 49 49 <artifactId>immutablelist</artifactId> 50 <version>1.1. 0</version>50 <version>1.1.1</version> 51 51 </dependency> 52 52 -
exampleparties/randompartypy/src/main/resources/RandomParty.py
r10 r21 2 2 import traceback 3 3 4 import geniusweb. party.inform.ActionDone as ActionDone5 import geniusweb. party.inform.Inform as Inform6 import geniusweb. party.inform.Settings as Settings7 import geniusweb. party.inform.YourTurn as YourTurn4 import geniusweb.inform.ActionDone as ActionDone 5 import geniusweb.inform.Inform as Inform 6 import geniusweb.inform.Settings as Settings 7 import geniusweb.inform.YourTurn as YourTurn 8 8 9 9 -
exampleparties/randompartypy/src/test/java/geniusweb/exampleparties/randompartypy/RandomPartyTest.java
r10 r21 32 32 import geniusweb.bidspace.AllBidsList; 33 33 import geniusweb.connection.ConnectionEnd; 34 import geniusweb.inform.ActionDone; 35 import geniusweb.inform.Inform; 36 import geniusweb.inform.Settings; 37 import geniusweb.inform.YourTurn; 34 38 import geniusweb.issuevalue.Bid; 35 39 import geniusweb.party.Capabilities; 36 import geniusweb.party.inform.ActionDone;37 import geniusweb.party.inform.Inform;38 import geniusweb.party.inform.Settings;39 import geniusweb.party.inform.YourTurn;40 40 import geniusweb.profile.Profile; 41 41 import geniusweb.profile.utilityspace.LinearAdditive; -
exampleparties/simpleboa/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>simpleboaparty</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 -
exampleparties/simpleboa/src/main/java/geniusweb/exampleparties/simpleboa/SimpleBoa.java
r20 r21 8 8 import geniusweb.boa.biddingstrategy.BiddingStrategy; 9 9 import geniusweb.boa.biddingstrategy.TimeDependentBiddingStrategy; 10 import geniusweb.inform.Settings; 10 11 import geniusweb.opponentmodel.FrequencyOpponentModel; 11 12 import geniusweb.opponentmodel.OpponentModel; 12 13 import geniusweb.party.Party; 13 import geniusweb.party.inform.Settings;14 14 import tudelft.utilities.logging.Reporter; 15 15 -
exampleparties/simpleboa/src/test/java/geniusweb/exampleparties/simpleboa/SimpleBoaTest.java
r20 r21 36 36 import geniusweb.bidspace.AllBidsList; 37 37 import geniusweb.connection.ConnectionEnd; 38 import geniusweb.inform.ActionDone; 39 import geniusweb.inform.Finished; 40 import geniusweb.inform.Inform; 41 import geniusweb.inform.Settings; 42 import geniusweb.inform.YourTurn; 38 43 import geniusweb.issuevalue.Bid; 39 44 import geniusweb.party.Capabilities; 40 import geniusweb.party.inform.ActionDone;41 import geniusweb.party.inform.Finished;42 import geniusweb.party.inform.Inform;43 import geniusweb.party.inform.Settings;44 import geniusweb.party.inform.YourTurn;45 45 import geniusweb.profile.Profile; 46 46 import geniusweb.profile.utilityspace.LinearAdditive; -
exampleparties/simpleshaop/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>simpleshaop</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.6</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 55 55 <groupId>tudelft.utilities</groupId> 56 56 <artifactId>immutablelist</artifactId> 57 <version>1.1. 0</version>57 <version>1.1.1</version> 58 58 </dependency> 59 59 -
exampleparties/simpleshaop/src/main/java/geniusweb/exampleparties/simpleshaop/ShaopParty.java
r12 r21 16 16 import geniusweb.actions.PartyId; 17 17 import geniusweb.bidspace.AllBidsList; 18 import geniusweb.inform.ActionDone; 19 import geniusweb.inform.Finished; 20 import geniusweb.inform.Inform; 21 import geniusweb.inform.Settings; 22 import geniusweb.inform.YourTurn; 18 23 import geniusweb.issuevalue.Bid; 19 24 import geniusweb.party.Capabilities; 20 25 import geniusweb.party.DefaultParty; 21 import geniusweb.party.inform.ActionDone;22 import geniusweb.party.inform.Finished;23 import geniusweb.party.inform.Inform;24 import geniusweb.party.inform.Settings;25 import geniusweb.party.inform.YourTurn;26 26 import geniusweb.profile.PartialOrdering; 27 27 import geniusweb.profileconnection.ProfileConnectionFactory; -
exampleparties/simpleshaop/src/test/java/geniusweb/exampleparties/simpleshaop/ShaopPartyTest.java
r10 r21 36 36 import geniusweb.actions.PartyId; 37 37 import geniusweb.connection.ConnectionEnd; 38 import geniusweb.inform.ActionDone; 39 import geniusweb.inform.Finished; 40 import geniusweb.inform.Inform; 41 import geniusweb.inform.Settings; 42 import geniusweb.inform.YourTurn; 38 43 import geniusweb.issuevalue.Bid; 39 44 import geniusweb.issuevalue.DiscreteValue; 40 45 import geniusweb.issuevalue.Value; 41 46 import geniusweb.party.Capabilities; 42 import geniusweb.party.inform.ActionDone;43 import geniusweb.party.inform.Finished;44 import geniusweb.party.inform.Inform;45 import geniusweb.party.inform.Settings;46 import geniusweb.party.inform.YourTurn;47 47 import geniusweb.profile.Profile; 48 48 import geniusweb.progress.ProgressRounds; -
exampleparties/timedependentparty/pom.xml
r20 r21 6 6 <groupId>geniusweb.exampleparties</groupId> 7 7 <artifactId>timedependentparty</artifactId> 8 <version>1. 4.4</version> <!-- must equal ${geniusweb.version} -->8 <version>1.5.0</version> <!-- must equal ${geniusweb.version} --> 9 9 <packaging>jar</packaging> 10 10 … … 17 17 <passwd>${env.ARTIFACTORY_PASS}</passwd> 18 18 <jackson-2-version>2.9.10</jackson-2-version> 19 <geniusweb.version>1. 4.4</geniusweb.version>19 <geniusweb.version>1.5.0</geniusweb.version> 20 20 </properties> 21 21 … … 55 55 <groupId>tudelft.utilities</groupId> 56 56 <artifactId>immutablelist</artifactId> 57 <version>1.1. 0</version>57 <version>1.1.1</version> 58 58 </dependency> 59 59 -
exampleparties/timedependentparty/src/main/java/geniusweb/exampleparties/timedependentparty/TimeDependentParty.java
r20 r21 13 13 import geniusweb.actions.Offer; 14 14 import geniusweb.actions.PartyId; 15 import geniusweb.inform.ActionDone; 16 import geniusweb.inform.Finished; 17 import geniusweb.inform.Inform; 18 import geniusweb.inform.Settings; 19 import geniusweb.inform.YourTurn; 15 20 import geniusweb.issuevalue.Bid; 16 21 import geniusweb.party.Capabilities; 17 22 import geniusweb.party.DefaultParty; 18 import geniusweb.party.inform.ActionDone;19 import geniusweb.party.inform.Finished;20 import geniusweb.party.inform.Inform;21 import geniusweb.party.inform.Settings;22 import geniusweb.party.inform.YourTurn;23 23 import geniusweb.profile.Profile; 24 24 import geniusweb.profile.utilityspace.LinearAdditive; -
exampleparties/timedependentparty/src/test/java/geniusweb/exampleparties/timedependentparty/TimeDependentPartyTest.java
r10 r21 34 34 import geniusweb.bidspace.AllBidsList; 35 35 import geniusweb.connection.ConnectionEnd; 36 import geniusweb.inform.ActionDone; 37 import geniusweb.inform.Finished; 38 import geniusweb.inform.Inform; 39 import geniusweb.inform.Settings; 40 import geniusweb.inform.YourTurn; 36 41 import geniusweb.issuevalue.Bid; 37 42 import geniusweb.party.Capabilities; 38 import geniusweb.party.inform.ActionDone;39 import geniusweb.party.inform.Finished;40 import geniusweb.party.inform.Inform;41 import geniusweb.party.inform.Settings;42 import geniusweb.party.inform.YourTurn;43 43 import geniusweb.profile.Profile; 44 44 import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
Note:
See TracChangeset
for help on using the changeset viewer.