Power Matching

This forum is for discussing tournament formats, question styles, strategy, and such.
Post Reply
User avatar
Deviant Insider
Auron
Posts: 4634
Joined: Sun Jun 13, 2004 6:08 am
Location: Chicagoland
Contact:

Power Matching

Post by Deviant Insider » Tue Jun 05, 2018 12:44 pm

It's been a while since there has been a discussion here about power matching, also known as the card system, which is used at large NCTs, New Trier Scobol Solo, and occasional other tournaments. If you have any questions, comments, complaints, or commendations related to power matching, this is a good thread for them.
David Reinstein
PACE VP of Outreach, Head Writer and Editor for Scobol Solo and Masonics (Illinois), TD for New Trier Scobol Solo and New Trier Varsity, Writer for NAQT (2011-2017), IHSSBCA Board Member, IHSSBCA Chair (2004-2014), PACE Member, PACE President (2016-2018), New Trier Coach (1994-2011)

User avatar
Haaaaaaaarry Whiiiiiiiiiite
Auron
Posts: 1139
Joined: Tue Dec 04, 2007 8:46 pm
Location: Fairfax, VA
Contact:

Re: Power Matching

Post by Haaaaaaaarry Whiiiiiiiiiite » Tue Jun 05, 2018 12:48 pm

Beginning with round 3, how are teams with the same record with at least one win and one loss paired? I've heard mention about teams that go WL play those that go LW, but what about further rounds where it's not so cut and dry?
Harry White
TJHSST '09, Virginia Tech '13
VP of Technology, PACE
Owner of Tournament Database Search and Quizbowl Schedule Generator
Will run stats for food

tabstop
Wakka
Posts: 122
Joined: Tue Mar 20, 2007 10:48 am
Location: NNVA

Re: Power Matching

Post by tabstop » Tue Jun 05, 2018 1:13 pm

I think that depends on how you set up the system, of which there are three ways that I know of.

1 is "Chess" style, i.e. the way I learned it from USCF where you would pair people off as 1 v 9, 2 v 10, 3 v 11, ..., 8 v 16 (for instance). I don't think I've actually seen this used in QB because of the discontinuity between who the 8 seed plays (16) and the 9 seed plays (1) and no one is that confident about their seeding in the middle of the field like that. The advantage is that all the games in round 1 are "similar", rather than having the huge blowouts at the 1-16 end and the close games at the 8-9 end (and thus more games are at least closer to "meaningful").

2 and 3 are basically mimicking regular brackets -- you can either mimic a traditional n-elimination tournament (so all the 1-loss teams are together and mixed) or what I call a "placement" bracket (example here) where the first round is in the middle; the winners go the right, the losers go the left, and they'll never meet again. In this example, you couldn't have a WL play a LW.
Andrew Feist
Treasurer, ACF | VP of Technology, PACE

User avatar
Deviant Insider
Auron
Posts: 4634
Joined: Sun Jun 13, 2004 6:08 am
Location: Chicagoland
Contact:

Re: Power Matching

Post by Deviant Insider » Tue Jun 05, 2018 1:16 pm

The goal is to maximize the number of matches where a team coming off a loss plays a team coming off a win. In general, the teams coming off a loss should be considered to be the higher seeds, and you should split them up so that higher seeds play lower seeds.

If there are 128 teams, then there will be 64 teams at 1-1, with 32 coming off a loss and 32 coming off a win, so that works out cleanly. The same thing will happen for all .500 records, but only for .500 records. For records above .500 there are more teams coming off a win, and for records below .500 there are more teams coming off a loss. So, in the 128 team scenario there will be 48 teams at 2-1, and of that group 16 are coming off a loss and 32 are coming off a win. The teams should be paired so that there are 16 matches with a team coming off a loss playing a team coming off a win, and 8 matches with two teams coming off a win.

In general, teams are seeded, and assuming no previous upsets, the highest 2-1 seed should play the lowest 2-1 seed, the second highest 2-1 seed should play the second lowest 2-1 seed, etc. NAQT and I hide the seeds so that you can't tell what they are just by looking at the card numbers, but NAQT and I do seed, and those seeds do have a simple direct impact on the matchups.

