The Lemonade Stand Game
Draft Rules of the Tournament
To get excited about the game, click here, to see what is engaging.
This year, the script to run will be run2012.sh.
This calls a new main class, com.yahoo.lsg.lifelong.LifelongTournament.
The difference will be that bots will only be reset about every 180,000 rounds.
The tournament is open to teams, which can consist of one or more players: no external discussion of the game should take place between teams, as that may induce an unfair advantage. Each team submits one bot. If two bots determine how to collude, that is completely within the rules.
The tournament will have a hierarchical structure:
- An iteration is when three players simultaneously decide which of twelve actions to play.
- A game is 100 iterations using the same utilities played by the same players.
- A block is a set of games using the same utilities where players are randomly matched, but no player plays more than one game.
- A lifetime is a set of blocks (roughly 1800) over which no players are reset.
- The tournament will consist of at least 20 lifetimes. As many lifetimes as necessary will be used to reduce variance, stopping when two standard deviations separate the winner or 1 week of computation is used.
The overall length of the lifetime is such that each player plays about 180,000 iterations. For example:
Number of Players | Block Length (in Games) | Lifetime (in Blocks) |
3 | 1 | 1800 |
4 | 1 | 2400 |
5 | 1 | 3000 |
6 | 2 | 1800 |
7 | 2 | 2100 |
8 | 2 | 2400 |
9 | 3 | 1800 |
10 | 3 | 2000 |
11 | 3 | 2200 |
12 | 4 | 1800 |
13 | 4 | 1950 |
14 | 4 | 2100 |
15 | 5 | 1800 |
No player can take more than three minutes to take all their actions in a lifetime. Thus, a lifetime should last 3 minutes per player. The competition should therefore take only 1 hour per player (assuming 20 lifetimes).
Building Bots
Submit all materials by e-mail to martinzinkevich at yahoo.com by July 15th, 2012, 11:59 PM Samoa time
Bots for this game are still simple to write. They must implement com.yahoo.lsg.lifelong.LifelongStrategy:
- A constructor, for example MyLifelongStrategy(GameInformation info, long seed, String options)
- A handler for when a new game begins: void newGame(Game g, int iterations);
- A handler to observe the outcome of an iteration: void observeOutcome(int[] actions);
- Something to return an action, int getAction();
A bot returns a number between 0 and 11 inclusive, and then later observes an array such as [3,7,9]. Every bot views herself as player 0.
With each new game, newGame() is called, and the bot is given a Game object. If the bot calls getUtility(), it will receive a GeneralizedLemonadeUtility object, which allows the user to query about the distribution of people around the island on this particular game. The bot can either access the data through this interface, or just query the object through the Utility object.
Provided here is a zipped file consisting of the Java source that will be used to run the experiments. In order to participate, please submit an implementation of the com.yahoo.lsg.lifelong.LifelongStrategy class. This involves writing:
- A list of your team members.
- A description of the techniques and philosophies behind your bot. No less than a paragraph, no more than eight pages. This will be published on the group page.
- Your source files in a src subdirectory.
- Any other files to be wrapped in your jar in a data subdirectory.
If there are multiple class files, please submit a jar file. Please use the Java naming convention, e.g. edu.cmu.maz.MartysStrategy, and name your jar file in the same fashion, e.g. edu.cmu.maz.jar. The jar file will be present in the directory. Please do not save anything to disk or store any static information. At the beginning of the game, your class is created. When it is destroyed, all its memories should be destroyed as well. Please make sure that your new submission can run beside your old submission, and your new code does not affect your old code.
Even with the additional structure of the game being changed,
the lemonade stand game is not very computationally complex, and so I am making an effort to make the implementation of the competition as simple as possible.
Obviously, by submitting a bot you are giving us permission to run your code as we see fit free of charge. You are also giving us the right to use and distribute your description of the technique as we see fit free of charge. In addition, I will post all the bots on the web and into the public domain.
Running the Tournament
- I will download the package here.
- I will gather all the source code from all the competitors and compile them.
- I will run time trials.
- I will run a script similar to run2012.sh, but with the new bots instead of the example ones.