CSE 142, Autumn 2021: Husky Tournament

CSE 142 Critters Husky Tournament Rules

last updated Friday, December 3, 2021

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 8 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?

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.

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.

Do I have to participate? Will it affect my grade?

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.