The Lemonade Stand Game
Rules of the Tournament
To get excited about the game, click here, to see what is engaging.
The big difference this year is that the script run will be based on thisVersusNewGuy.sh, which specifies -generator lemonade.GeneralizedLemonadeGameGenerator.
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. Every set of three players will play for 100 iterations. Then, all bots will be reset. This experiment will be repeated as many times as necessary to reduce variance, hopefully between 1,000 and 100,000 times, stopping when two standard deviations separate the winner.
Building Bots
Submit all materials by e-mail to martinzinkevich at yahoo.com by July 1st, 2011, midnight Samoa time:
Bots for this game are incredibly simple to write. 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.
Upon instantiation, 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 game.Strategy 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.
- A getAction() function that returns an integer (an action) between 0 and 11. For example, this could return 3.
- An observeOutcome(int[] actions) function that is called at the end of each round with the actions of each player. For example, this could return [3, 5, 7].
- A constructor of the form YourClassName(Game.game game, long randomSeed, String options). For reproducibility, it is recommended that randomSeed be used for any necessary randomness. The last parameter (options) is for tweaking during development. Please have your code behave as desired when an “” string is passed.
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.
While it is not enforced in the code, the bots should complete each round on average in less than 0.1 seconds, i.e. 10 seconds/100 round match (including load time). If this is not the case, your bot may be disqualified for the simple reason that we will not have enough time to run it sufficiently often to obtain statistically significant results.
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 thisVersusNewGuy3.sh, but with the new bots instead of the old ones.