Please keep the forum protocol in mind when posting.

Tournament Operations » Post: Pairing Algorithm

Pairing Algorithm

Feb. 2, 2014 01:53:30 PM

Johannes Kühnel
Tournament Organizer

German-speaking countries

Pairing Algorithm

I've written a web app to manage small tournaments without the need of WER/DCIR and its limitation of being Windows-only.

The app is finished, but I need some help in optimizing the pairing algorithm (I'll post it in the Judging Technology section, once I've figured out the pairing details).

MTR says nothing about how the pairing works specifically, just saying “Unless otherwise announced, tournaments are assumed to follow the Swiss pairing algorithm.”

www.wizards.com/dci/downloads/Swiss_Pairings.pdf‎ and http://www.wizards.com/dci/downloads/TOHndBk_Feb_5_07.pdf both say

1. Pair players randomly for the first round by shuffling the note cards. Keep the paired cards together for the rest of the round. If you have an odd number of players, the player remaining once pairings are completed receives a bye, which equals two game wins (6 game points) and one match win (3 match points).

2. After the first round, record match results (best 2 out of 3 games) on the players’ note cards. When participants complete a match, they must report the results.

3. For all subsequent rounds after the first, pair players with the same match points against each other randomly. (If there is an odd number, match one player from that group with a person from the group with the next-highest match points.) Do not use tiebreakers when pairing between rounds.

4. Continue these match-point-based pairings until you get to the bottom of the list. If you have one player left at the bottom of the list, that player receives a bye. (To see what this bye is worth, see 1. above.)

5. As players finish each round, record on their note cards the score of the match they just completed and their total running score. In addition, write the opponent’s name

So, the pairings for the first round are random, that's clear.
For the subsequent round, however, I'd like to know, if there is any restriction in whether the two paired players have already played each other. e.g. if the two players have played each other before, pair them against another one with the same amount of points, if possible.
I'm asking because the proposed method could result in a significant amount of “double” pairings in smaller tournaments and Wikipedia says “No player is paired up with the same opponent twice.” in its article.

I've also read, that the last round is handled differently, but I'm unsure about it, since there was no official document backing it up.
http://www.channelfireball.com/home/here-i-ruel-figuring-out-tiebreakers/ & http://www.gatheringmagic.com/chrismascioli-032212-tiebreakers/

Another question I have, is how these “double” pairings (players play each other more than once) affect the tie-breakers. Do they count as one opponent or just like another one with the same scores?

Hope someone can shed some light on this and help me out. :)
Thanks in advance!

Edited Johannes Kühnel (Feb. 2, 2014 02:02:11 PM)

Feb. 2, 2014 02:33:13 PM

Scott Marshall
Forum Moderator
Judge (Level 4 (Judge Foundry)), Hall of Fame

USA - Southwest

Pairing Algorithm

Interesting! I fear that you won't be able to report sanctioned events using this app, but it could still be useful for casual, unsanctioned events.

Players are almost NEVER paired against each other twice during the Swiss rounds, except for multi-format events. For example, Kibler and LSV could be paired in rounds three and four at a Pro Tour, since 1-3 are draft, 4-8 are constructed. (Although I suspect that would require some very unusual results in those first three rounds.)

For your purposes, it should be fairly simple: never pair two players twice during the Swiss.

Feb. 2, 2014 02:43:46 PM

Johannes Kühnel
Tournament Organizer

German-speaking countries

Pairing Algorithm

Thanks for the answer! I should have mentioned, that the site is aimed for non-sanctioned events, but reporting could be done afterwards, when you have access to WER again, right?

It would still be interesting how these things are handled by WER or official guidelines, since I'm uncomfortable with not knowing how things work exactly. An official answer for the tiebreaker and last round handling would be highly appreciated. ^^

Feb. 2, 2014 03:17:21 PM

Eric Crump
Judge (Uncertified)

USA - Great Lakes

Pairing Algorithm

Having libraries in a few different languages could be really helpful. .Net, Javascript, Objective C, etc. I bet all of us software engineers and GUI/Usability people could come up with some pretty awesome stuff.

Feb. 2, 2014 03:30:02 PM

Johannes Kühnel
Tournament Organizer

German-speaking countries

Pairing Algorithm

@Eric
Not sure, how this is related to my questions. FYI: The site is using Javascript and HTML5, so it's cross-platform and has a nice UI thanks to jQuery Mobile. If you want to discuss more technology or app related stuff, hit me with a PM or wait for the thread in “Judging Technology” and we can talk about it there. :)

Feb. 2, 2014 07:16:19 PM

Shawn Doherty
Judge (Level 5 (Judge Foundry))

USA - Midatlantic

Pairing Algorithm

Since this has moved slightly to pairing method, I'll clarify that last one.

If there were 4 players with 9 pts and 2 with 7 pts, but they have played each other, then the two 7pts players would both be paired down to players with 6pts. The only time in a normal event where two players should be paired twice during Swiss is if one player has played every player in the event once already.

Feb. 2, 2014 07:34:31 PM

Johannes Kühnel
Tournament Organizer

German-speaking countries

Pairing Algorithm

Originally posted by Ward Poulisse:

more on-topic: I would love some sort of WER-equivalent on a tablet or ipad for FNMs and similar, especially if I could upload without too much hassle. A friend of mine said he'd even buy a tablet if he could run FNMs on it.
I could implement such an export feature, if WER allows for tournament/result import and I figure out the file format.
Alternatively I could just provide views for every round, so you can enter the rounds and results manually in WER, once you have access.

Thread in Judging Technology

Edited Johannes Kühnel (Feb. 2, 2014 07:50:51 PM)

Feb. 3, 2014 05:51:47 PM

John Temple
Judge (Level 3 (Judge Academy)), Scorekeeper, Tournament Organizer

Chicago, Illinois, United States

Pairing Algorithm

This is a really cool tool.
The only major problem I see is not being able to see standings prior to
the end of the tournament.

Feb. 3, 2014 07:18:27 PM

Johannes Kühnel
Tournament Organizer

German-speaking countries

Pairing Algorithm

Originally posted by John Temple:

This is a really cool tool.
The only major problem I see is not being able to see standings prior to
the end of the tournament.
http://apps.magicjudges.org/forum/topic/8248/?page=1#post-50208

Feb. 4, 2014 05:15:37 AM

James Do Hung Lee
Judge (Level 3 (Judge Foundry)), Hall of Fame, Scorekeeper, Tournament Organizer

USA - Pacific Northwest

Pairing Algorithm

There have not been any official statement of the pairings policy and algorithm for a very long time. You certainly will not find it in the policy documents. Hopefully, one day, the functionality of WER in both of its forms will be stable enough and trustworthy enough that those responsible for policy will again feel comfortable with publishing the system officially again.

Until then, even without official statement to let people know how things are done, a search of threads about how WER is working or not working will show that in the final round of Swiss, the pairings are done by standing so long as no two players are paired together who have previously played in those Swiss rounds in that format portion. When challenged, this was noted by internal staff as correct and the way it is supposed to be today even if it was not in the past.