Lets imagine there are 8 players attending to beach volley event. Matches are played 2 vs 2.
As organiser i want to generate schedule for players with the following rules:
- each player plays together with everyone (7 matches for each player)
- each player plays twice against each player
So the schedule would start for example:
round 1
player1 + player2 vs player3 + player4
player5 + player6 vs player7 + player8
round2
player1 + player3 vs player2 + player5
player4 + player7 vs player6 + player8
round3
player1 + player4 vs player2 + player3
player5 + player8 vs player6 + player7
etc
With the example above lets think about the player1. He has been playing together with players (2,3,4) so he has matches left together with players (5,6,7,8)
He has been playing against:
Player3 (twice)
Player4
Player2 (twice)
Player5
So the remaining 4 matches (for player 1) should be played together with players 5,6,7,8 and the opponents cant be player3 or player2 (as you have played twice against those)
I have seen the great examples here How to automatically generate a sports league schedule and wikipedia article about round robin https://en.wikipedia.org/wiki/Round-robin_tournament (Original construction of pairing tables by Richard Schurig (1886)) works fine for generating the matches, but with that there will be more than two matches against some players.
I really appreciate any help!