Crafting Fairness, Board Game League Scheduling with Local Search
by Lucas Zhang
Posted on October 16, 2023
Crafting Fairness, Board Game League Scheduling with Local Search
by Lucas Zhang
Posted on October 16, 2023
Scheduling weekly games for a board game league can be a daunting task, especially when fairness is a top priority.
The Scheduling Challenge
In this blog post, we will dive into the intriguing world of local search algorithms to create a balanced and equitable league schedule for our 13-player board game league. To keep it consistent, we’ve named our players A, B, C, D, E, F, G, H, I, J, K, L, and M.
Our challenge is to design a 13-week league schedule where each week, one player receives a “bye” (a week off), and the other 12 players participate in three games, with each player playing one game. The aim is to create a schedule that meets the following fairness criteria:
Player Versatility: Each player should play against every other player at least once throughout the league.
Diverse Opponents: Each player should have different opponents as often as possible to promote variety and fairness.
No Repeat Games: Avoid having the exact same four players play against each other in multiple weeks if possible.
Setting up the Local Search
We’ll start by representing a full 13-week league schedule using a complete-state formulation. Then, we’ll construct an objective function that scores the schedule based on the fairness metrics mentioned above. This objective function will guide the local search algorithms in finding an optimal league schedule.
Hill Climbing
Hill climbing is a local search algorithm that iteratively makes small changes to the current solution in the hopes of reaching a better one. In the code below, we’ll implement a version of First-Choice Hill Climbing with Random Restarts to find a schedule that maximizes fairness.
First-choice hill climbing employs a stochastic hill climbing approach, where it randomly generates successor solutions until one surpasses the quality of the current state. This strategy proves effective when a state boasts a multitude of potential successors. In the code below, we will also restart the program to find the best schedule.
Simulated Annealing
Simulated annealing is another local search algorithm inspired by the annealing process in metallurgy. It allows us to escape local optima by accepting less favorable moves with a decreasing probability. We’ll also implement a version of simulated annealing to search for an improved league schedule.
Output
Using the algorithms above, we can find a quite balanced schedule for this board game.