CSE 142, Autumn 2020: Husky Tournament

CSE 142 Critters Husky Tournament Rules

last updated Friday, December 4, 2020

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 PST on Wednesday, December 9 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. In each battle, two students' Husky classes will be placed into the simulator along with the other standard critters: Ant, Bird, Hippo, Vulture, and Stone. We will run CritterMain with a standard 60x50 world using 25 of each critter. Your classes are renamed to unique names for the tournament; so one might be called Husky_AA_Smith_James and one might be called Husky_C_BD_Doe_Jane.

A battle will run for 1500 moves or until one Husky is completely eliminated, whichever comes first. In most cases, when the battle ends, whichever Husky has a higher score 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 in one of the following is true at the end of the battle:

  • Both Huskies are still alive and the scores are very close (within roughly 10-20 points)
  • One Husky has a higher score but has no critters remaining and the other Husky is still earning points and has a somewhat close score (within roughly 50-100 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.

IMPORTANT NOTE: The simulator runs these 64+ battles for your Husky by 'resetting' the class between each battle and adding 25 new huskies to the world. This is like clicking the 'Reset' button on the simulator user interface. Some students' Huskies crash when the Reset button is pressed, because they assume there will only be 25 huskies that are ever constructed during the entire run of the program, etc. This common problem sometimes prevents some of the very best Huskies from advancing in the tournament. Test your Husky with the Reset feature to make sure it doesn't crash!

When the simular resets the game, it calls reset on each of your Husky critters. If your class uses any static/shared state, it can be hard to clean that up properly. So therefore the simulator will also check for the following static method and call it on your Husky class if it is present (the header must match exactly):


public static void resetAll()

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 tournamnet as well. Your Husky must be your own work.

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

No credit, grades, or course benefits will be offered or awarded based on the tournament (see below). Winners will receive a hearty congratulations from Brett and the course staff and the pride of creating the strongest Husky of the quarter!

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.