package boaexample; import java.util.Collections; import java.util.HashMap; import genius.core.boaframework.BoaParty; import genius.core.parties.NegotiationInfo; import genius.core.utility.AbstractUtilitySpace; import negotiator.boaframework.opponentmodel.HardHeadedFrequencyModel; /** * This example shows how BOA components can be made into an independent * negotiation party. * * Note that this is equivalent to adding a BOA party via the GUI by selecting * the components and parameters. However, this method gives more control over * the implementation, as the agent designer can choose to override behavior * (such as handling preference uncertainty). */ public class BoaPartyExample extends BoaParty { @Override public void init(NegotiationInfo info) { HashMap noparams = (HashMap) Collections.EMPTY_MAP; HashMap osParams = new HashMap(); // Set the concession parameter "e" for the offering strategy to yield // Boulware-like behavior osParams.put("e", 0.2); configure(new AC_Next(), noparams, new TimeDependent_Offering(), osParams, new HardHeadedFrequencyModel(), noparams, new BestBid(), noparams); super.init(info); } // All the rest of the functionality is defined by the BOA framework /** * Specific functionality, such as the estimate of the utility space in the * face of preference uncertainty, can be specified by overriding the * default behavior. */ @Override public AbstractUtilitySpace estimateUtilitySpace() { return super.estimateUtilitySpace(); } }