Please read this document carefully and start thinking NOW
about your timeline for designing and implementing your player.
The project requirements are subject to change and
improvement. Good luck, and let the trading begin!
The course project is to write a player for the game of Bohnanza. Bohnanza is a card game in which players have to collect sets of cards ("beans") and "harvest" their "bean fields" to earn "coins". There are quite a few constraints on what you must and must not "plant" into your bean fields. The twist is that players are allowed to trade cards with other players.
The official rules of Bohnanza can be downloaded from http://riograndegames.com/getFile.php?id=535 .
The Wikipedia page on Bohnanza (http://en.wikipedia.org/wiki/Bohnanza) has some more information about the games, including a list of spinoff games that are variations of the basic Bohnanza game.
You can play Bohnanza online at http://www.brettspielwelt.de/Spiele/Bohnanza/?nation=en .
Each tournament will consist of a series of three-player games, from which the winner will advance to the next playoff round. Depending on how fast the players turn out to be, we may be able to hold more rounds and take the overall performance (e.g., total gold coins) as a way to select which players will advance.
(Note that although the game is three players, we will not follow the standard Bohnanza rule of removing certain beans from the deck -- all beans will be used for all game rounds. Also, some game rounds may be two players, or possibly even four, if that seems as though it will work better in the actual tournament.)
I have not yet decided how to handle time limits -- I may impose an actual time limit (if any function takes longer than, say, 5 seconds to run, it is aborted and a default action is taken), or may just handle it by monitoring (if during game play, any player is clearly taking excessively long and delaying the tournament, that player would be disqualified). We can discuss how that should be handled as teams start to produce actual players.
There are four three graded components
of the project: (1) a project design,
(2) your
implemented system, (3) a group project report, and (4) your
performance in the class tournament. Note that you will be
primarily graded on the thoughtfulness and clarity of your design
and presentation, and not primarily on your algorithm's performance.
The reason for this is that it gives you the freedom to try a
risky approach that is interesting from a design perspective
but might not work very well. An approach that doesn't work
very well, and is also naive, trivial, or not well motivated will
receive a correspondingly trivial grade.
You should NOT just hack something together -- this is an AI class! You should think about the strategies you want to implement; what AI methods would be appropriate for such strategies; and how those AI methods can be adapted for this purpose.
Project Design (5%).
You must submit a project design (via email to Dr. desJardins)
by Thursday, March 27 (the usual late penalties apply).
You may just send this in the body of an email, or you may
attach a formatted (Word or PDF) file.
Only one project design should be submitted per group.
Your project design should contain:
It is completely fine to make changes to the design after
you submit this document.
You must have a working Bohnanza player by the date of each tournament dry run (Tuesday, April 15 for Phase I and Thursday, May 8 for Phase II). If you do not submit a working player into the dry run, you will receive a 5-point penalty on that implementation grade (out of a possible 100 points). (Players that "almost work" but require some manual repair to get them working may receive a partial penalty.) You may change your code between the dry run and the tournament, but not your team/package name, since we will set up the infrastructure for running the tournament during that time window. The in-class tournaments will be held on Tuesday, April 22 (Phase I) and Tuesday, May 13 (Phase II).
Project Report (45%). Each team must submit a project report describing your approach, your experience in designing and implementing the approach, and the performance of your system. You only need to submit one report, which should cover both your Phase I and Phase II players. I would expect these reports to be somewhere in the 5-10 page range, but there is no minimum or maximum if you include all of the required information. Your report should include the following:
Class Tournament (10%). As with the code, half of the tournament grade will be for Phase I, and half for Phase II. The tournament performance grade will be based on whether your player successfully runs (i.e., you have a working system at the time of the Phase I and Phase II tournaments -- about half of the credit), and on how well it actually performs in the tournament (i.e., how many coins your player earned (relative to other players) and whether it advanced to the next stage of play by winning -- about half of the credit). (Note that the latter grade, about 5% of your total project grade, is the only part of your project grade that is directly tied to performance (coins earned and win ratio). So it is important to have a player that plays well, but it's even more important to have a strong justification and clear design for your player.)
As you can see in the test player files, you'll need to create a team name and place your code into a package with that name, in order for everything to run correctly. (A package is just a name space so that different teams' players don't step on each other by using the same names for their functions.)
For Phase I, you must implement the three required functions, as illustrated in the test player files: PLANT-CARD(), OPTIONALLY-PLANT-CARD(), and HANDLE-FACE-UP-CARDS(). For Phase II, there will be one or more additional required functions to handle the trading process; I have not yet designed those functions, but will be able to give you more information after spring break.
Note that you will probably want to use Lisp's optimizing compiler to make your code run faster for the actual tournament. I will develop some naming conventions for files and players so that the tournament runs smoothly; details to be announced later. All tournament rounds will be run on the gl machines, so you should be certain to test your code there even if you develop it on a different machine.
When submitting code for the dry runs and tournaments, you will need to let us know (by email to Dr. desJardins and Lianjie) what userid you have submitted your code under, the name of your main file, and what package name you are using. You should submit your code on gl using the "submit" command with the "dryrun1", "dryrun2", "tourn1", or "tourn2" projects, depending on the submission. You have one main file, which may load other files (in the same directory) as needed. To load any other files, you should use:
(load (make-pathname :directory (pathname-directory *load-pathname*) :name "FILE"))where FILE is replaced by the name of the file you want to load. This will cause clisp to look for FILE.lisp in the same directory as your main load file. Your main file should not load bohnanza.lisp, since the tournament will load that shared code for everyone. You must not change any of the functions in bohnanza.lisp. IMPORTANT: Your submission should not include ANY print statements!!!! Do not submit a tarfile, a zip file, test data, or any files other than your lisp code.
You may find that you have some good ideas about utility functions for printing tournament results, trace your player's behavior, analyze the game state, or do other useful things. You may think that some of this code could be useful for other students. That's great! Please feel free to send any code that you develop that might be generally useful to me; I will vet it against the academic integrity policy (no sharing of solutions across teams...) and post it into a code repository.