Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #307: Round-robin

Watermark
12 - Quasar
12 - Quasar
Spoiler

 Works regardless the number of players or weeks. It also accounts for 'odd' number of players to create 'bye' weeks.  

 

MT Solution 307 Result.jpg

Charlesswinehart
5 - Atom

While looking through workflows and testing yours, I found that our outputs are nearly identical even though our initial workflows are very different.

 

Upon further inspection I found that my workflow works great with an odd number of teams, but falls apart completely(with duplicate matching) when an even number of teams is used. I was able to fix it to work properly with even teams by first identifying if the number of teams is even or odd, then, if even, removing one team, doing the combinations as if there were only (N-1) teams, then instead of filtering out results where Team A = Team B, change Team B to = Team N, and end up with completely unique results. IE. instead of filtering out "Bye" weeks the Bye week gets automatically matched with team N.

 

This also means odd teams need N weeks to have a "perfect" number of weeks to complete all combinations but even number of teams only need N-1 weeks to complete all combinations!

 

I've included a reference from the Wikipedia article about round robin tournaments to visually represent what the workflow is doing with Team 10 in a 10 team scenario

 

Spoiler
Charlesswinehart_0-1645542287409.png

 

Milanz
8 - Asteroid

my solution ;-)

 

Spoiler
Milanz_1-1645607591852.png

 

messi007
15 - Aurora
15 - Aurora
Spoiler
messi007_0-1645797682081.png

 

tammybrown_tds
8 - Asteroid

@Kenda,

 

Can you tell me how the posted solution is correct?  If I run the solution with 5 teams and 15 weeks (which would be the number of weeks required for each team to play each of the other teams exactly three times, I get this:

 

tammybrown_tds_1-1646069808535.png

 

This output only considers 3 teams (Teams 4 & 5 never play) and only one Team A vs Team B matchup per week.

It should have 50 rows where something like this is repeated 5 times (weeks 1-5; 6-10; 11-15):


tammybrown_tds_2-1646070006869.png

 

How does the solution imitate a round-robin schedule?

Kenda
16 - Nebula
16 - Nebula

Hi @tammybrown_tds 

 

It seems as though the wrong version was uploaded as the solution. I will upload a corrected version later, but in the meantime, change the Condition Expression in the Generate Rows tool to:

 

teams <= tonumber("%Question.teams%")

 

Currently, it is set to always equal 3 which is why you're seeing those results. 

Kenda
16 - Nebula
16 - Nebula
Spoiler
Updated workflow and iterative macro!
binuacs
20 - Arcturus
Spoiler
binuacs_0-1646994918601.png

 

PhilipMannering
16 - Nebula
16 - Nebula
Spoiler
PhilipMannering_0-1647103968733.png

 

LiuZhang
9 - Comet
Spoiler
307.png

As I was just doing AC #247 today as well, which asks for pretty much identical thing, so I've just changed column names and repurposed my old macro to do this one. 😄