Background: I have a group of 6 guys that get together and play pickleball every week. We play 2v2 and 2 players sit each game. We play 2 sets of 6 games each week (12 total games) - in each set, each player plays 4 games, and sits for 2 games. At the end of each set, each player totals up the amount of points he scores, and we have a winner.
Anyway, I worked out all the combinations of games for 6 people for playing doubles. There are a total of 45 unique games that could be played, where every combination of partners would play every other combination of partners. I would like to come up with a schedule to play all 45 of these games across 4 sessions of 2 sets each for a total of 8 sets (the final 3 games in the last set can be arbitrary since 6x8=48, and there are only 45 unique games).
The problem comes in with determining the order of the games, such that following criteria is met, for each of the sets of 6 games:
- Each player plays 4 games, and sits for 2 games.
- No player sits for 2 consecutive games.
- Each player partners with a different partner every game. (i.e. no 2 players partner more than once per set).
Where I could use help is figuring out the algorithm to come up with the optimal order of games. With 45 factorial possible orders ~1e56...it's too many to brute force. Any advice would be appreciated.
All the combinations for players A, B, C, D, E, and F: T1 T2 Bye AB CD EF AB CE DF AB CF DE AB DE CF AB DF CE AB EF CD AC BD EF AC BE DF AC BF DE AC DE BF AC DF BE AC EF BD AD BC EF AD BE CF AD BF CE AD CE BF AD CF BE AD EF BC AE BC DF AE BD CF AE BF CD AE CD BF AE CF BD AE DF BC AF BC DE AF BD CE AF BE CD AF CD BE AF CE BD AF DE BC BC DE AF BC DF AE BC EF AD BD CE AF BD CF AE BD EF AC BE CD AF BE CF AD BE DF AC BF CD AE BF CE AD BF DE AC CD EF AB CE DF AB CF DE AB
Tried writing a brute force algorithm in Excel VBA...seems like it was going to take forever to run.