Author Topic: Creation of the Spring 2006 Season Schedule  (Read 1434 times)

XtremeBain

  • Moderator
  • Autococker
  • Posts: 1470
Creation of the Spring 2006 Season Schedule
« on: February 08, 2006, 09:33:39 PM »
Just thought I'd take the time to document to creation of the schedule for those who are curious, or just so players can examine it for 'fairness'.

I was quietly hoping that no more clans would sign up since 9-10 clans would make an 8 week season really easy, and there isn't a whole lot of time to extend the season any longer than 8 weeks, but this morning when I had woke up there was an 11th clan registered so I had to examine a few scheduling alternatives.

With 11 clans you can't do a traditional bye system since only 8 clans would get bye'd during the season, and as result 3 clans would have completed an extra match.  Another idea was to split into 2 division, and may have gotten done if there were a few more European clans, but this also creates an uneven number of matches in each division.  I took to google and picked up a site (http://www.ocf.berkeley.edu/~quizbowl/schedules.html -- what a good read for scheduling) to try to get some ideas that could help out with the scheduling.  None of them could materialize into something which would be fair across the board.
Meanwhile I had picked up SCHED (http://www.mscs.dal.ca/~butler/sched.html) a tiny little DOS application which boasted the ability to create a round-robin schedule equal(or as close as possible) 'home'/'away' games.  The 'home' and 'away' positions in each week are useful for color and server determination in the upcoming season, so they have to be fair.  This program is exactly what I was going to make, and rather spend a day and a half figuring it out I took a few moments to enter in the team numbers 1-11 into the program and generate a schedule.  It makes the schedule based on what the side describes as Graph Theory (Looks like I have something to read up on when I get bored ;)).

I ran SCHED it produced an output file:
Code: [Select]

Round 1

1 - 6
11 - 3
2 - 8
4 - 10
7 - 9

Round 2

10 - 1
3 - 7
6 - 5
8 - 4
9 - 2

Round 3

1 - 8
2 - 3
4 - 9
5 - 10
7 - 11

Round 4

10 - 6
11 - 2
3 - 4
8 - 5
9 - 1

Round 5

1 - 3
2 - 7
4 - 11
5 - 9
6 - 8

Round 6

11 - 1
3 - 5
7 - 4
8 - 10
9 - 6

Round 7

1 - 7
10 - 9
4 - 2
5 - 11
6 - 3

Round 8

11 - 6
2 - 1
3 - 10
7 - 5
9 - 8

Round 9

1 - 4
10 - 11
5 - 2
6 - 7
8 - 3

Round 10

11 - 8
2 - 6
3 - 9
4 - 5
7 - 10

Round 11

10 - 2
5 - 1
6 - 4
8 - 7
9 - 11

Perfect!  It's just too bad that extending the season by 3 weeks is out of the question.  But then another idea came to me, why not just spread the 11 weeks across 8 weeks.  Seems good enough, this would give some clans 2 matches in certain weeks and one or a bye in others.  Since there's already 5 matches a round and 11 rounds, that creates 55 total matches to be played to ensure that every clan gets a chance to meet every other clan.  55 divides into 8 6.85 times, so I rounded up to an even 7.  I just went through the matches and starting separating them into groups of 7.  However, since #1 is normall in the top few positions of each round I had to adjust the matches such that the #1 team wouldn't get doubled up and byed so often.  I tried to spread this out as best as possible, but the more I played with it the worse I got it.  I finally settled with:
Code: [Select]
1 - 6
11 - 3
2 - 8
4 - 10
7 - 9
------
6 - 5
8 - 4
###########
10 - 1
3 - 7
9 - 2
------
1 - 8
2 - 3
4 - 9
5 - 10
###########
7 - 11
------
10 - 6
11 - 2
3 - 4
8 - 5
9 - 1
------
1 - 3
###########
2 - 7
4 - 11
5 - 9
6 - 8
------
11 - 1
3 - 5
8 - 10
###########
7 - 4
9 - 6
------
1 - 7
10 - 9
4 - 2
5 - 11
6 - 3
###########
------
11 - 6
2 - 1
3 - 10
7 - 5
9 - 8
------
1 - 4
10 - 11
###########
5 - 2
6 - 7
8 - 3
------
11 - 8
7 - 10
3 - 9
4 - 5
###########
2 - 6
------
10 - 2
5 - 1
6 - 4
8 - 7
9 - 11

###########

----- is the round divisions(there are 11 rounds)
#### is the week divisions (there are 8 weeks)

Seems like that should be okay :)

As for the preseason round I looked for the regular season week that provided the least duplicate matches and included every team.  I also selected a week outside of the first few weeks so that the clans wouldn't be meeting each other too soon into the season.  The sixth week looked like it provided what I wanted for, and I just had to cut out the 10-11 match to have only one duplicate(on Team 1).

Time to assign teams to each of the positions(1-11) and publish the schedule.  The assignment was done in a tiny php script I wrote to generate a random number for each registered clan.
Code: [Select]
<?PHP
$teams = array("Team eR33t", "DoP", "Cross Bones", "[QeHs]", "=|aB|=", "Rust", "GT", "MeMi", ">u", "krew", "[2b0]");
srand((float)microtime() * 1000000);
shuffle($teams);
for ($i = 0; $i < count($teams); $i++) {
$num = $i+1;
print "\"$num\"\t=>\t\"".$teams[$i]."\"\n";
}
?>

The initial array of team names were how they appeared in the database which is based on the order of resignation.  The shuffle() should take care of that anyway.
From the script I got the output:
Code: [Select]
"1" => "Team eR33t"
"2" => "DoP"
"3" => "MeMi"
"4" => ">u"
"5" => "Rust"
"6" => "Cross Bones"
"7" => "GT"
"8" => "[QeHs]"
"9" => "[2b0]"
"10" => "=|aB|="
"11" => "krew"

Then I just plugged all that into the season and it looked good.  Gave it all to Pierce and told him to make a post and here we are.

Leave any of your questions in this thread and I'll try to answer them as quickly as possible.