Draw Algorithm
Drawing utilizes a random number generator that is seeded with a start time (http://linux.die.net/man/2/time, http://linux.die.net/man/3/rand).
Choosing Contestants for the Drawing
Choose a random position in the competitors list. Go through the list until a competitor fulfilling the criteria is found. The competitors are selected in the following order:
-
Seeded starting from the 1st seeded.
-
Competitors from the same club/country than the seeded starting from the 1st seeded's club/country.
-
Those competitors whose club/country has the most participants. If there is equal amount of participants club/country is selected randomly.
The third point is because it is easier to draw the competitors as far as possible from the other competitors from the same club or country.
Double Knockout
In double knockout systems the sheet is divided into two half tables (1 and 2). The half tables are divided into two quarter tables (A, B, C, and D). Drawing is conducted as follows:
-
Select a random half table, quarter table, and number for the 1st seeded.
-
Select a random quarter table and number from the other half table for the 2nd seeded.
-
For the 3rd seeded select a random number from the same half table but different quarter table than for the 2nd seeded.
-
For the 4th seeded select a random number from the same half table but different quarter table than for the 1st seeded.
-
Rest of the contestants are drawn in the previously explained order. Position in the table is defined using classification of the positions to ensure that competitors from the same club/country are spread as far from each other as possible.
Give “badness” points to the positions of the sheet:
- If there is an opponent for the position give one point.
- If the first opponent would be from the same club/country add 4 points for the position. If the opponent is seeded add one more point.
- Double the search area to four matches. If this wider area contains a competitor from the same club/country add another 5 or 6 points i.e. the second match would be against a contestant from the same club/country.
- Continue doubling the search area till the size of the area is a half table.
An example clarifies the algorithm. There is a table for a 16 player double knockout system. In the upper half is a competitor from the same club and in the lower half is another competitor from the same club:
|
|
6 |
6 |
6+6=12 |
|
|
6 |
6 |
6+6=12 |
Same club seeded |
6 |
6 |
6 |
6+6+6=18 |
|
7 |
6 |
6 |
7+6+6=19 |
|
|
|
6 |
6 |
|
|
|
6 |
6 |
|
|
|
6 |
6 |
|
|
|
6 |
6 |
|
|
|
5 |
5 |
|
|
|
5 |
5 |
|
|
|
5 |
5 |
|
|
|
5 |
5 |
|
6 |
5 |
5 |
5+5+5=16 |
Same club |
5 |
5 |
5 |
5+5+5=15 |
|
|
5 |
5 |
5+5=10 |
|
|
5 |
5 |
5+5=10 |
There are four positions with the least (5) “badness” points. Select one randomly. The table looks like this:
|
|
6 |
6 |
6+6=12 |
|
|
6 |
6 |
6+6=12 |
Same club seeded |
6 |
6 |
6 |
6+6+6=18 |
|
7 |
6 |
6 |
7+6+6=19 |
|
|
|
6 |
6 |
|
|
|
6 |
6 |
|
|
|
6 |
6 |
|
|
|
6 |
6 |
Competitor |
5 |
5 |
5 |
5+5+5=15 |
|
6 |
5 |
5 |
6+5+5=16 |
|
|
5 |
5 |
5+5=10 |
|
|
5 |
5 |
5+5=10 |
|
6 |
5 |
5 |
6+5+5=16 |
Same club |
5 |
5 |
5 |
5+5+5=15 |
|
|
5 |
5 |
5+5=10 |
|
|
5 |
5 |
5+5=10 |
The next competitor from the same club/country would be put in one of the positions with 6 points. Continuing like this it is always possible to find the best place far from the other competitors from the same club/country.
Pool
In pool system the competitors are drawn so that the last match will be between the two seeded. For example in a pool of five the first seeded will get randomly position 2 or 5 and the second seeded the other number.
Size of the pool |
Competitors of the last match |
2 |
1 - 2 |
3 |
2 - 3 |
4 |
2 - 3 |
5 |
2 - 5 |
Rest of the competitors are drawn so that the last match will not be against another competitor from the same club/country.
Double and Quad Pool
Seeded competitors will be drawn to different pools and so that the seeded will be in the pools last match. Also other competitors from the same club/country will be drawn to different pools, if possible. Drawing order is the same as in the double knockout system.
APPENDIX 4