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.

Weekly Challenge

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

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

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

Submit Feedback

Challenge #73: Plinko Probabilities

16 - Nebula
16 - Nebula

Challenge Completed

14 - Magnetar

Extremely pleased to have cracked this one!


Here's how I solved it:


1) I started by creating a replica of the board in Excel and identifying the rules dictating whether a certain 'move' is permissible.

2) I then initialised my workflow with 5 starting positions and used generate rows to create a version of the entire first row for each starting position.  This includes paths that would not be valid, e.g. 1 --> 4 since we haven't yet applied any constraints.


3) Next I used the filter tool to only keep the valid paths. When moving from a start to row 1 position we can keep any paths where row 1 is equal to or 1 bigger than the start position.


4) To calculate the probability of each path we count the distinct start and row 1 positions for each start position, then divide these two numbers.


5) These probabilities are appended to the start position. The probabilities for each given start position always add up to 1, as the "plink" has to go somewhere.

6) The process then repeats for each row, with a slight variation in number of rows generated (5 or 6) and the filtering logic depending on whether we're moving from a wide to narrow or narrow to wide row.

7) After repeating for all rows, we end up with a table of data where each row represents one of the unique paths the "plink" could have taken, and the probability of that exact route occurring given the starting position, calculated by multiplying all of the individual probabilities across the row.


8) Finally, we summarise the data by start and end position and add together the probabilities for all paths with a common start and end position.  Then we can convert that summary into a matrix.


9) Giving a final output of:

11 - Bolide

Solution attached. I was disappointed that the solution provided did not respond to the question from @alex and give a definitive answer regarding the correct probabilities. I know I’m way late to the party, but I’ll weigh in and agree that Alex has the correct probabilities. It looks like the solution from @patrick_digan did not exclude paths that go out of bounds.



Assuming that the question is which start slot has the highest probability of landing the Alteryx chip where it is in the diagram (i.e. Finish Slot 2), then the answer would be Start Slot 1 with a probability of 38.1%.



15 - Aurora
15 - Aurora
My approach was very brute force and not dynamic to varying columns/rows, but I was able to get to the right answer nonetheless!

Basically, I used lots of Text Input, Append Fields, Filter, and Formula tools repeatedly.

In the Formula tools, I accounted for the fact that, on the even rows, the first slot can only go to the first slot and the sixth slot can only go to the fifth slot. Because of this, it is necessary to force both of slot 1's options to slot 1 in the next row and both of slot 6's options to slot 5 in the next row. By changing slot 1 and 6's values to be 1 and 5, respectively, it looks like those rows are double counted but this is required in order to get the full probability for that transition. Because of the way that the probabilities are calculated at the end, based on counts, both rows 1 and 2 & rows 19 and 20 in the below screenshot are required to account for the fact that 1 will either go to 1 or 1 and 6 will either go to 5 or 5, just as you would expect slot 2 to go to either slot 1 or slot 2.

Another way to think about it would be that 3/4 (or (0.5*1)+(0.5*0.5)) of the options need to be assigned to slot one in the third row, when starting from slot 1.

Along the workflow, I checked the counts to ensure nothing was dropping off. 

Lastly, just some normal Alteryx transformations to calculate the percentages and get the output in the right format.

Looks like my answer matches @patrick_digan! This was a tough one to think through, but we got it!

EDIT: @jamielaird it looks like we got the same solution, too! wtg
11 - Bolide

@Kenda did you have a chance to look at the second hint provided with the original problem labeled "Reshaping approach"? It explains the issue with the approach you described.



In your example of Start Slot 1 and row 3, one of the 4 possible paths goes out of bounds, but in your picture you have pointed it back in bounds and counted the same path twice. When starting in Slot 1, there are only three possible paths to row 3, not 4, so the probability that you calculated should be 2/3, not 3/4. Here is an excerpt from the hint that explains it, using row 4 as an example. As it shows, on each row you need to subtract paths that go out of bounds and account for the adjustments in all subsequent calcs. Hope that is helpful.


12 - Quasar

Great challenge :) 

Challenge #73 WF.PNGChallenge #73.PNG
11 - Bolide

I've been keeping this challenge on hold, as when I first came to it I thought it would be a nice use case for the Python SDK tool. Now that I more or less have it, I should try with the new Python tool...

Config of the Plinko ToolConfig of the Plinko ToolWhat happens if the token starts more or less in the middleWhat happens if the token starts more or less in the middleBiased when the token starts in one of the end slotsBiased when the token starts in one of the end slotsMain Workflow using the Plinko ToolMain Workflow using the Plinko Tool

(the tool needs some polishing --and clarification of what the "position" actually means-- but that's for another day)

11 - Bolide

This one was really difficult.



11 - Bolide



Here is what I came up with. I basically determined how many viable paths could be taken from each starting point to an end point, and then based on all the viable paths, I determined the likelihood for each starting to ending point. 

8 - Asteroid

Here is my solution - short, simple and generic

All you need to change are 2 parameters in Text input tool: Number of slots and Number of rows




Main workflow to run batch macro with list of slots in initial row as control parameter

New Picture (6).jpg























Batch macro that runs iterative macro for every slot in initial row

New Picture (7).jpg


















And finally iterative macro that takes possible slots with their probabilities in previous row and calculate possible slots and their probabilities in the next row

New Picture (8).jpg