Round Robin Tournament Scheduling

### Recent Posts

1
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by Ian Wakeling on Today at 09:14:42 AM »
Thanks for posting all your workings here.  Like you, I am also not sure if this will generalize to more than 6.  Let me know if you get stuck on 8+ teams and I might implement my suggestion above.
2
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by masipila on June 06, 2023, 03:51:45 AM »
Thanks for the suggestion!

I was thinking more about this in the morning and tried an approach (manually in Excel) which applied perfectly to 6 teams on 2 sheets. I haven't tried yet how generally applicable this would be for other team and sheet counts.

Here's how I approached this:

1. Generate an ideal schedule without considering the court limitations
I used this: https://www.devenezia.com/round-robin/forum/index.php?topic=281.0

The result is as follows, observe that the home / away is ideally balanced already.

2. Re-allocate the sheets, iterating the games from team 1 onwards. Allocate the games using a snake.

Iteration after considering team 1:

Then move on to the remaining games of team 2. The first new game will be allocated to sheet 2 and the next one also on sheet 2 so that the snake will also apply to team 2.

Then move on to team 3. Team 3 previously has two games on sheet 1 and 0 on sheet 2 so we will start from sheet 2. Also the second new game will be allocated to sheet 2 because of the snake rule.

Then move on to team 4. Team 4 previously has two games on sheet 1 and one on sheet 2, so we will allocate the first new game to sheet 2.

Then move on to team 5. Team 5 previously has one game on sheet 1 and 2 games on sheet 2 so we will allocate the new game on sheet 1.

Then move on to team 6. Team 6 previously has one game on sheet 1 and three games on sheet 2, so the new game will be allocated on sheet 1.

This result fulfills the requirements of an "ideal" schedule and as mentioned, seems to apply to at least 6 team round robin on two sheets.

Cheers,
Markus
3
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by Ian Wakeling on June 05, 2023, 12:32:01 PM »
To automate the assignment of home and away I would create an algorithm based on the matrix below which records the frequency of H/A games on the two sheets.

 HS1 AS1 HS2 AS2 T1 2 1 1 1 T2 1 2 1 1 T3 1 1 2 1 T4 2 1 1 1 T5 1 1 1 2 T6 1 2 1 1

So column HS1 for example counts home games on sheet 1, and team 1 has two such games.  The matrix above is calculated for your ideal solution, and as such the sum of squares of all the matrix elements is 42, the lowest that it can be.  Any other sub-optimal solution will have a higher sum of squares.  This provides the basis for an algorithm starting from a sub-optimal schedule, consider swapping H/A for each game in turn and pick one of the swaps that provides the biggest decrease in the sum of squares of the matrix.  Iterate this process until you reach an ideal schedule.  If the algorithm gets stuck, then you may need to stop it returning to a state that it has just visited.

[edited to correct a few typos]
4
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by masipila on June 04, 2023, 03:05:07 PM »
Thanks for your thoughts!

From your example, it is possible to get a mathematically ideal solution with the "2nd pass" approach you suggested, i.e. keep the pairs but try to swap the home / away teams in each game so that the court is kept but the only thing that changes is the home / away team.

For example like this_
- here each team plays 2-3 games on each court
- and each team plays 1-2 times as home / away on each court
- ... which fulfills the criteria of "ideal" which I defined in the beginning

Now, the big question here is that what would be an algorithmic approach to do this, now I was doing the home/away balancing by staring at the data and with a couple of rounds of trial and error I was able to do this. But the whole point what I'm trying to achieve here is to save the tournament organizers' time so that an algorithm would be able to produce them as ideal schedule proposal as possible...

5
##### Requests / Re: Pickleball Round Robin 3 courts
« Last post by Ian Wakeling on June 04, 2023, 12:12:50 PM »
I have looked at the 3 court scenarios.  For 12 players use the standard whist schedule for 12 items and remove the last round - you can find an example here.  The other schedules will all have some players having one more game than others - I can find reasonable solutions for 13, 14 and 15 players but I think 16 players is particularly difficult and I have nothing good yet.  Below each game (A B C D) should be played as (A B vs C D).

13 players 3 courts 10 rounds
(10  7  8  3) ( 2  9 11 13) ( 5 12  4  6)  ( 1)
(10  5  1 13) ( 8  2 12  9) (11  6  7  4)  ( 3)
(13  6 12  1) ( 7  5  9 10) ( 8 11  3  2)  ( 4)
( 8 12  4 10) ( 9  1  6  3) (13  7  2 11)  ( 5)
( 8 13  1  6) (10 12  9 11) ( 4  3  2  5)  ( 7)
( 5 11  9  6) ( 7  1  2 12) (10  3  4 13)  ( 8)
( 4  1 11  7) (10  8  6  2) (12 13  3  5)  ( 9)
( 8  7  5 13) (12  6  3 11) ( 4  9  1  2)  (10)
( 5  6  7  2) ( 8  4  9 13) (11 10  1  3)  (12)
(12  3  7  9) ( 5  8 11  1) ( 4  2 10  6)  (13)

