CSE 142 Critters Husky Tournament Rules

last updated Friday, November 29, 2019

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.

How do I participate?

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, December 4 to be eligible for the tournament. You may submit a different Husky for the tournament than the one you submit to be graded.

How do the battles work?

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:

  • 30 of the standard Bear critter
  • 30 of the standard Lion critter
  • 30 of the standard Giant critter
  • 30 of the standard FlyTrap critter
  • 60 of the standard Food critter
  • 30 each of two different student critters

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).

Which students' Huskies are shown in class on Friday?

Unfortunately, there is not enough time in class to have all Huskies battle on Friday. To fit the tournament into the time we have, we will narrow the field down to 16 finalists ahead of time. These Huskies will be seeded #1 through #16 and will compete in a standard single-elimination tournament (see here for a sample bracket). If a student whose Husky qualifies for the tournament is not present in class, we may replace that Husky with the next highest ranking Husky whose student is present.

Twelve of the finalists will be picked through a precontest. We will generate all pairs of contestants and put them in a world that matches the description above (including the Bear, Lion, Giant, FlyTrap, and Food critters listed above). For each pair, we will run a simulation for 5000 steps and add the final critter counts to each critter's total score. The twelve critters with the highest totals will be included in the lecture contest.

We will also have a contest to pick four "entertaining" critters. A group of TAs will judge the entries. These critters will be included in the lecture tournament. If one of the winners of the entertaining contest is also among the top twelve critters in the precontest, then additional top winners from the precontest will be added to reach a total of sixteen finalists.

Are there any things I am not allowed to do?

  • Huskies must be entirely contained in a single code file, though you may use multiple classes. Files must be no larger than 1MB in size.
  • Huskies must not throw exceptions during normal execution. (Be careful with those array bounds and null values.)
  • Huskies must not write to external files, access the internet or a network connection, or attempt to access and/or modify the game model.
Violating any of these rules will, at minimum, result an a loss being declared for the battle, and may result in the Husky being removed from the tournament entirely.

In addition, our usual Academic Integrity policy applies to the Husky tournament as well. Your Husky must be your own work.

Is there anything else about the simulation I should know?

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.

What is at stake? What do I get if I win?

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.