Changes between Version 328 and Version 329 of WikiStart
- Timestamp:
- 07/30/20 10:37:16 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v328 v329 671 671 672 672 == Writing a Boa Party 673 As mentioned in [#BoaParty] the BoaParty 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 you can not load just a custom BOA component into the runserver, the runserver only supports ready-to-run Party's so custom BOA components have to be part of a custom party. 674 673 As discussed, the [#BoaParty] 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 you can not load just a custom BOA component into the runserver, the runserver only supports ready-to-run Party's so custom BOA components have to be part of a custom party. So we discuss how to create a hard-coded Boa party and how to create custom BOA components. 674 675 === Hard coded Boa 675 676 You 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 676 677 {{{ … … 704 705 So 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. 705 706 706 === Running the parameterized BoaParty in a custom project707 As you include the boa package, you also include the standard BoaParty in your module. To run that as the party implementation, simply fix the pom references to mainClass to point to the standard BoaParty: {{{<mainClass>geniusweb.boa.BoaParty</mainClass>}}}. Remember that this party requires the proper paremeters to run. This party differs from the original in that all your custom components are now also available.708 707 709 708 … … 739 738 740 739 741 740 === Running default BoaParty with custom Components 741 If you only wrote custom BOA components and want to use them in the default BoaParty using parameters, proceed as follows 742 * Create a maven project containing your custom components 743 * Fix the pom references to mainClass to point to the standard BoaParty: {{{<mainClass>geniusweb.boa.BoaParty</mainClass>}}} 744 * Plug yourparty.jar file into your partyserver for use. 745 * Use yourparty.jar instead of boa.jar to run your components. Remember to set the Boa parameters properly using your component's paths. 742 746 743 747 == Writing a party in other languages