Guildford Optimizer
This is the 2-Person Guildford Optimizer. To start, input your times for each event in seconds for both competitors.
If you don't have times readily available, you can input a WCA ID to automatically fetch the latest average for each event. Modify the Solve count to process field to use a different number of solves for the average calculation.
Select a relay preset or create a custom relay by clicking event icons. The optimizer will find the optimal distribution of events between the two competitors to minimize total time.
If a competitor cannot solve a puzzle or you want to exclude it, enter DNF as the time.
Results
How this works
The Guildford Optimizer finds the most balanced way to split events between two competitors using a Depth-First Search (DFS)algorithm with pruning.
Algorithm Overview
-
Binary Assignment:
Each event is assigned to exactly one competitor. With n events, this creates 2ⁿ possible combinations. -
Depth-First Search:
The algorithm explores these combinations by recursively assigning events and maintaining running totals for both competitors. -
Pruning:
If the larger of the two running totals is already greater than or equal to the best solution found so far, the branch is abandoned. Since future assignments can only increase time, this branch cannot be optimal. -
Guaranteed Optimal Result:
All combinations that could possibly beat the current best solution are explored, guaranteeing the optimal distribution.
Why this is the fastest possible exact solution
This problem is a form of the balanced partition problem, which requires examining combinations of assignments to determine the optimal split. Any algorithm that guarantees the exact optimal solution must, in the worst case, distinguish between all 2ⁿ possible assignments.
The optimizer matches this theoretical lower bound while improving real-world performance:
No unnecessary work: DFS explores only one branch at a time, using constant extra memory and avoiding redundant recomputation.
Provably safe pruning: Branches are discarded only when they cannot outperform an existing solution, ensuring correctness while reducing search space.
Asymptotically optimal: In the worst case, no algorithm can do better than exponential time for this problem while still guaranteeing optimality.
As a result, this approach is provably as fast as any exact algorithm can be, while often running far faster in practice due to aggressive pruning.
This was the process for these times: