Last change
on this file since 46 was 46, checked in by bart, 3 years ago |
refactor to help reusing partiesserver
|
File size:
908 bytes
|
Line | |
---|
1 | import time
|
---|
2 | import traceback
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 | import java.math.BigInteger as BigInteger
|
---|
7 | import java.net.URI as URI
|
---|
8 | import java.util.Arrays as Arrays
|
---|
9 | import java.util.HashSet as HashSet
|
---|
10 | import java.util.Random as Random
|
---|
11 | import java.util.Collections as Collections
|
---|
12 | import java.util.logging.Level as Level
|
---|
13 |
|
---|
14 | import geniusweb.party.Capabilities as Capabilities
|
---|
15 | import geniusweb.party.DefaultParty as DefaultParty
|
---|
16 |
|
---|
17 |
|
---|
18 | import com.fasterxml.jackson.databind.ObjectMapper as ObjectMapper
|
---|
19 |
|
---|
20 | class TestParty (DefaultParty):
|
---|
21 | """
|
---|
22 | A simple party that places random bids and accepts when it receives an offer
|
---|
23 | with sufficient utility.
|
---|
24 | """
|
---|
25 |
|
---|
26 | # Override
|
---|
27 | def notifyChange(self, info):
|
---|
28 | pass
|
---|
29 |
|
---|
30 | # Override
|
---|
31 | def getCapabilities(self): # -> Capabilities
|
---|
32 | pass
|
---|
33 |
|
---|
34 | # Override
|
---|
35 | def getDescription(self):
|
---|
36 | return "places random bids until it can accept an offer with utility >0.6. Python version"
|
---|
37 |
|
---|
38 | # Override
|
---|
39 | def terminate(self):
|
---|
40 | pass
|
---|
41 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.