We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.
2022.1.1.30569 Patch Release Update

The 2022.1.1.30569 Patch/Minor release has been removed from the Download Portal due to a missing signature in some of the included files. This causes the files to not be recognized as valid files provided by Alteryx and might trigger warning messages by some 3rd party programs. If you installed the 2022.1.1.30569 release, we recommend that you reinstall the patch.

Weekly Challenge

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

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback

Challenge #307: Round-robin

Watermark
8 - Asteroid
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
14 - Magnetar
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
15 - Aurora
15 - Aurora

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
15 - Aurora
15 - Aurora
Spoiler
Updated workflow and iterative macro!
binuacs
15 - Aurora
Spoiler
binuacs_0-1646994918601.png

 

PhilipMannering
15 - Aurora
15 - Aurora
Spoiler
PhilipMannering_0-1647103968733.png

 

LiuZhang
8 - Asteroid
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. 😄