Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2022 Day 9 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Discussion thread for day 9 of the Advent of Code - https://adventofcode.com/2022/day/9
19 REPLIES 19
clmc9601
13 - Pulsar
13 - Pulsar

Today I'm especially grateful for bridge engineers and concrete.

 

Spoiler
Workflow overall:

Screen Shot 2022-12-08 at 11.23.41 PM.png



Part 1: The third multi-row formula updates both X and Y for the tail knot. It's an ugly mess of conversions to/from string, delimiter grouping, and conditional logic. 



Screen Shot 2022-12-08 at 11.23.57 PM.png


 
Part 2: I reused my Part 1 tail coordinate calculation, adding on an additional eight tails. PSA: in any real-world workflow, this repeated section should definitely have been a macro.

Screen Shot 2022-12-08 at 11.24.08 PM.png



clmc9601
13 - Pulsar
13 - Pulsar

And because my brain is (unfortunately) still wide awake, here's a visual representation of how the rope tail moved in part 2. I enjoy graphing unusual kinds of coordinates with the spatial tools like in weekly challenge #95 

 

 

Spoiler
Screen Shot 2022-12-09 at 12.13.15 AM.png

 

 

 

 

 

Pang_Hee_Choy
12 - Quasar

hope have time to simply it.

Spoiler
part1:
extract data and get H position.
use macro to get T position. plan to use multiple row tool which is faster but hard to setup...
Pang_Hee_Choy_0-1670579752311.png
macro: 
Pang_Hee_Choy_1-1670579770886.png
part2:
repeat the macro x8...

thought it require more adjustment... (maybe it required but it two or more errors product a correct result)

Pang_Hee_Choy_2-1670579815726.png

 



  

Jean-Balteryx
16 - Nebula
16 - Nebula

Day 9 done ! ✔️

 

I think this one permanently damaged my brain ...

 

Spoiler
JeanBalteryx_0-1670581543334.png

 

grossal
15 - Aurora
15 - Aurora

I will post my solution later once I annotated everything properly after work, but I wanted to share this little animation first (I hope GIFs work in the Community). Why did I build it? After spending roughly 2h with various approaches (including deleting everything twice), I decided to spend 30-40 minutes with an Excel file to visualize my input and check what was going wrong. Animation is posted in the spoiler. 

 

Spoiler

 GIF of the video (Alteryx has to approve the video ...)

Spoiler
2022-12-09 12-13-22.gif

 

AkimasaKajitani
17 - Castor
17 - Castor

I finished only part 1...If I complete the part 2, I will come back.

 

Spoiler
AkimasaKajitani_0-1670589629416.png

 

DawnDuong
13 - Pulsar
13 - Pulsar

It is getting tougher after every day and we are only at D9...

I opted to use iterative macro for ease of reading and debugging. My first attempt was not efficient, which after "refractor" decreased the runtime by 4x.

Spoiler
1) Step 1: Prepping the Coordinates first
DawnDuong_0-1670597287684.png


2) Step 2: Actual solving

DawnDuong_1-1670597336464.png

First iterative macro:

DawnDuong_2-1670597366591.png


Second "standard" macro. This is used simply to wrap the 1st iterative macro before feeding it into another iterative macro (see note below).

DawnDuong_4-1670597519425.png

 



Third macro, which is iterative

DawnDuong_3-1670597392410.png

 

The strangest thing is for some reason, I cannot seem to be able to directly use an iterative macro in an iterative macro (the iteration keeps running even though there is nothing to loop). But if the 1st iterative macro is wrapped in a standard macro and that standard macro is used in a 2nd iterative macro then it works perfectly... 

 

It is strictly not AoC related, but if you want to take a look and help me figure out the mystery, the workflow is attached ^-^

 

AkimasaKajitani
17 - Castor
17 - Castor

I can come back. Part 2 is solved.

 

It seems that my approach is the same as a @clmc9601 's one. Today, It took a long time for debugging.

Spoiler
AkimasaKajitani_0-1670600223859.png


Macro: This macro is for only shorten the loop.

AkimasaKajitani_1-1670600420012.png

 

https://github.com/AkimasaKajitani/AdventOfCode/tree/main/2022

 

patrick_digan
17 - Castor
17 - Castor

Well this is one where I'm just glad I'm done.

Spoiler
Below are my workflow and macros. Brute Force all the way. I'm not including my scratch paper which was also critical in understanding different scenarios :)
patrick_digan_0-1670605280389.png

Part2 Macro: 

patrick_digan_2-1670605392078.png

 


 

Labels