Index: exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java
===================================================================
--- exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java	(revision 10)
+++ exampleparties/randomparty/src/main/java/geniusweb/exampleparties/randomparty/RandomParty.java	(revision 21)
@@ -5,6 +5,8 @@
 import java.util.Arrays;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Random;
 import java.util.logging.Level;
+import java.util.stream.Collectors;
 
 import geniusweb.actions.Accept;
@@ -12,13 +14,17 @@
 import geniusweb.actions.Offer;
 import geniusweb.actions.PartyId;
+import geniusweb.actions.Vote;
+import geniusweb.actions.Votes;
 import geniusweb.bidspace.AllPartialBidsList;
+import geniusweb.inform.ActionDone;
+import geniusweb.inform.Finished;
+import geniusweb.inform.Inform;
+import geniusweb.inform.OptIn;
+import geniusweb.inform.Settings;
+import geniusweb.inform.Voting;
+import geniusweb.inform.YourTurn;
 import geniusweb.issuevalue.Bid;
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
-import geniusweb.party.inform.ActionDone;
-import geniusweb.party.inform.Finished;
-import geniusweb.party.inform.Inform;
-import geniusweb.party.inform.Settings;
-import geniusweb.party.inform.YourTurn;
 import geniusweb.profile.PartialOrdering;
 import geniusweb.profile.Profile;
@@ -33,4 +39,7 @@
  * A simple party that places random bids and accepts when it receives an offer
  * with sufficient utility.
+ * <h2>voting</h2> If the party receives a parameter "minPower", it will
+ * {@link Vote} using that minPower instead of the default value 2 if it
+ * receives a {@link Voting} request.
  */
 public class RandomParty extends DefaultParty {
@@ -41,4 +50,6 @@
 	protected ProfileInterface profileint;
 	private Progress progress;
+	private Settings settings;
+	private Votes lastvotes;
 
 	public RandomParty() {
@@ -58,4 +69,5 @@
 				this.me = settings.getID();
 				this.progress = settings.getProgress();
+				this.settings = settings;
 			} else if (info instanceof ActionDone) {
 				Action otheract = ((ActionDone) info).getAction();
@@ -64,10 +76,16 @@
 				}
 			} else if (info instanceof YourTurn) {
-				myTurn();
-				if (progress instanceof ProgressRounds) {
-					progress = ((ProgressRounds) progress).advance();
-				}
+				makeOffer();
+				nextRound();
 			} else if (info instanceof Finished) {
 				getReporter().log(Level.INFO, "Final ourcome:" + info);
+			} else if (info instanceof Voting) {
+				lastvotes = vote((Voting) info);
+				getConnection().send(lastvotes);
+				nextRound();
+			} else if (info instanceof OptIn) {
+				// just repeat our last vote.
+				getConnection().send(lastvotes);
+				nextRound();
 			}
 		} catch (Exception e) {
@@ -76,7 +94,15 @@
 	}
 
+	private void nextRound() {
+		if (progress instanceof ProgressRounds) {
+			progress = ((ProgressRounds) progress).advance();
+		}
+
+	}
+
 	@Override
 	public Capabilities getCapabilities() {
-		return new Capabilities(new HashSet<>(Arrays.asList("SAOP")));
+		return new Capabilities(
+				new HashSet<>(Arrays.asList("SAOP", "AMOP", "MOPAC")));
 	}
 
@@ -86,7 +112,12 @@
 	}
 
