Weekly Challenge

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

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

Submit Feedback
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.

Challenge #73: Plinko Probabilities

Highlighted
11 - Bolide

Whew, I've been sitting on this one for a while, as I struggled to figure out how to handle the edges of the board. In the end, my workflow isn't generalizable beyond a 5-slot x 9-level board, but I spent way too much time on it and had to reach a reasonable stopping point!

 

Spoiler
I calculated the probabilities for each position using the "bottom" row of Paschal's triangle, based on the number of board levels entered by the user. I then attempted to reassign the probabilities for columns that were off of the board.

Example for slot #2, unadjusted triangle:
challenge_73_slot2_orig.PNG


Example for slot #2, adjusted for edges:
challenge_73_slot2_adj.PNG

 

 

Spoiler
My workflow:


challenge_73_workflow_1.PNG


challenge_73_workflow_2.PNG



Output report:

challenge_73_output_report.PNG

 

Highlighted
Alteryx Partner
Spoiler
Outside the macro:
73. Data Analysis 2.PNG

Inside the macro:
73. Data Analysis 1.PNG
I couldn't figure out where to start, so I ended up using @SeanAdams' and @Natasha's solutions as a starting point. I then made it my own, using three generate rows tools to find all possible combinations. I used the Rand() function to decide whether the ball went left or right, excluded any positions that were impossible (such as left of position 1), then ran it through an iterative macro 25000 times to get the following output!

73. Data Analysis 3.PNG


Highlighted
10 - Fireball

I really enjoyed this one! Nice to have Pascal's triangle refresher 😄

 

Spoiler
image.pngimage.png

For some reason, I can't upload the file with my solution... 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Decided to use a very simple approach.

 

Spoiler
Generate Rows tool to create possible combinations for row/col, each second row needs
correction for first and last col
Probabilities calculated based on final counts

21-08-_2019_20-24-36.png
Spoiler
21-08-_2019_20-24-13.png
Highlighted
Alteryx Partner
Spoiler
My first iterative macro in a while. A good fun problem to solve!
Highlighted
Alteryx
Alteryx

I didn't read any of the spoilers and went for a pretty brute force approach. Looking at what other people have done I think my solution was similar to Patrick Digan but my results line up with many of the others. 

Highlighted
Alteryx Certified Partner

I have one slight glitch in one of my workflows

Spoiler
(breaking out of the loop didn't work somehow)

Anyways, I

Spoiler
rebuild the board and run an iterative macro.

And overall it looks like

Spoiler
any feedback on this error would be greatly appreciatedany feedback on this error would be greatly appreciated

So in detail I built this

overall boardoverall boardbeginning of the boardbeginning of the boardend of the board (where I get an error somehow, but this only results in running the maximum amount of iterations)end of the board (where I get an error somehow, but this only results in running the maximum amount of iterations)

Highlighted
10 - Fireball

Just reattaching my workflow

Highlighted
13 - Pulsar
13 - Pulsar

My solution.  Would convert multi-row formula tools to a macro to make this more dynamic (such as user can choose number of peg rows, slots, etc).

 

Spoiler
Workflow 73.JPG

 

Highlighted
Alteryx
Alteryx