NAQT and I both mimic a single-elimination bracket as much as possible.
David Reinstein
PACE VP of Outreach, Head Writer and Editor for Scobol Solo and Masonics (Illinois), TD for New Trier Scobol Solo and New Trier Varsity, Writer for NAQT (2011-2017), IHSSBCA Board Member, IHSSBCA Chair (2004-2014), PACE Member, PACE President (2016-2018), New Trier Coach (1994-2011)

bmccauley
Wakka
Posts: 104
Joined: Fri Dec 13, 2013 3:11 pm

Re: Power Matching

Post by bmccauley » Tue Jun 05, 2018 1:31 pm

When brackets are imperfect (like the numbers HSNCT had this year), how is it determined for the uneven matches? Is it still some sort of seeding mechanism or is it more random at that point in the tournament--especially given the size? For example, how does the system normally get crafted for those games where a team that is 4-3 plays a 5-2 team--is it a weaker 5-2 team against a good 4-3 team or something else?

Likewise, when a team gets that uneven card, how difficult is it to "correct" the cards that they don't end up playing multiple teams that have a better or worse record than them? I ask this to try to understand the system more after my team ended up with a card having two back to back matches against teams with a better record. I feel like that shouldn't happen but I've never done the math for a card system that big and would like to learn more.
Bernard McCauley
Coach, Great Valley High School (PA)

User avatar
Deviant Insider
Auron
Posts: 4634
Joined: Sun Jun 13, 2004 6:08 am
Location: Chicagoland
Contact:

Re: Power Matching

Post by Deviant Insider » Tue Jun 05, 2018 2:10 pm

I didn't work directly on this year's NAQT tournaments, and I don't have the spreadsheet showing pairings, so I have to answer Coach McCauley's question with generalities.

One concern with uneven matches, like all matches, is avoiding repeats, and that can impact which teams are selected to play those uneven matches. There are different philosophies as to picking which teams play each other, and I don't know which was used this year. You can make cases for weak teams with better records playing strong teams with worse records, middle teams playing each other, or strong teams with better records play weak teams with worse records. It is important to keep in mind that "strong" and "weak" is based on assumptions that the initial seeds were correct and there were no upsets, and those assumptions are iffy.

Unfortunately, once a team plays off its record, it is impossible to know what record is represented by the card, and the mistake always runs in the same direction. For example, if a 4-2 team plays a 3-3 team, then the winning card goes to either a 5-2 or 4-3 team, and the losing card goes to either a 4-3 or 3-4 team. That record stays unknown throughout the rest of the tournament. If you are the 3-3 team, then all the person who designed the system knows is that your record is either your actual record or one better for the rest of the tournament. In order to minimize uneven matches, the system maximizes the matches between teams with unknown records (as opposed to a known record vs an unknown record), and with such matches there is a lot of luck involved in determining whether the records match or not. NAQT guarantees that you will always play a team within one win of your own record. I will add to that statement that if you play one up, you will never play one down--the rest of your matches will be either one up or even, and there is a fair amount of guesswork involved in trying to get them even. It is difficult to assume that the team with a better record will win the uneven pairing, since there are plenty of examples of that not happening, and as I said earlier it often does not matter anyways because you just want to pair an unknown record with another card that has the same two possible records.

Another thing I will add is that the card system is designed before the teams are seeded, so the person making the system has no way of knowing what teams will be affected in which ways.
David Reinstein
PACE VP of Outreach, Head Writer and Editor for Scobol Solo and Masonics (Illinois), TD for New Trier Scobol Solo and New Trier Varsity, Writer for NAQT (2011-2017), IHSSBCA Board Member, IHSSBCA Chair (2004-2014), PACE Member, PACE President (2016-2018), New Trier Coach (1994-2011)

jonah
Auron
Posts: 2311
Joined: Thu Jul 20, 2006 5:51 pm
Location: Chicago

Re: Power Matching

Post by jonah » Tue Jun 05, 2018 2:41 pm

In case it helps, here is the preliminary master schedule from the 2018 HSNCT (in two different formats).

