Advent of Code 2024 Day 4 (BaseA Style)
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Alteryx Community Team
‎12-03-2024
09:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 4 of the Advent of Code - https://adventofcode.com/2024/day/4
Labels:
- Labels:
- Advent of Code
60 REPLIES 60
15 - Aurora
‎12-04-2024
03:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My solution.
Spoiler
Workflow
I personally like my workflow in that it processed the order of "XMAS" 😀.

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
I personally like my workflow in that it processed the order of "XMAS" 😀.
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
11 - Bolide
‎12-04-2024
03:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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

Star 2

Star 2
 
 
15 - Aurora
‎12-04-2024
04:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Picking up a bit
Spoiler
initially I made an iterative macro with appends and then filters:

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

Here's my horrible filter:
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
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)))
17 - Castor
‎12-04-2024
04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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".
Alteryx
‎12-04-2024
05:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Samantha Clifton
Alteryx
#alteryxrocks
Alteryx
#alteryxrocks
11 - Bolide
‎12-04-2024
06:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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'


For P2, I just did all the combo joins of diagonals where they matched on a point and the letter 'A'
leozhang2work
10 - Fireball
‎12-04-2024
07:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alteryx
‎12-04-2024
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
BransonJamesFarley
8 - Asteroid
‎12-04-2024
07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Definitely helped referencing other users in this thread. Was definitely a challenge for me!
Spoiler
 
Linas
8 - Asteroid
‎12-04-2024
08:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
