Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2024 Day 4 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 4 of the Advent of Code - https://adventofcode.com/2024/day/4

61 REPLIES 61
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

My solution.

Spoiler
Workflow
I personally like my workflow in that it processed the order of "XMAS" 😀.
workflow.png
Formula Tools
[RowNo] = 
  IF [Direction] IN (1,2,3) THEN [RowNo] - 1

  ELSEIF [Direction] IN (4,5) THEN [RowNo]
  ELSE [RowNo] + 1
  ENDIF
[ColNo] = 
  IF [Direction] IN (1,4,6) THEN [ColNo] - 1

  ELSEIF [Direction] IN (2,7) THEN [ColNo]
  ELSE [ColNo] + 1
  ENDIF
Sebastian_Chaieb2
11 - Bolide
11 - Bolide

That was great :D 

I had to use two batch macros to solve it. I am really curious how other experts solved it. I believe it will be very inspiring :P

Spoiler
Star 1
Day4_Star1.png
Star 2
Day4_Star2.png

OllieClarke
15 - Aurora
15 - Aurora

Picking up a bit

Spoiler
initially I made an iterative macro with appends and then filters:
image.png

but then I realised for 4 letters it wasn't needed, so I swapped to generate rows and joins, and my run time went from ~28 seconds down to 0.9
image.png
Here's my horrible filter:
(([0_col]=[1_col] AND [1_col]=[2_col] AND [2_col]=[col])
AND (ABS([0_Row]-[1_Row])=1 AND ABS([1_Row]-[2_Row])=1 AND ABS([2_Row]-[Row])=1))
OR
(([0_Row]=[1_Row] AND [1_Row]=[2_Row] AND [2_Row]=[Row])
AND (ABS([0_col]-[1_col])=1 AND ABS([1_col]-[2_col])=1 AND ABS([2_col]-[col])=1))
OR
(([col]-[2_col]=1 AND [2_col]-[1_col]=1 AND [1_col]-[0_col]=1)
AND (([Row]-[2_Row]=1 AND [2_Row]-[1_Row]=1 AND [1_Row]-[0_Row]=1) OR  ([Row]-[2_Row]=-1 AND [2_Row]-[1_Row]=-1 AND [1_Row]-[0_Row]=-1)))
OR
(([col]-[2_col]=-1 AND [2_col]-[1_col]=-1 AND [1_col]-[0_col]=-1)
AND (([Row]-[2_Row]=1 AND [2_Row]-[1_Row]=1 AND [1_Row]-[0_Row]=1) OR  ([Row]-[2_Row]=-1 AND [2_Row]-[1_Row]=-1 AND [1_Row]-[0_Row]=-1)))



​
DataNath
17 - Castor
17 - Castor

If you value your mental well-being then please don't open this spoiler. However, as a wise man once said... "2 stars is 2 stars my son".

 

Spoiler
Day 4.pngDay 4 macro.png
Samantha_Jayne
Alteryx
Alteryx

Phew. Finally got this one. I should have flexed my AoC muscles earlier, this one brought back all the memories. Hope you all managed to find me!!!

 

SAM was everywhere in that wordsearch! Was a massive distraction!

 

Spoiler
Day 4 - Both Stars.png
Samantha Clifton
Alteryx
#alteryxrocks
mmontgomery
11 - Bolide
11 - Bolide

D4. More in spoiler

Spoiler
My approach was to take a given point and draw four (or three points) in each coordinate: North, South, West, East, North West, North East, South West and South East. The workflow design was meant to create those directions to more easily organize the solution, even though the workflow looks like a bunch of frayed wires.

For P2, I just did all the combo joins of diagonals where they matched on a point and the letter 'A'day4P1.pngday4P1_2.pngDay4P2_1.png
leozhang2work
10 - Fireball
Spoiler
day 4.png
JeffF
Alteryx
Alteryx
Spoiler
Day04-JeffF.png
BransonJamesFarley
8 - Asteroid

Definitely helped referencing other users in this thread. Was definitely a challenge for me!

Spoiler
Advent of Code 2024 Day 4.PNG

   

Linas
8 - Asteroid

A good challenge!

Labels
Top Solution Authors