The 2018 SSNCT Open Division preliminary card system had a few matches in which teams might have played a team with a record two off from their own (because there was no way to keep the at-most-one-off guarantee in a power-matched format; live-pairing had time-based disadvantages, and a round robin-based format would have had way more matches between teams with very different records). I haven't looked at whether any such matches occurred, but they could have.
Attachments
2018-hsnct-prelim-master-by-card.pdf
(178.78 KiB) Downloaded 248 times
2018-hsnct-prelim-master-by-room.pdf
(98.43 KiB) Downloaded 157 times
Jonah Greenthal
National Academic Quiz Tournaments

bmccauley
Wakka
Posts: 104
Joined: Fri Dec 13, 2013 3:11 pm

Re: Power Matching

Post by bmccauley » Tue Jun 05, 2018 2:42 pm

Thanks for the quick reply, David. I understood the cards were made before the seeding and upsets obviously make things iffy. I also get the math parts of "if you play a team with a worse record, you'll never play a team with a better record" because of the unknowns to ensure no team plays a team not within one game under the NAQT system--which is definitely a needed rule for the system.

Not being a mathematician though, I was more curious if there were ways to loop the cards that a team would be less likely to have multiple rounds where this unbalance occurs or have a system that still ensures (or at least minimizes the risk since the likely assumption would be the team with the better record would win more often than not) that no individual team would play multiple rounds in a row being an underdog...it just honestly interests me as a mathematical question more so than anything tangible. Obviously seeing my team and another local team (Friends Select) have similar stories in Rounds 9/10, it got me thinking about the math behind it all and if it could be done. I'm guessing no, but figured I'd ask you with your experience.
Bernard McCauley
Coach, Great Valley High School (PA)

bmccauley
Wakka
Posts: 104
Joined: Fri Dec 13, 2013 3:11 pm

Re: Power Matching

Post by bmccauley » Tue Jun 05, 2018 2:43 pm

jonah wrote:In case it helps, here is the preliminary master schedule from the 2018 HSNCT (in two different formats).

The 2018 SSNCT Open Division preliminary card system had a few matches in which teams might have played a team with a record two off from their own (because there was no way to keep the at-most-one-off guarantee in a power-matched format; live-pairing had time-based disadvantages, and a round robin-based format would have had way more matches between teams with very different records). I haven't looked at whether any such matches occurred, but they could have.
This is very interesting to look at. Thanks!
Bernard McCauley
Coach, Great Valley High School (PA)

User avatar
Deviant Insider
Auron
Posts: 4634
Joined: Sun Jun 13, 2004 6:08 am
Location: Chicagoland
Contact:

Re: Power Matching

Post by Deviant Insider » Tue Jun 05, 2018 8:56 pm

I haven't looked at everything in perfect detail yet, but I played around with things a little bit and found some complicating factors. Some of the things I say may be off by a little, but they're at least in the ballpark.

After nine rounds, the fewest number of cards belonging to a team with a 5-4 or 6-3 record is seven. (I am talking strictly about cards where the record is not known.) It is possible that there were slightly more in order to avoid earlier matches with high probabilities of repeats. One of those cards would have had to play a known 5-4 team, and the other six cards would have to play each other.

Great Valley played Troy, which also had a 5-4/6-3 card. Troy's card had had an unknown record starting with their 5th match, when 3-1 Troy played 2-2 Hunter B. The card that Troy held was in an eight-way tie for the most unkown record games. Because the card had an unknown record for a long time, it makes it harder than usual to predict whether the record was 5-4 or 6-3--it had been through a lot of uneven matches, or at least a lot of matches that had the potential of being uneven.

Friends Select A had a 6-3 or 7-2 card, the fewest number of which was 5. One of those cards would have had to play up because there were 21 cards with a known record of 7-2, which is an odd number. There were eight cards that were 7-2/8-1 or better, which is an even number, so those teams would have played each other. Friends Select A played Northview in its last match, and Northview also had a card that could have been 6-3 or 7-2. It looks like the uneven match for Friends Select A was more predictable--Friends Select had a card that was probably 6-3, and Northview had a card that was probably 7-2. That being said, the options there were probably very limited given the fact that there were only 5 cards at that record, and one of them was guaranteed to play a 7-2 team.
David Reinstein
PACE VP of Outreach, Head Writer and Editor for Scobol Solo and Masonics (Illinois), TD for New Trier Scobol Solo and New Trier Varsity, Writer for NAQT (2011-2017), IHSSBCA Board Member, IHSSBCA Chair (2004-2014), PACE Member, PACE President (2016-2018), New Trier Coach (1994-2011)

