Read the FAQ
Judo in Cloud algorithms
The algorithms we use
Below are the algorithms we use inside the program for all our operations. We believe in transparency and honesty, and we want to give you all the data to show you the correctness of our work.
Pre-competitive draws
For the non-competitive categories, the idea is to divide the athletes into many mini pools of at most 4, running several round robins, while keeping children of the same club as far apart as possible. For example, 5 athletes become one pool of 2 and one of 3, 8 athletes 2 pools of 4, and 9 athletes 3 pools of 3.
For each category, we take the list of athletes and sort them first randomly and then by club. Then we create a number of tournaments equal to the number of athletes divided by 4. Finally, we distribute the athletes as if we were dealing cards in a game: first athlete to the first bracket, second to the second and so on.
Best of three
For competitive categories with two athletes, the type of bracket we use is best of three. The athletes fight two matches, and if they have the same number of wins, a third match is held. The athletes always keep the same belt colour and do not swap between one match and the next, to make entering the tatami simpler.
Round robin
For competitive categories with three, four or five athletes, the type of bracket we use is the round robin (everyone against everyone). The athletes are sorted randomly and then all the pairings are created with the circle method.
For the ranking, only the judo points are counted: Ippon, double Waza-ari or opponent's Hansoku Make count as 10 points, Waza-ari counts as 1 point. If two athletes have the same score, the athlete who won the direct match ranks higher.
Double Elimination
For competitive categories with more than five athletes, the type of bracket we use is the double elimination tournament (or elimination with repechage).
We start by creating the bracket positions, dividing them among the four pools A,B,C,D, and then we shuffle them randomly. For example, for 16 athletes pool A uses positions 1,5,9,13 and we can randomize them into 5,13,9,1 (obviously the randomization is done by the computer and not manually).
We then sort the athletes by club and assign each one to a pool, as if we were dealing cards in a game: first athlete to pool A, second to B, third to C, fourth to D, fifth again to A and so on. When we give an athlete to a pool, we assign them the random order we created before: for example, the first athlete will be in position 5, the fifth athlete in position 13 and so on. In this way we ensure that athletes of the same club are split among different pools and that each pool is randomly ordered. We now have the athletes in a unique order that complies with the rules.
To create the matches, the algorithm is very interesting. We take the power of 2 closest to the number of athletes (8,16,32,...) and consider the extra positions we add as empty spots in the bracket. We start from a sequence of numbers (an array, for computer scientists) that contains only the number 1. For each cycle, we add to the right of each number the same number plus the cycle we are in. For example:
- 1: 1
--> add 1 to each element and append on the right
- 2: 1 2
--> add 2 to each element and append on the right
- 4: 1 3 2 4
--> add 4 to each element and append on the right
- 8: 1 5 3 7 2 6 4 8
--> add 8 to each element and append on the right
- 16: 1 9 5 13 3 11 7 15 2 10 6 14 4 12 8 16
For the repechages, the athletes who lost against one of the semi-finalists are placed in the correct positions.
For the final ranking, the winners and losers of the various finals are taken.
Calculation of the number and duration of matches
To estimate the duration of an age class, we compute n matches ✕ (match time + 1 extra minute) / n tatami. For example, 100 matches of 2 minutes each in a competition with 3 tatami will last approximately 100 ✕ (2+1) / 3 = about 100 minutes, that is one hour and forty minutes.
The matches of a category can be calculated starting from the number of athletes (let us call it n).
- Best of three, we count 2 matches;
- Round robin, (n² - n) / 2
- Pre-competitive pool, the calculations of the various mini round robins are added up
- Double Elimination, there is a specific formula. We have (n - 1) matches from the main bracket + (4 ✕ (log₂nn - 2)) from the repechages, where nn is the power of 2 closest to n. If the notation (log₂nn) is confusing, it is simply the number of columns with matches in the main bracket. The proof is left to the reader :P
Club ranking
For the club ranking, the points assigned based on the athletes' placings are the following:
- 1: 10
- 2: 8
- 3: 6
- 4: 4
- 5: 4 (only in double elimination tournaments)
Automatic tournament assignment
To divide the brackets automatically among the tables, the method is simple. First of all, we sort the brackets in descending order by number of matches.
At this point, we give one tournament at a time to the tatami with the fewest matches. In this way we ensure the optimal division of the matches, assuming however that all matches are equal. We make no distinction between different age classes (which may have different match times) or between categories (the lighter ones take on average less time than the heavier ones). Use this feature sparingly.