14 players 3 courts 10 rounds
( 8 14  7 11) ( 6 12  4  1) (13  5  3 10)  ( 2  9)
( 7 13  8 12) ( 5 11  3  2) (14  6  4  9)  ( 1 10)
(11 10  4  7) (14  1 13  9) ( 6  2  3 12)  ( 5  8)
(12  9  3  8) (13  2 14 10) ( 5  1  4 11)  ( 6  7)
( 2 12 14 11) ( 9  1 10  8) (13  6  7  5)  ( 4  3)
(11  8 10  6) ( 1  3 14  7) ( 2  9  4  5)  (12 13)
(12  7  9  5) ( 2  4 13  8) ( 1 10  3  6)  (11 14)
( 1 11 13 12) (10  2  9  7) (14  5  8  6)  ( 3  4)
(13 11  9  6) ( 2  5  1  8) ( 3  7 14  4)  (12 10)
(14 12 10  5) ( 1  6  2  7) ( 4  8 13  3)  (11  9)

15 players 3 courts 10 rounds
( 1  9 15 11) (5  4 10  6) ( 3 12 14  7)    (2 13  8)
( 2 10 11 12) (1  5  6  7) ( 4 13 15  8)    (3 14  9)
( 3  6 12 13) (2  1  7  8) ( 5 14 11  9)    (4 15 10)
( 4  7 13 14) (3  2  8  9) ( 1 15 12 10)    (5 11  6)
( 5  8 14 15) (4  3  9 10) ( 2 11 13  6)    (1 12  7)

( 6  2 14 10) (3  1 11  4) (12  9 13  7)    (5 15  8)
( 7  3 15  6) (4  2 12  5) (13 10 14  8)    (1 11  9)
( 8  4 11  7) (5  3 13  1) (14  6 15  9)    (2 12 10)
( 9  5 12  8) (1  4 14  2) (15  7 11 10)    (3 13  6)
(10  1 13  9) (2  5 15  3) (11  8 12  6)    (4 14  7)
6
##### Programming / Re: Darts Mixed Doubles (rotating partners) - 4 game draw
« Last post by Ian Wakeling on June 04, 2023, 11:41:38 AM »
I don't have any software that will generate suitable schedules for you - in particular I have nothing that will help with your requirement to consider the ranks of the four players in each game.  Nevertheless, I have attempted to make a schedule for the first situation that you list - this is actually the easiest for me.

Board A        Board B        Board C        Board D        Board E        Board F                 Scorers/Byes
A  B  C  D  E  F Bye
(19 12 v  6 27) (14 13 v 20  3) (31 16 v  4 11) (28 10 v  1 29) (24 22 v 30 23) (21  9 v  8 25)  [ 2  5  7 15 17 18 26]
(23 27 v 20  1) (17 16 v  8 15) (25 13 v  2  5) (11  3 v 26 18) (10 21 v 19 31) ( 7  6 v 14 24)  [ 9 12 22 28 29 30  4]
(26 24 v 20 31) ( 2 12 v 17 28) ( 6 21 v  3  1) (25 22 v 19 29) ( 5 27 v 30  9) (18 10 v  7 15)  [ 4  8 11 13 16 23 14]
(29  8 v  6 31) ( 7  4 v 17 25) (23 26 v 14  5) (18 13 v 28 19) ( 2  3 v 16 30) (15 11 v  9 12)  [ 1 10 20 21 24 27 22]
(28  4 v  9 23) (17 24 v 29 21) (11  7 v 22  2) (15 30 v 26  1) (13 10 v 12  8) ( 5 16 v 20 18)  [ 3  6 14 19 25 31 27]
( 4 14 v 22 27) [scored by 26]
7
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by Ian Wakeling on June 04, 2023, 07:28:14 AM »
Thanks for your reply.  I don't know of any simple mathematical construction here.  If I were doing this I think I would take a two part approach - firstly I would make the basic schedule, balancing sheets but without considering home and away, and then in phase 2 I would swap around the left and right teams from each pair to optimize the home and away.  I do have an algorithm that will do the first part, it's an iterative approach placing all the games randomly in the schedule to begin with, and then moves games around to balance out the sheets and keep all the teams in a round unique.  For example this gives me:

