What approach would be best for trying to distribute the opponents equally in a Switch Doubles Round Robin Tournament, i.e. where you switch partners each round.
For example in a 8 player tournament you would play 7 rounds and play against each player 3 or 4 times and with every player once. When using the "rotate right" approach the playing with part is correct but the opponents are not distributed equally.
Several years ago, I was asked by a friend to provide a solution for a golf tournament round robin. Your problem is similar to that one. Here's how I would go about solving the problem:
a. select on pair from your round_combinations and:
i. delete the combination from your player combinations
ii. remove all combinations involving the players in your selection from the round_combinations.
iii. select a second pair and remove the pair from the player combinations and remove the pairs from the round combinations lists.
b. repeat until the round_combination list is empty
Here is the code used to implement this approach:
Yields: