last updated Thursday, March 3, 2022
During the last week of class, we will host a Critter tournament. Here are the rules. If something is missing or unclear, please email the instructor.
If you want to participate in the tournament, submit your Husky to the Tournament Submission Form. Submissions must be received by 11:59pm on Wednesday, March 9 to be eligible for the tournament. You may submit a different Husky for the tournament than the one you submit to be graded.
The tournament consists of a series of battles. Each elimination round will take place in a world that is 65 wide and 55 high and will start with:
A battle will run for 5000 moves or until one Husky is completely eliminated, whichever comes first. In most cases, when the battle ends, whichever Husky has a higher count will be declared the winner. However, at the instructor's discretion, a victory may be declared "weak" and a battle changed to a best-of-three format. This will generally happen when both Huskies are still alive and the counts are very close (within roughly 10-20 points).
Prior to class, we will run a pre-tournament in which each Husky will battle against many others. Each Husky will compete in a minimum of 64 battles against randomly chosen opponents, unless the total number of entries is less than 64, in which case each Husky will battle each other Husky at least once. The 16 Huskies with the best win-loss records after these battles will be selected for the in-class tournament on the last day of class. These Huskies will be seeded #1 through #16 based on record and will compete in a standard single-elimination tournament (see here for a sample bracket). If a student whose Husky finishes in the top 16 is not present in class, we may replace that Husky with the next highest ranking Husky whose student is present.
In addition, our usual Academic Integrity policy applies to the Husky tournament as well. Your Husky must be your own work.
You can create interesting behavior by using static fields. When you add the
static
keyword to a field, there will be just one version of that field
that is shared by all objects of the class. For example, you could make an
ArrayList that is shared by all of your critters. You are not required to use static fields, and doing so does not necessarily provide an advantage. But many students like to try to achieve this sort of behavior.
However, static fields pose a
problem for running simulations repeatedly because you want to start with
appropriate values for each new simulation. If you would like to use static
fields, you should include a static method called initStatic
that takes no
arguments. If it exists, the simulator will call this method once before the
beginning of each simulation. You can find an example of a critter class
that uses a static field by looking at
Food2.java, a variation of the Food
critters that display themselves with text such as "7 of 9" to indicate that
this is the 7th such critter out of a total of 9 ever created.
No grade points will be based on tournament performance. For example, a Husky that sits completely still might fare well in the tournament, but it will not receive full grade points because it is too trivial. But we will give out non-valuable prizes to the winners.
The tournament will have no impact on grades–performing well or poorly in the tournament is not an indicator of what grade you will receive for your work. (For example, a Husky that sits completely still might fare well in the tournament, but would potentially be considered trivial and not receive full credit on the assessment.) Participation is entirely optional and purely for fun.