JKHtay
Wakka
Posts: 115
Joined: Wed May 29, 2013 12:20 pm

Re: Power Matching

Post by JKHtay » Wed Jun 06, 2018 10:58 am

I designed a 7-round card schedule for Wolf War V (River Trail Middle School's tournament in Georgia) for the 48-team main draw. I divided the teams into 8 groups of 6 (cards 1,9,17,... in one group, cards 2,10,18... in the next, etc.) and had them do a Swiss pair, ideally resulting in one 3-0 team, two 2-1 teams, two 1-2 teams, and one 0-3 team. After this the I then grouped the teams into 6 groups of 8, with each group having the same record, and had them do a Swiss pair, with one team in each going 3-0, three going 2-1, three going 1-2, and one going 0-3. For the seventh round, I picked cards with the same record, with a couple of exceptions (the 6-0 team had to play a 5-1 team, for example). Teams that went 3-0 from the 2-1 groups played teams from the 3-0 group for a shot at playoffs.

It worked alright. We picked the top 6 teams by record to go to playoffs with 1 and 2 receiving byes. Due to some upsets, this had a team go 5-0 to start, then lose the last two games and lose a PPG tiebreaker to not make it in. I should probably have picked easier Round 7 assignments for the top 3 seeds to guarantee they made it.

If I had to do it again, I would pick Round 7 matches for middle teams to be the corresponding team in the other group which had the same record after 3 games, to help avoid repeats. Also, there is a 1-0 team playing a 0-1 team in each group in Round 2. If the 0-1 team goes on to defeat the 1-0 team then loses to the 2-0 high card, that team will hold card {9,10,...} but be 1-2. They will still be placed into the 2-1 group though, so I would try and verify records after Round 3 and put them into a 1-2 group. I'm curious to see what else I could have improved with this algorithm.
Attachments
schedule - Copy.xlsx
(10.04 KiB) Downloaded 124 times
cardSchedule 7 rounds.xlsx
(10.28 KiB) Downloaded 122 times
Justin Htay

Centennial HS 2016
GT 2021(?)

tabstop
Wakka
Posts: 122
Joined: Tue Mar 20, 2007 10:48 am
Location: NNVA

Re: Power Matching

Post by tabstop » Wed Jun 06, 2018 6:13 pm

Is there a reason you went with strict groups of 6, given that (as you mention) you have to play off-record immediately?

EDIT: This reminds me of one of the other advantages of the chess-style pairings, is that repeats don't naturally happen until much later. Here, if you had started with 1-48, 2-47 etc., in round 3 your 1-1 teams would have been the 13-36 teams, and the natural seedings would be repeats of the first round, so you would need to start adjusting things here to avoid repeats by switching teams in the bottom half. In the chess-style seedings, the first round games would have been 13-37, 14-38, etc. so none of these could repeat in round 3.
Also: please tell me that card #1 was not locked into the same room all day.

FURTHER EDIT: Upon actually writing things down on a piece of paper, it looks like I was wrong about the repeats -- they require an "upset" but they still need guarding against in round 3 (after 13-37, 37 plays 25, and then the 13-25 matchup can be a repeat).
Andrew Feist
Treasurer, ACF | VP of Technology, PACE

User avatar
Golran
Auron
Posts: 1033
Joined: Tue Oct 16, 2007 1:23 am
Location: Southern California

Re: Power Matching

Post by Golran » Wed Jun 06, 2018 8:56 pm

I made this crude R program to create a card system that maximizes the number of like vs like records and prevents immediate and 2 round apart re-matches (when possible). Improvements to it are certainly welcome. Notably, it does not enforce teams coming off a win playing against teams coming off a loss.

Code: Select all

Teams = 352
Rounds = 10

if(Teams %% 2 == 1){ Teams = Teams+1}

Card_System <- data.frame("Card_Number" = 1:Teams, "Min_Wins_0" = rep(0,Teams), "Max_Wins_0" = rep(0,Teams))

for(i in 1:Rounds){
  Card_System[, ncol(Card_System)+1] <- rep(0,Teams)
  names(Card_System)[ncol(Card_System)] <- paste0("Opponent_", i)
  Card_System[, ncol(Card_System)+1] <- rep(0,Teams)
  names(Card_System)[ncol(Card_System)] <- paste0("Min_Wins_", i)
  Card_System[, ncol(Card_System)+1] <- rep(0,Teams)
  names(Card_System)[ncol(Card_System)] <- paste0("Max_Wins_", i)
}

for (j in 1:Teams){
  if(Card_System$Opponent_1[j] == 0){
    Card_System$Opponent_1[j] = Card_System$Card_Number[j+1]
    Card_System$Opponent_1[j+1] = Card_System$Card_Number[j]
  }
  if(Card_System$Opponent_1[j]>Card_System$Card_Number[j]){
    Card_System$Min_Wins_1[j] = (min(Card_System$Min_Wins_0[j], Card_System$Min_Wins_0[match(Card_System$Opponent_1[j],Card_System$Card_Number)]) + 1)
    Card_System$Max_Wins_1[j] = (max(Card_System$Max_Wins_0[j], Card_System$Max_Wins_0[match(Card_System$Opponent_1[j],Card_System$Card_Number)]) + 1)
  } else{
    Card_System$Min_Wins_1[j] = (min(Card_System$Min_Wins_0[j], Card_System$Min_Wins_0[match(Card_System$Opponent_1[j],Card_System$Card_Number)]))
    Card_System$Max_Wins_1[j] = (max(Card_System$Max_Wins_0[j], Card_System$Max_Wins_0[match(Card_System$Opponent_1[j],Card_System$Card_Number)]))
  }
}

if(Rounds>=2){
  for(i in 2:Rounds){
    Card_System <- Card_System[order(Card_System[,paste0("Min_Wins_",(i-1))],Card_System[,paste0("Max_Wins_",(i-1))]),]
    for(j in 1:Teams){
      if(Card_System[j,paste0("Opponent_",(i))] == 0 && Card_System[(j+1),paste0("Opponent_",(i))] == 0 && Card_System$Card_Number[j+1] != Card_System[j,paste0("Opponent_",(i-1))] && (i<3 || Card_System$Card_Number[j+1] != Card_System[j,paste0("Opponent_",(i-2))])){
        
        Card_System[j,paste0("Opponent_",(i))] = Card_System$Card_Number[j+1]
        Card_System[(j+1),paste0("Opponent_",(i))] = Card_System$Card_Number[j]
        
        if( Card_System[j,paste0("Opponent_",(i))] > Card_System$Card_Number[j]){
          Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
          Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
          
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
          
        } else{
          Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
          Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
          
        }
        
      } else if((j<Teams-1) && Card_System[j,paste0("Opponent_",(i))] == 0 && Card_System[(j+2),paste0("Opponent_",(i))] == 0 && Card_System$Card_Number[j+2] != Card_System[j,paste0("Opponent_",(i-1))] && (i<3 || Card_System$Card_Number[j+2] != Card_System[j,paste0("Opponent_",(i-2))])){
        
        Card_System[j,paste0("Opponent_",(i))] = Card_System$Card_Number[j+2]
        Card_System[(j+2),paste0("Opponent_",(i))] = Card_System$Card_Number[j]
        
        if( Card_System[j,paste0("Opponent_",(i))] > Card_System$Card_Number[j]){
          Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
          Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
          
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
          
        } else{
          Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
          Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
          Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
          
        }    
        
      } else if(Card_System[j,paste0("Opponent_",(i))] == 0){
        offset = 1
        noMatch = TRUE
        while (noMatch && ((j+offset)<Teams) ) {
          offset = offset+1;
          if( Card_System[(j+offset),paste0("Opponent_",(i))] == 0 && Card_System$Card_Number[j+offset] != Card_System[j,paste0("Opponent_",(i-1))]){
            noMatch <- FALSE
          }
        }
             
            Card_System[j,paste0("Opponent_",(i))] = Card_System$Card_Number[j+offset]
            Card_System[(j+offset),paste0("Opponent_",(i))] = Card_System$Card_Number[j]
            
            if( Card_System[j,paste0("Opponent_",(i))] > Card_System$Card_Number[j]){
              Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
              Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
              
              Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
              Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
              
            } else{
              Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
              Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
              Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
              Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
              
            } 
          } else if(Card_System[j,paste0("Opponent_",(i))] == 0){
        offset = 2
        noMatch = TRUE
        while ((j+offset)<=Teams && noMatch){
          offset = offset+1 
          if( Card_System[(j+offset),paste0("Opponent_",(i))] == 0 && Card_System$Card_Number[j+offset] != Card_System[j,paste0("Opponent_",(i-1))] && (i<3 || Card_System$Card_Number[j+offset] != Card_System[j,paste0("Opponent_",(i-2))])){
            noMatch = FALSE
          }
          
          Card_System[j,paste0("Opponent_",(i))] = Card_System$Card_Number[j+offset]
          Card_System[(j+offset),paste0("Opponent_",(i))] = Card_System$Card_Number[j]
          
          if( Card_System[j,paste0("Opponent_",(i))] > Card_System$Card_Number[j]){
            Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
            Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
            
            Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
            Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
            
          } else{
            Card_System[j,paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]))
            Card_System[j,paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]))
            Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i))] = (min(Card_System[j,paste0("Min_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Min_Wins_",(i-1))]) + 1)
            Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i))] = (max(Card_System[j,paste0("Max_Wins_",(i-1))], Card_System[match(Card_System[j,paste0("Opponent_",(i))],Card_System$Card_Number),paste0("Max_Wins_",(i-1))]) + 1)
            
          }
        }
      }
    }
  }
}    
    
    
Drayer the Slayer
currently unaffiliated

