Round Robin Tournament Scheduling
Schedules - You must register to Post and Download => Programming => Topic started by: skhurams on March 09, 2013, 07:29:28 AM
-
Hi im working on football league website now I'm stuck in simple but complex module. I want to generate matches for leagues, knockout and mix (leagues and knockout) and each may have single or home/away matches . Can any one help me ??
-
You don't need to reinvent the wheel. ;) There are many resources on this site you can check out and my own contribution is here (http://home.comcast.net/~wporter211/realsite/chess_etc/rrpair.htm)--just download or click on view source to see how it works. It's JavaScript so it should be easy to understand and/or transcribe.
-
I was unable to find any resources regarding round robin and double round-robin and knockout tournament. The link you gave was in javascript and I was having problem converting your code to C#. Could you give any link specific to C# if any...
-
Found it on my old site: rrpair.c (http://bellsouthpwp.net/w/b/wbport/chess_etc/rrpair.c). IMHO it would be worthwhile to study how the JavaScript version works than to use this old C program. Other than the loss of pointers, I found it fairly easy to pick up JavaScript after a C background.
The site I gave in the first post has links to other pages showing how a RR works. For a (for example) a 12 person (team) RR, player 12 sits on his own card table near the end of a loooong table where the rest of the chess sets are ready to go. Assuming a "ribbon" of players (will have an odd number), 1 starts with White on 12's card table while the rest of the players are seated in order in every other position. If done correctly, the pairings are 1-12, 11-2, 10-3, 9-4, etc. With the exception of 12, add 1 to each player's current opponent to get the next one (1 follows 11). When one's own number is reached, play 12 on the card table.
The color assignments (or home/away status) are fixed at every position except on the card table. The player here is the ghost since he won't exist if there are an odd number of players.
-
There are also descriptions of simple algorithms that you could code.
The basic cyclic algorithm here (https://www.devenezia.com/downloads/round-robin/index.html). An enhancement to get court/field balance, an implementation of the latter in Excel VBA.
Knockout tournaments (http://en.wikipedia.org/wiki/Single-elimination_tournament) are fairly easy to schedule, so you may find it is best to start from scratch.