Changes between Version 312 and Version 313 of WikiStart


Ignore:
Timestamp:
07/29/20 14:04:05 (4 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v312 v313  
    649649
    650650
     651= Writing a Boa Party
     652THe default BoaParty as mentioned in the exampleparties list is fully configurable to use BOA components. But this adds some hassle when setting up a negotiation as all the components must be explicitly added in the parameters. ALso there is no mechanism available to load BOA components into the runtime system, you need to load any required components as part of the progess of loading a Party.
     653
     654You can hard code a Boa Party by extending the DefaultBoa class. You can use all the Boa components, you can add your own components, and you wire them hard into your party. An example is proviced in the simpleboa example package. SimpleBoa looks like this
     655{{{
     656public class SimpleBoa extends DefaultBoa {
     657        @Override
     658        protected Class<? extends OpponentModel> getOpponentModel(Settings settings)
     659                        throws InstantiationFailedException {
     660                return FrequencyOpponentModel.class;
     661        }
     662
     663        @Override
     664        protected BiddingStrategy getBiddingStrategy(Settings settings)
     665                        throws InstantiationFailedException {
     666                return new TimeDependentBiddingStrategy() {
     667                        ...
     668                };
     669        }
     670
     671        @Override
     672        protected AcceptanceStrategy getAccceptanceStrategy(Settings settings)
     673                        throws InstantiationFailedException {
     674                return new TimeDependentAcceptanceStrategy() {
     675                        ...
     676                };
     677        }
     678
     679}
     680}}}
     681
     682So basically you just implement the functions that provide the opponent model, bidding strategy and acceptance strategy into the DefaultBoa party. Your jar file has to be prepared identically as with a normal party.
     683
    651684= Writing a party in other languages
    652685If you want to use another language than java or python2 to write your parties, you have a number of options