In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2025 Day 4 (BaseA Style)

AlteryxMatt
Moderator
Moderator

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

Matt Rotundo
Alteryx Community Moderator
24 REPLIES 24
PangHC
13 - Pulsar

Start to use back macros created in previous years.

Spoiler
PangHC_1-1764834697370.pngPangHC_2-1764834708142.png

 


 

Qiu
21 - Polaris
21 - Polaris

Everyone is so fast.

Spoiler
AoC 2025 Day 04.png
DataNath
17 - Castor
17 - Castor

The grids are back! For those of us who've participated in previous years, this is pretty much our bread and butter now, though today was definitely a very kind challenge compared to others! Workflow/macro aren't as clean as they could be but I was more than pleased with everything working first time.

 

Spoiler
Workflow.png

Iterator.png
OllieClarke
16 - Nebula
16 - Nebula

I went route 1 today

Spoiler
Day 4.pngDay 4 macro.png
DylanBell
10 - Fireball

By far my favourite challenge so far!


Bulien
Kenda
16 - Nebula
16 - Nebula
Spoiler
part 1 so far! definitely could've had a faster run time if I narrowed down the joins instead of appending everything, but it worked😂

Kenda_0-1764858767358.png

 



Goddenra
8 - Asteroid

Some very elegant solutions out there. Had to go down the macro route for Part 2 for reasons of sanity.

Spoiler
Got a bit stuck on Part 1, as missed a corner case with the boundaries which was careless. Annoyingly it said I had the same answer as someone else, so knew I was really close. Should tidy it up a bit really.

Haven't created an iterative macro in a little while, so AoC is always a good refresher ...

Screenshot 2025-12-04 143922.png

mmontgomery
11 - Bolide
11 - Bolide

Day  4

Spoiler
Had a dumb bug on P1 where I was filtering on adjoining points = '@' and counting vs just counting if they existed. Once I got that, P1 and P2 were a breeze.

P2 had the I macro using the same logic as P1 just adjusting for grid points with updated values2025_Day4.jpg2025_Day4_Macro.jpg
Erin
11 - Bolide

Shout out to @Carolyn - I have my first "Nope didn't work" container. We're supposed to be keeping those? Kinda glad I did because I went back later to figure out why it didn't work and of course it was a rookie mistake. Learning so much!

 

My overall strategy for Pt 1:

 

Spoiler
  1. Split the data up and assign each single character coordinates.
  2. Calculate what all the neighbor coordinates are.
  3. Look up the neighbor character using the neighbor coordinates.
  4. Count the number of neighbor rolls.
  5. Filter for the answer. 
Well, I did do that more or less but my initial answer was too low. I kept getting the same answer too, so I decided to scrap it (but keep it?) and try a different way to lookup the values. This worked, and it turns out my first route didn't work because.... 
Spoiler
My filter excluded neighbors with a zero roll count. One little tweak there and the first route would've been fine.
Ah win some, learn some. 😁

Day4.png

 Then for Pt 2

Spoiler
I put Pt 1 in an iterative macro and updated the char to be a ".", then sent it back through for another go. Easy peasy.
Day4 Iterative Macro.png
DavidP
17 - Castor
17 - Castor

Thanks for the tip on the zero counts @Hub119 !

 

 

Spoiler
DavidP_1-1764864715171.png

 

 

Spoiler
DavidP_0-1764864679850.png

 

Labels
Top Solution Authors