This is an interesting problem. I couldn’t create the playoff brackets straight off without actually pairing up the players first.
If we were to just do a h clustering on the dataset as is, it will result in a dendogram that’s not playoff bracket-like. Simply because there are 3 players or more who have similar scores, and 1 outlier who overshadows everyone. Hence, we’d have to figure which players should be matched to each other first; before creating the dendogram.
1. Find the strength difference between each player
This will give you many player pairs (approx 90) on a strength difference scale (0 to 60)
2. Sort the pairs by strength difference from lowest to highest.
3. Pick out the pairs that have low strength difference scores
Repeat until there are no more pairs to pick out
4. Generate the playoff brackets
NB: There isn’t much randomisation in this approach. One way to introduce randomness is to create “discrete buckets” in the list. Then draw a player pair randomly from each bucket and repeat 3.
Link to the Workflow
Hello everyone, this is my solution.
I found that using the simplest hierarchical clustering method also has some rationality in the results.
1.Employees with similar ratings will be given priority in the competition.
2.The employee with the highest score (Row15) directly advanced to the finals.
I have improved my solution.
- Randomly arranged rows.
- By using the generated ID as the distance, a complete binary tree can be achieved.
It is equivalent to completely ignoring the ‘Score’ in the table.
But I haven’t fully achieved fairness either.
This is my solution.
I interpreted this challenge as setting up pairs of doubles at random.
I created an unbiased general tournament table.
This workflow would work well even if the number of players increased.
Here’s my solution. Tried using the scores to cluster. No luck, an outlier and some closely spaced scores seem to be the problem. Also played around with Random Number node which also didn’t work. Settled on Counter Generation which allowed me to create 10 clusters with 2 members each. Randomizing is a little suspect, but it works.
The entire set is randomly split into two groups. Within each group, the pairing is done randomly to decide who plays whom . The winner from group one plays the winner from group 2 to become the ultimate winner.
This is my solution.
In this time, I focused in particular on how to determine team assignments to make a very simple workflow.
I think the Recursive Loop Start / End nodes worked very well
That’s your nice workflow!
I think the workflow would be much simpler if you used the recursive loop feature better.
Thank you for your great advice @sryu !!
The resulted workflow seems very nice
Here is my solution. I managed to solve this problem without hierarchical clustering, however I used the score as a metric for matching the players with the help of Similarity Search node. The most difficult part was to find the proper pairs of distinct players: some of the candidates have very high or low score.
Looking at the other participants solutions I realized that I managed to implement something similar to @skybe077’s solution, it was interesting to compare our solutions.
Learning from everyone’s solutions, I improved a bit more.
The ‘Hierarchical Cluster Assignor’ node can set the number of clusters according to requirements. For example, if we need to know the competition table for the first round, we can set the number of clusters to 10.
Here’s my solution.
- The players were clustered based on their scores after confirming the best k as 3 using Elbow method.
- The players were divided into two groups using stratified sampling for the clusters.
- Normalize the scores of the two groups with different ranges of values to ensure they don’t overlap.
- Hierarchical clustering.
I wanted to avoid players of the same level competing in the same place. Thanks.
Here is My Two Cents
This question is interesting because it reflects the complexity of a real-world problem. Although the data is simple, analyzing and managing it is not.
We can use hierarchical clustering to group individuals based on their performance and match players with similar competitive levels against each other. This ensures that individuals with average levels compete against each other, while those with higher levels face off, promoting fairness.
However, this seemingly fair rule gives rise to other fairness issues. For instance, in a single elimination tournament like some football Cup, if Argentina and France face each other in the first round, one team will be eliminated right away, which is undesirable. Ideally, we want to see the strongest teams in the final.
In other words, while we use historical achievements to group individuals fairly within the same level, we neglect fairness towards those at higher levels. It took them more time and effort to get there.
In real world, we have ample data at our disposal, and our decision-making heavily relies on it. However, the choice of which data to use and which to disregard directly impacts our final result. In this case, we won’t consider the “Score” data and instead group individuals randomly.
Of course, using random methods is an easier approach, but we can go further. For example, if there are initially 10 groups of two individuals each, we can place the person with the highest score in Group 1 and the second-place individual in Group 10. This way, the first and second-place finishers may meet at a later stage. Real tournaments generate complex or simple tournament graphs based on different objectives and constraints, such as financial or time limitations. You can see examples of this complexity on the Tournament Management website challonge.
my take on the challenge 29-
This week I have used a recursive loop to loop through the different rounds of the tournament rather than using a Dendogram.
Inside the loop, the players are randomly paired together and then the score is used to determine which of the players wins. In the case where the number of players is an odd number, if a player hasn’t been paired with anyone, they automatically go through to the next round. The overall winner is always the player with the highest score in the table.
The recursive loop ends when there is only one row left in the table (the last game has been played).
I have just updated the solution to add a Sunburst Chart at the end of workflow. This Sunburst Chart shows the rounds of the competition, moving inwards towards the centre of the circle where the final winner of the tournament is shown:
This could be improved by generating the required table for the chart inside the recursive loop.
Here is a link to my solution on the hub:
Thanks again @aworker for your guidance on this challenge