community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!

Challenge #73: Plinko Probabilities

Alteryx Certified Partner

Tried to not over complicate this too much!

Here is a solution

Aurora

I modeled the board and then Monte Carlo'd until the pins wore off.

 

Like @patrick_digan@jamielaird and @BarnesK, I found the bounded model produces higher probabilities that token will end up in Bucket 1 or  5 if started in those columns

 

Results.png

 

Spoiler
Macro.pngMacro
Because I modeled the board in the data input, I only needed 2 tools in the macro to simulate a run.
Main.pngMain

Dan

Asteroid

My solution.

 

Ummm wow, this one was exhausting for me.

 

Glad to know the posted solution looked up a pascal triangle because I spent a good half hour trying to manually count the paths to each space and gave up after a bit.  Definitely not proud of my efficiency on this one.  I walked away and came back to it on and off for 3 days researching different articles on Plinko probability.

 

So here it is, Didn't bother with the bonus, mostly cause i was burnt out by the time i got to the solution.  Just glad to just check the box on this one and be done.  :)  No offense   

 

I imagine you could add some interface tools on this approach to adjust the size of triangle you put through the calculation. 


Cheers!

  

Asteroid

I followed the posted solution for this exercise....

Asteroid

Finally got it (I think...)

 

You input start column (in letters - A to E) and it gives you the output...

 

Spoiler
Challenge 73 Result.jpg
Alteryx Partner

I went with an iterative macro which runs 1000 simulations for each starting position, and then works out the % of iterations which ended in the winning position. Worked with @George_Walker on this one :)

Spoiler
Starting in the second position seems to be the best place - ending in the winning spot ~ 26% of the time. 

The formula updating the position in the macro uses whether a random integer is odd or even to decide whether to go left or right. We also need to appreciate that if a row has 6 blocks, (what I called a T(ight) row) and we are in the outer positions, we can only stay in the outer position. If we are in a row with 5 blocks (what I called a L(oose) row) we can always move left or right. 
Challenge 73.png
Asteroid

Hi! Here my solution :)

 

Spoiler
I developed an app that ask two questions to the user: how many rows and the starting position.

Considering the game as an iteration of groups of two rows (a 4-pin row and a 5-pin row) plus a possible 5-pin row, I calculated the probabilities for a 2-row group and iterated as many times as groups existing; then, applying the posible 5-pin row probabilities.

challenge_73.PNG

 

Alteryx Certified Partner

That took a while but eventually got there. First built a macro that builds Pascal's Triangle, then built a batch macro that calculates the chances of reaching each bin. The batch macro can be customised on the number of slots and number of rows.

Spoiler
challenge_73_pascal_macro.PNG
Alteryx Partner

Here's my solution to challenge 73!

I created an iterative macro that will allow you to decide the number of stages and tell you the probability of landing in any given position from any given space.

I define a stage as two sets of pegs - so every time the pegs line up to match the first row of pegs, that's a new stage.

I'm really happy with this as it took a lot of work to figure out how to iterate properly and figure out a cheeky way of passing multiple fields back in a single field (concat, pass back, seperate)!