Last change
on this file since 126 was 1, checked in by Wouter Pasman, 6 years ago |
Initial import : Genius 9.0.0
|
File size:
459 bytes
|
Rev | Line | |
---|
[1] | 1 | package agents.nastyagent;
|
---|
| 2 |
|
---|
| 3 | import java.util.List;
|
---|
| 4 | import java.util.Random;
|
---|
| 5 |
|
---|
| 6 | import genius.core.actions.Action;
|
---|
| 7 | import genius.core.actions.Offer;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * Keeps repeating best bid as offer
|
---|
| 11 | *
|
---|
| 12 | * @author W.Pasman
|
---|
| 13 | *
|
---|
| 14 | */
|
---|
| 15 | public class RandomBid extends NastyAgent {
|
---|
| 16 | private Random random = new Random();
|
---|
| 17 |
|
---|
| 18 | @Override
|
---|
| 19 | public Action chooseAction(List<Class<? extends Action>> possibleActions) {
|
---|
| 20 | return new Offer(id, bids.get(random.nextInt(bids.size())));
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.