Selent and students prepare for battle

Written by Jane Halpern on Tue, 02/04/2020 - 08:43 |
Doug Selent and student

Somewhere, right now, on the University of Wisconsin-Platteville’s idyllic rural campus, a battle is brewing. Dr. Doug Selent’s students are feverishly perfecting their programmed pets for Pokemon-style virtual combat, in a game tournament the software engineering assistant professor calls “Battle Pets.”

“The purpose of Battle Pets is to for students to learn good Object-Oriented Programming and Design to create maintainable, reusable, and extendable software,” said Selent, who launched the first Battle Pets project last year in an attempt to make programming skills more relatable and immediate than a textbook exercise. “With Battle Pets, I get to try a large amount of Active Learning techniques, which are drastically more effective than any lecture format (from my own observation).”

The basic structure of Battle Pets is simple: students pick one of three pets as their “fighter” in a series of rounds conducted much like “rock, paper, scissors.” The virtual pets have a small set of attack moves (Rock Throw, Scissors Poke, Paper Cut, Reversal of Fortune, and Shoot the Moon) which inflict damage based on the pet type, the opponent’s skill choices and an element of random chance. Each skill has a recharge time associated with it, such that the same skill cannot be used consecutively.

A fight consists of multiple rounds, where each pet will simultaneously choose a skill to attack with,” explained Selent. “The fight ends when all opposing pets drop below zero hp (hit points) and fall asleep.”

Selent has structured an entire class around the wildly popular game. “Students work in teams of four to five over the course of the semester to complete biweekly programming assignments related to different parts of the game,” he said. “Students do not know what features will be added to the game in the next homework assignment, therefore having a good design will allow their programs to be more flexible and support unexpected new features.”

As the course progresses, Selent incorporates lessons not only in specific programming techniques, but in the kinds of research skills his students will need to succeed in software development careers.

“The newest thing I have been trying is a Just-In-Time-Learning-Model for the ‘Just-Google-It Era,’ "which encourages students to look up information as needed, rather than memorizing it,” said Selent. “I often give in-class problems for teams to solve and encourage them to Google the solutions before I go over the problem.”

Besides developing research skills, Selent’s students learn the importance of carefully thinking through their program design before building. “After a few homework assignments, students realize the importance of a good program design,” said Selent. “By the end of the course, they will have completed a software application significantly larger than anything completed in previous courses and have learned good software design. I have seen greatly improved programming over the course of the project.  Several minor improvements can make a big difference in the quality of the code (e.g. following programming conventions).”

The end goal of the course? Tournament glory. In the final homework assignment of the semester, Selent’s students must create an AI program which will guide their pet to compete with all the other pets in a single elimination tournament, known as the Battle Pets King of the Ring Tournament. The tournament draws a crowd — not only Selent’s 70-plus students, but also guests and friends who come to share in the excitement.

I ran the final-four of the tournament in the lecture hall during the final exam period in a battle consisting of 1,001 fights, where the winner of the most fights wins the battle,” said Selent.

The tournament is followed by a Battle Royale (a circular fight between all the pets); a Legends Battle Royale, which includes pets from previous years; and finally a Battle for the G.O.A.T., in which the previous year’s King of the Ring Tournament winner competes against the current year’s winner.

“This year we created a tournament mode using the Iterator pattern,” said Selent. “Next year, there will be a different assignment using a combination of design patterns to add another feature to the game.”  But, in true Battle Pets fashion, Selent isn’t giving anything away to his eager students. “The details are a secret.”

Let the battle begin.