-	private void myTurn() throws IOException {
+	/**
+	 * send our next offer
+	 */
+	private void makeOffer() throws IOException {
 		Action action;
-		if (isGood(lastReceivedBid)) {
+		String protocol = settings.getProtocol().getURI().getPath();
+		if ((protocol.equals("SAOP") || protocol.equals("SHAOP"))
+				&& isGood(lastReceivedBid)) {
 			action = new Accept(me, lastReceivedBid);
 		} else {
@@ -105,17 +136,42 @@
 	}
 
-	private boolean isGood(Bid bid) throws IOException {
+	/**
+	 * @param bid the bid to check
+	 * @return true iff bid is good for us.
+	 */
+	private boolean isGood(Bid bid) {
 		if (bid == null)
 			return false;
-		Profile profile = profileint.getProfile();
-		if (profile instanceof UtilitySpace) {
+		Profile profile;
+		try {
+			profile = profileint.getProfile();
+		} catch (IOException e) {
+			throw new IllegalStateException(e);
+		}
+		if (profile instanceof UtilitySpace)
 			return ((UtilitySpace) profile).getUtility(bid).doubleValue() > 0.6;
-		}
 		if (profile instanceof PartialOrdering) {
 			return ((PartialOrdering) profile).isPreferredOrEqual(bid,
 					profile.getReservationBid());
 		}
-		throw new IllegalArgumentException(
-				"Can not handle profile type " + profile.getClass());
+		return false;
+	}
+
+	/**
+	 * @param voting the {@link Voting} object containing the options
+	 * 
+	 * @return our next Votes.
+	 */
+	private Votes vote(Voting voting) throws IOException {
+		Object val = settings.getParameters().get("minPowwer");
+		Integer n = (val instanceof Integer) ? (Integer) val : 2;
+		for (Bid bid : voting.getBids()) {
+			System.out.println("Bid " + bid + "="
+					+ ((UtilitySpace) profileint.getProfile()).getUtility(bid));
+		}
+		List<Vote> votes = voting.getBids().stream().distinct()
+				.filter(bid -> isGood(bid)).map(bid -> new Vote(me, bid, n))
+				.collect(Collectors.toList());
+		return new Votes(me, votes);
 	}
 
Index: exampleparties/randomparty/src/test/java/geniusweb/exampleparties/randomparty/RandomPartyTest.java
===================================================================
--- exampleparties/randomparty/src/test/java/geniusweb/exampleparties/randomparty/RandomPartyTest.java	(revision 10)
+++ exampleparties/randomparty/src/test/java/geniusweb/exampleparties/randomparty/RandomPartyTest.java	(revision 21)
@@ -16,4 +16,6 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
@@ -32,13 +34,15 @@
 import geniusweb.actions.Offer;
 import geniusweb.actions.PartyId;
+import geniusweb.actions.Votes;
 import geniusweb.bidspace.AllBidsList;
 import geniusweb.connection.ConnectionEnd;
+import geniusweb.inform.ActionDone;
+import geniusweb.inform.Finished;
+import geniusweb.inform.Inform;
+import geniusweb.inform.Settings;
+import geniusweb.inform.Voting;
+import geniusweb.inform.YourTurn;
 import geniusweb.issuevalue.Bid;
 import geniusweb.party.Capabilities;
-import geniusweb.party.inform.ActionDone;
-import geniusweb.party.inform.Finished;
-import geniusweb.party.inform.Inform;
-import geniusweb.party.inform.Settings;
-import geniusweb.party.inform.YourTurn;
 import geniusweb.profile.Profile;
 import geniusweb.profile.utilityspace.LinearAdditive;
@@ -53,4 +57,5 @@
 public class RandomPartyTest {
 
+	private static final PartyId PARTY1 = new PartyId("party1");
 	private static final String SAOP = "SAOP";
 	private static final PartyId otherparty = new PartyId("other");
@@ -60,5 +65,5 @@
 	private RandomParty party;
 	private final TestConnection connection = new TestConnection();
-	private final ProtocolRef protocol = mock(ProtocolRef.class);
+	private final ProtocolRef protocol = new ProtocolRef(SAOP);
 	private final ProgressRounds progress = mock(ProgressRounds.class);
 	private Settings settings;
@@ -70,5 +75,5 @@
 			IOException, URISyntaxException {
 		party = new RandomParty();
-		settings = new Settings(new PartyId("party1"),
+		settings = new Settings(PARTY1,
 				new ProfileRef(new URI("file:" + PROFILE)), protocol, progress,
 				parameters);
@@ -189,4 +194,19 @@
 	}
 
+	@Test
+	public void testVoting() {
+		party.connect(connection);
+		party.notifyChange(settings);
+
+		Bid bid = findGoodBid();
+		party.notifyChange(new Voting(Arrays.asList(bid),
+				Collections.singletonMap(PARTY1, 1)));
+		assertEquals(1, connection.getActions().size());
+		Action action = connection.getActions().get(0);
+		assertTrue(action instanceof Votes);
+		assertEquals(1, ((Votes) action).getVotes().size());
+		assertEquals(bid, ((Votes) action).getVotes().get(0).getBid());
+	}
+
 }
 
