Opinion

The sorting hat goes digital Student-made algorithm aids English electives

Thanks to last year’s students in Advanced Topics in Computer Science, the Upper School English Department now has an efficient program to sort rising seniors into their desired electives. The class, which consisted of students Cassandra Kane, Vishnu Murale, Jeffrey Yao, Ryan Guan, Alex Lichtenberger, Aaron Kaufer, Jack Flahive, Gautam Mitra (all ’17), and Elisa Tabor ’18, created the program for their Senior Spring Project under Math and Computer Science Teacher Kelly Pendergast. 

The students initially thought about the program when English Department Head Sharon Krauss approached them with her problem: the tedious and time-consuming task of hand-sorting every rising senior into their first- or second-choice elective while also accounting for class size and gender imbalance. 

“There were a lot of piles on my dining room table!” Ms. Krauss said, looking back at the arduous process from previous years. 

“Because some classes have many more requests as a first choice than others, I have to go to other people’s second choices and try to fill everything, because we can’t have a class of 47 and then a class of five.”

Ms. Krauss had taken note of the amount of time she spent sorting the students, and although each year differed, she said the process required anywhere from seven to 20 hours. 

With the new code, however, rising seniors can be sorted into classes at the touch of a button. Ms. Krauss can input individual students’ top three preferences, the ideal gender balance, and the ideal class size for each course, and the program will create an optimal arrangement. 

Cassandra said the algorithm behind the optimization proved challenging when they went about writing it. The students originally had different strategies on how to approach the project, but they settled on using Python, applying a type of point system to sort the students. The program assigned points to ideal scenarios and then generated the most favorable arrangement so that as many students as possible could have their first choice, with class size and gender relatively balanced. The user of the algorithm can adjust these factors so that for example, Ms. Krauss can decide the degree of importance of gender balance for a specific class.

Using the program this year, Ms. Krauss still combed through the computer-sorted classes by hand to prioritize the students’ preferences over any other factor, but the program saved her many hours of work. 

“It was very cool—almost immediately, we had these results,” she said. “We got the initial  sort so much more quickly than when I have had to do it by hand.” 

Cassandra said that she was proud of the program’s results and enjoyed working with friends on a valuable project. 

“It was an incredibly rewarding experience,” Cassandra said, “and a great way to finish off the year.”

Leave a Comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.