(5 6) (1 3)
(2 4) (1 6)
------------
(1 5) (2 6)
(2 3) (4 5)
------------
(1 2) (3 4)
(4 6) (3 5)
------------
(3 6) (2 5)
(1 4) (---)

Where teams play either two or three times on each sheet.  The teams also play at least once, and at most twice, in each of the groups of two rounds in between the dashed lines.  The algorithm finds this easily so I suspect it is always possible to do this.  Perhaps you could use this as the starting point to balance home/away.

Regards,  Ian
8
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by masipila on June 04, 2023, 05:08:30 AM »
I'm looking for an ideally balanced result with two objectives:
- Each team plays on each court the same amount of games (or as close as it is mathematically possible)
- Each team has the same amount of home/away games (or as close as it is mathematically possible)

The rationale for these objectives in the sport of curling is that:
- Each court (sheet of ice) has their own characteristics
- The away team has an advantage of having a second pre-game practice. The home team has the first pre-game practice.

With the algorithm mentioned on my opening post, I'm able produce this:

Round 1 (3 6) (1 2) (4 5)
Round 2 (6 2) (5 3) (1 4)
Round 3 (4 3) (2 5) (6 1)
Round 4 (2 4) (3 1) (5 6)
Round 5 (1 5) (6 4) (2 3)

This is ideal, if our curling halls would have 3 sheets of ice (courts). But they only have 2, so I need to move the games that are scheduled for court #3 to courts 1-2.

The issue that I have here is how to do that so that the result would still be as balanced as possible.

If I just move the games from court #3 to the two courts as rounds 6-8, the result would be for example this:

Round 1 (3 6) (1 2)
Round 2 (6 2) (5 3)
Round 3 (4 3) (2 5)
Round 4 (2 4) (3 1)
Round 5 (1 5) (6 4)
Round 6 (4 5) (6 1)
Round 7 (1 4) (5 6)
Round 8 (2 3)

Considerations for "what is ideal"
- All teams have 5 games.
- Ideally they would all play twice on both courts, once as home and once as away team
- It's unavoidable that each team will play their fifth game with a court + home/away combination that has already occurred

Analysis of the above schedule:
- Team 1: plays twice on court #1, but both times as home team. Not ideal.
- Team 2: ideal
- Team 3: ideal
- Team 4: plays 4 games on court #1 and only once on court #2. Not ideal.
- Team 5: plays twice on court #1, but both times as away team. Not ideal.
- Team 6: ideal

So my question here is that is it mathematically possible to get a better result to begin with and if yes, what would be an algorithm that would produce that...

Cheers,
Markus

edit: I elaborated why the curling-specific rationale to the beginning of this comment.
9
##### Mathematics / Re: Court balanced rond robin with limited number of courts
« Last post by Ian Wakeling on June 04, 2023, 04:42:32 AM »
If I am understanding correctly then you can do what you want by slicing up the full tournament.  So take the standard cyclic schedule for 6 players  :

 Round 1 1 6 2 5 3 4 Round 2 1 5 4 6 2 3 Round 3 1 4 3 5 2 6 Round 4 1 3 2 4 5 6 Round 5 1 2 3 6 4 5

(I made this by going here and choosing 'cyclic' and '6 items').  Now remove the last column so you have 5 rounds for 2 courts, and  then rearrange the removed games as follows:

Round 6 (3 4) (2 6)
Round 7 (2 3) (5 6)
Round 8 (4 5) (- -)

If there are 8 teams then you just cut each round into 2 halves.  For 10 teams cut the first four columns into halves and rearrange the last column.

Ian
10
##### Mathematics / Court balanced rond robin with limited number of courts
« Last post by masipila on June 04, 2023, 03:16:48 AM »
Hi all,

First of all, big Thank You! I've read through the thread linked below and implemented a schedule optimizer to the result service of my website to help curling tournament organizers generate round robin schedules: https://www.devenezia.com/round-robin/forum/index.php?topic=281.0

The algorithm described there assumes that there are as many courts available that is needed. For example with 8 teams, there will be 4 courts and the games will be distributed to these 4 courts ideally. So far so god.

Now to my question. One of the most typical scenarios we have here in Finland for the sport of curling is that we have groups / pools of 6 teams and the games need to be distributed to 2 courts (we have curling halls which have 2 courts).

I can easily generate an optimal schedule for 3 courts and then I can try to manually tweak the result and try to move the games from court 3 to courts 1 and 2 in Excel but I haven't figured out a systematic way how to do it ideally. In other words, I haven't been able to figure out an algorithm how to achieve the optimal result.

Any thoughts on this?