General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

Advent of Code 2020 - BaseA Style (Day 11)

Greg_Murray
12 - Quasar

Definitely needed a couple hints to get going on this one. It finally clicked when read people were using coordinate based approaches. And as I write this I am realizing I probably could have made use of spatial tools for distance calculations. Oh well... nothing wrong with brushing up on grade school math.

 

Spoiler
Workflow
Greg_Murray_1-1607723913423.png

Macro

Greg_Murray_2-1607723944599.png

 

NedHarding
7 - Meteor

@Greg_Murray This one was interesting - you can cheat and use 1 dimensional distance.  I just #'ed the cells 0 to 9024 and then used abs(a-b) for distance.  The absolute distance doesn't matter, only the sort order.

cgoodman3
12 - Quasar
12 - Quasar

Here's my solution for the first part. Like @Balders there are a lot of tools in the macro to force it to exit when it meets the condition of no seats changing between the iterations. 

 

Spoiler
cgoodman3_0-1607731137987.png

Macro:

cgoodman3_1-1607731188767.png

 

 It's late and it's Friday so I'll try and workout part 2 over the weekend.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
peter_gb
8 - Asteroid

Tried to edit my post yesterday but it disappeared.. 

Here's my iterative solution.

Spoiler
11.png

iterative to solve 1

11_1.png

iterative to prepare for part 2 

11_2.png


iterative to solve part 2

11_3.png

peter_gb
8 - Asteroid

It was really interesting to see the seating iterations develop too!

Spoiler
11.png

https://public.tableau.com/profile/petergb#!/vizhome/Day11_16077110205010/AoCDay11 

peter_gb
8 - Asteroid

Watching the seats fill up is very satisfying!

Spoiler
11_0.png

11.png

EstherB47
14 - Magnetar
14 - Magnetar

So while my original idea of converting to spatial and using find nearest, like many of us did last year, showed promise but was WAY too slow.

 

Solution to part 1 is probably very convoluted, but it works, and it only takes about 30 seconds for the iterative macro. Not stellar time, not winning at tool golf, but at least it functions.

 

Part 1 workflow, simple enough

 

Spoiler
EstherB47_0-1607910750983.png

 

Macro. Ugh. But it works

 

Spoiler
EstherB47_1-1607911122434.png

 

T_Willins
13 - Pulsar
13 - Pulsar

A week between parts a & b for me as my son came home and busy with work before off for 2 weeks (but not from Alteryx 😃).  Could have used the second macro for both with minor changes to workflow.

 

Spoiler

 

WorkflowWorkflow
11a Iterative Macro11a Iterative Macro
11b Iterative Macro11b Iterative Macro