General Discussions

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

Advent of Code 2020 - BaseA Style (Day 8)

Alteryx Certified Partner

Discussion thread for day 8 of the Advent of Code : https://adventofcode.com/2020/day/8

16 - Nebula
16 - Nebula

This is far too close to IntCode...

Spoiler
Part 1: simple iterative macro
Part 2: batch macro switching nop and jmp one at a time

jdunkerley79_0-1607407658542.png

 

jdunkerley79_2-1607407703267.png

 

jdunkerley79_4-1607407752923.png

 


 

13 - Pulsar
13 - Pulsar

First part was straightforward; second part took a little longer to debug and get the Join correct at the end.  

 

Spoiler
WorkflowWorkflowBatch MacroBatch Macro

 

Iterative MacroIterative Macro

 

 

 

Alteryx Partner

Looking at @jdunkerley79 and @T_Willins solutions, I may have overengineered my macro a bit!

 

Part 1:

Spoiler
Solution:
joshbennett_2-1607429854130.png

 


 




Iterative Macro:

joshbennett_1-1607429838032.png

 


 

 

Part 2:

Spoiler
Solution:
joshbennett_3-1607429862160.png

 



Batch Macro:
joshbennett_4-1607429874377.png

 



In the above batch macro, I used the same iterative macro from part 1, though I was not pleased with the performance results so am looking forward to looking through each of the other solutions to understand how I may have been able to do this more efficiently!


 

 

Alteryx Partner

Nested iteratives... as @jdunkerley79 says... IntCode, this year I'm ready for you. Or not.

Spoiler
Alteryx_Day_08.png

 

Alteryx Partner

Nested iterative... as @jdunkerley79 says... this year I'm ready for the IntCode. Or not.

Spoiler
Alteryx_Day_08.png
Alteryx Certified Partner
Alteryx Certified Partner

Not especially happy with my approach as it took a *long* time to solve part 2. Here it is anyway though

Spoiler
Went with a batch macro containing an iterative, to brute force solve the puzzle. However, the fact that I was reading and writing a file every iteration, and using joins made it slooooow. 
workflowworkflowPart 1 iterative macroPart 1 iterative macroPart 2 iterative macroPart 2 iterative macroPart 2 batch macro containing part 2 iterativePart 2 batch macro containing part 2 iterative
Alteryx Certified Partner

Closed a container, alteryx crashed, stuck in an endless loop of open alteryx hang on file recovery... Ironic..

Spoiler
8ffs.png

 Managed similar to above solutions, iterative to solve, batch to feed in swapped instructions. Definitely could be tidier but got the stars so happy for now...

Spoiler
8.png

17 - Castor
17 - Castor

Similar to above.  Iterative to model the CPU and batch to modify the inputs 

 

Spoiler
mainmain

CPU iterativeCPU iterative

batch input fixerbatch input fixer

 Dan

Alteryx Certified Partner

Very happy with mine, I managed to use append fields over joins which I think helped with performance and managed to keep tools to a minimum in the first macro. The second macro needed a few extra tools to exit its loop at the right point.

Spoiler
Main Workflow
Screenshot 2020-12-08 142535.png

Macro 1Screenshot 2020-12-08 142602.png

Macro 2Screenshot 2020-12-08 142628.png