JKHtay
Wakka
Posts: 115
Joined: Wed May 29, 2013 12:20 pm

Re: Power Matching

Post by JKHtay » Thu Jun 07, 2018 7:58 pm

tabstop wrote:Is there a reason you went with strict groups of 6, given that (as you mention) you have to play off-record immediately?

EDIT: This reminds me of one of the other advantages of the chess-style pairings, is that repeats don't naturally happen until much later. Here, if you had started with 1-48, 2-47 etc., in round 3 your 1-1 teams would have been the 13-36 teams, and the natural seedings would be repeats of the first round, so you would need to start adjusting things here to avoid repeats by switching teams in the bottom half. In the chess-style seedings, the first round games would have been 13-37, 14-38, etc. so none of these could repeat in round 3.
Also: please tell me that card #1 was not locked into the same room all day.

FURTHER EDIT: Upon actually writing things down on a piece of paper, it looks like I was wrong about the repeats -- they require an "upset" but they still need guarding against in round 3 (after 13-37, 37 plays 25, and then the 13-25 matchup can be a repeat).
It seemed natural at the time. Reflecting on it, perhaps reversing the order and playing the groups of 8 first would have been better.

Yeah repeats are going to be an issue unless you start switching teams around. While scheduling you'd have to keep track of what groups teams were in in which round to prevent possible mismatches. Once you're past 3 games though there shouldn't be any repeats.

Luckily the original one card lost and so were not trapped in the same room, but yes I set up the rooms this way so that your room position would tell you roughly how close you were to the top matches as well. That was not a good idea.
Justin Htay

Centennial HS 2016
GT 2021(?)

User avatar
Deviant Insider
Auron
Posts: 4634
Joined: Sun Jun 13, 2004 6:08 am
Location: Chicagoland
Contact:

Re: Power Matching

Post by Deviant Insider » Thu Jun 07, 2018 8:11 pm

Powers of two are your friend. You could do three groups of 16 for four rounds followed by six groups of 8 for three rounds. The QBWiki page on power-matching shows how to do 16 teams.
David Reinstein
PACE VP of Outreach, Head Writer and Editor for Scobol Solo and Masonics (Illinois), TD for New Trier Scobol Solo and New Trier Varsity, Writer for NAQT (2011-2017), IHSSBCA Board Member, IHSSBCA Chair (2004-2014), PACE Member, PACE President (2016-2018), New Trier Coach (1994-2011)

Post Reply