Solutions to "Just KNIME It!" Challenge 29 - Season 2

:boom: New Wednesday, new Just KNIME It! challenge! :boom:

:ping_pong: This week we shift our gears to something we love at KNIME: table tennis! Your goal is to randomly create teams with two players and then define elimination matches in a way that is easy to understand. :chart_with_upwards_trend: Could a data app help here? :thinking:

Here is the challenge. Let’s use this thread to post our solutions to it, which should be uploaded to your public KNIME Hub spaces with tag JKISeason2-29.

:sos: Need help with tags? To add tag JKISeason2-29 to your workflow, go to the description panel in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. :slight_smile: Let us know if you have any problems!

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.

Playoff Brackets


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.

Result analysis:
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.

  1. Randomly arranged rows.
  2. 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.


Hi all,
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.


Hello everyone,

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 :+1:


Dear @Tofusa
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 :+1:


Hello everyone,

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.


Hello everyone,
Here’s my solution.

  1. The players were clustered based on their scores after confirming the best k as 3 using Elbow method.
  2. The players were divided into two groups using stratified sampling for the clusters.
  3. Normalize the scores of the two groups with different ranges of values to ensure they don’t overlap.
  4. Hierarchical clustering.

I wanted to avoid players of the same level competing in the same place. Thanks.


Hi, KNIMEr :partying_face: :partying_face: :partying_face:

Here is My Two Cents :face_with_hand_over_mouth:

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-

Hi Everyone :slight_smile:

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 :slight_smile:

Best wishes


:sparkles: As always on Tuesdays, here’s our solution to last week’s Just KNIME It! challenge :sparkles:

:ping_pong: Our solution is somewhat simple and only takes into account one possible combination of matches. It’s cool to see that many of you took this challenge one step further and implemented ways of seeing other combinations. :blush: Very cool and, as this season comes to an end, we are impressed at the progress you all have made!

:mega: Tomorrow is our last challenge this season, and we can’t wait to see what you’ll prepare! :exploding_head: See you soon. :nerd_face:


Love @HeatherPikairos solutions!!! :heart_hands: :clap: :clap: :clap: :clap: :clap: :top:


Thanks a lot @MoLa_Data :slight_smile: