Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
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

60 REPLIES 60
JoshuaB
Alteryx
Alteryx

I'm still standing! Struggled on 'seeing' the diagonal part but once I did I got the rest! 

 

Spoiler
Day 4.png
Joshua Burkhow | Chief Evangelist @ Alteryx | Follow me on LinkedIn and Twitter
lwolfie
11 - Bolide

Definitely needed help on this one.  Probably due to the later hour for me.

Blake_E
8 - Asteroid

When the RegEx tool and RegEx functions come up with different answers 🤔

Laurap1228
11 - Bolide
Spoiler
AOC2024_4.PNG
Carolyn
12 - Quasar
12 - Quasar

Solved!

 

I built a solution for Part 1 that worked where I used non-macro Tools to check the rows & columns. Then I built a macro for the diagonals. Then I re-did part 1 and the macro so it could handle all 9 directions (counting not moving as a direction.... I guess I should've excluded those. Drat!)

 

Then Part 2 didn't need any tweaks to the macro (woohoo!) and involved an extra filter at the end. 

 

I used a Text Input file for the values I was trying to get - e.g. "X", then "XM", then "XMA", etc. I feel like I could've done that differently but it also worked beautifully for Part 2 without any macro tweaks, so I think I'm calling that a win.

 

Spoiler
2024-12-06_14-24-05.png

2024-12-06_14-24-16.png
estherb47
15 - Aurora
15 - Aurora

In past years, I've always solved problems like these with spatial tools. Wanted to try something different

Spoiler
image.png

For part 1, built 4 letter words going horizontally, vertically, diagonally (both directions), and then found matches to XMAS on reversed words as well

For part 2, built 3x3 blocks of letters, building 3-letter blocks horizontally, and then matching three consecutive rows before concatenating them. Used RegexCountMatches as a bit of a brute force way to find the matching patterns.

 

SeanAdams
17 - Castor
17 - Castor

and here is the accompanying python - part 1 is pretty awful, part 2 is sweet.

 

Spoiler
 

image.png

image.png



all code at SeanAdams10/AdventOfCodePython: Advent of code challenges in Python - across multiple years

afv2688
16 - Nebula
16 - Nebula

This was an interesting one!

 

Spoiler
Untitled.png
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

Nice! Love the grid style ones (may saying regret this) 😂

Spoiler
Screenshot 2024-12-09 193617.png

All the best,
BS

LinkedIN

Bulien
CailinS
Alteryx
Alteryx

Today was pretty fun...diagonal considerations through Alteryx aren't exactly straightforward but I bet they are harder with other tools!

 

The iterative macro is a wonderful thing! And for me, today was the first time Part 2 was way easier for me than Part 1! Once again....and I don't think this is a spoiler but when using Regex....

 

Spoiler
Tokenize!

Also, here are my screenshots

Spoiler
Day 4.jpg

Day 4 Part 1 Macro.jpg

Day 4 Part 2 Macro.jpg

 

 

Cailin Swingle
Customer Experience
Labels