Use of a genetic algorithm in university scheduling for equitable and efficient determination of teaching assignments
Tom Bensky, Karl Saunders
Published: 2025/8/31
Abstract
Here a genetic algorithm (GA) is presented that creates a teaching schedule for a university physics department by algorithmically assigning ${\sim}200$ classes to ${\sim}50$ professors for each of three academic terms per year. The algorithm is driven by chromosomes of the GA that encode proposed pairings between enumerated lists of professors and classes. The fitness of the pairings is measured by considering both contractual work constraints and individual teaching preferences. The algorithm uses standard crossover and mutation operations to seek ever more optimal schedules over many generations. Here we detail the implementation and performance of the algorithm, including some interpretability findings. Overall, we are very pleased with the algorithm, as it is typically able to converge within minutes, with over $90\%$ of needed classes assigned. A metric is used to assign each professor's schedule a score, which measures how well their preferences were satisfied. These scores can be used to ensure longitudinal equity in the assignment of classes among professors.