It is possible to create your own competition systems. For those you need
- a text file that describes the logic, and
- SVG files that describe how the bracket looks like.
SVG file format and creation has been described in User Guide Appendix “SVG Templates for the Sheets”.
It is good practice to name your system so that it shows the system type and maximum number of competitors. For example knock-out system for 32 could have a base name “knock-out-32”. Thus logic file would be “knock-out-32.txt”. SVG files must have the same base name added with the page number. If your system needs two sheets the SVG files would be
“knock-out-32-1.svg” and “knock-out-32-2.svg”.
Logic file format
Edit logic file by using a plain text editor like notepad. The first line must contain information about the system:
- Long description
- Identification string. This must be unique between all systems.
- Minimum number of competitors
- Maximum number of competitors
Let’s make an IJF knock-out system for four competitors. Name of the logic file will be “knock-out-4.txt”. The first line is:
info "Knock-out for 4" "knockout4" 4 4
Note that there can be four competitors, no less, no more.
IJF rules say:
In case of four competitors a normal knock-out system will be used.
• The two winners will meet in the final
• The two losers will compete for bronze. Only one bronze medal is awarded.
Our competitors are called c1, c2, c3, and c4, i.e. letter ‘c’ followed by a number. A match line has the following syntax:
match name : competitor_1 competitor_2
In out example we need two preliminary matches for four competitors:
pool_a: c1 c2 pool_b: c3 c4
Next losers of the matches will fight for the bronze:
bronze: pool_a.2 pool_b.2
Competitors have format
- name of the previous match
- competitor’s position after the match(es)
pool_a.1 means winner of the match “pool_a” and “pool_a.2” means loser of the match (second position). In round robin system pool.3 would mean 3rd position after the pool has been finished. We need one more match for the gold medal:
final: pool_a.1 pool_b.1
Next we have to describe the results. Position lines:
pos1 final.1 pos2 final.2 pos3 bronze.1
Line starts with text “pos” followed by position number. Next there is fight name, a dot, and position number. The whole logic file is as follows:
info "Knock-out for 4" "knockout4" 4 4 pool_a: c1 c2 pool_b: c3 c4 bronze: pool_a.2 pool_b.2 final: pool_a.1 pool_b.1 pos1 final.1 pos2 final.2 pos3 bronze.1
While it is possible to define all the knock-out matches this way it will require unnecessary effort when the number of competitors increases. Next line shows a simpler way of describing a knock-out pool for eight competitors:
ko pool_a: c1 c2 c3 c4 c5 c6 c7 c8
The line starts with word “ko” followed by the pool name and the competitors. Note that competitor can be a person or result from previous fights. Let’s write a repechage system for 16 competitors:
info "Repechage 16" "repechage16" 9 16 ko pool_a: c1 c2 c3 c4 c5 c6 c7 c8 ko pool_b: c9 c10 c11 c12 c13 c14 c15 c16 ko rep_a: pool_a_2_1.1.p.2 pool_a_2_1.2 pool_a_2_2.1.p.2 pool_a_2_2.2 ko rep_b: pool_b_2_1.1.p.2 pool_b_2_1.2 pool_b_2_2.1.p.2 pool_b_2_2.2 bronze_1: rep_a.1 pool_b.2 bronze_2: rep_b.1 pool_a.2 final: pool_a.1 pool_b.1 pos1 final.1 pos2 final.2 pos3 bronze_1.1 pos4 bronze_2.1 3
Info line says that this system is for 9 – 16 competitors. There are two knock-out pools (pool_a and pool_b). Pool_a is depicted below:
Individual matches inside the pool are named by adding round number and fight number inside the round to the pool name. Line
ko rep_a: pool_a_2_1.1.p.2 pool_a_2_1.2 pool_a_2_2.1.p.2 pool_a_2_2.2
tells that this is a knock-out pool whose name is “rep_a”. The first competitor is “pool_a_2_1.1.p.2”. Let’s divide it into elements:
pool_a_2_1 = first match of the second round
.1 = winner of the match.
.p = winner’s previous match in round 1
.2 = loser of that match.
Second competitor is pool_a_2_1.2, which means:
pool_a_2_1 = first match of the second round
.2 = loser of the match.
Round 2 winners are semifinalists and we want to find competitors who have lost to them. Loser of the match “pool_a_2_1” is one of them, but to find the other we must go back to the first round and find out who lost that match to the semifinalist. In general follow the process:
- find a match
- choose winner or loser (.1 or .2)
- choose previous (.p) to access winner’s or loser’s previous match
- choose winner or looser (.1 or .2) of that match
- choose previous (.p) to go further towards earlier matches
In repechage for 32 players you would have a competitor “pool_3_2.1.p.1.p.2”:
pool_a_3_2 = second match of the 3rd round
.1 = winner of the match
.p = winner’s previous match in round 2
.1 = winner of the round 2 match (same competitor)
.p = previous match in round 1
.2 = loser of the round 1 match.
bronze_1: rep_a.1 pool_b.2 bronze_2: rep_b.1 pool_a.2 final: pool_a.1 pool_b.1
tells us that there are two bronzes. Bronze matches are between losers of the pools and winners of the repechage pools. Match for gold medal is between winners of the pools.
Finally there are lines for the positions:
pos1 final.1 pos2 final.2 pos3 bronze_1.1 pos4 bronze_2.1 3
Notice that the second bronze has position 4. Positions are just unique numbers who by the default mean also the real position. Since the second bronze is really position 3 there is an additional number ‘3’ in the end of the line. That overrides the default value 4.
In round robin system each competitor fights against all the others. Line for 5 competitor system would look like:
rr poolname : c1 c2 c3 c4 c5
Poolname is a descriptive identification. Winner is poolname.1, 2nd is poolname.2, 3rd is poolname.3 etc.
Example: Create a system where are two 5 player round robin pools whose two best go to a knock-out system. Winner of pool A fights against the 2nd of pool B and vice versa.
info “Double pool 10” doublepool10 10 10 rr pool_a: c1 c2 c3 c4 c5 rr pool_b: c6 c7 c8 c9 c10 semi_a: pool_a.1 pool_b.2 semi_b: pool_b.1 pool_a.2 final: semi_a.1 semi_b.1 pos1 final.1 pos2 final.2 pos3 semi_a.2 pos4 semi_b.2 3