General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2023 Day 10 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 10 of the Advent of Code - https://adventofcode.com/2023/day/10

22 REPLIES 22
estherb47
15 - Aurora
15 - Aurora

For whatever reason, I really enjoyed solving part 1 of this, but had very little time each day to work on it.

My first approach was a spatial one. Look at the orthogonal neighbors by generating points on a map. And even though I only used that approach to generate neighbors for tiles, for whatever reason my iterative macro started throwing lots of iterative records after about 100 iterations, which was completely wrong.

 

So just tried the neighbor by numbers approach that @grossal mentored me through last year (at least I think it was last year. Could have been two years ago).

 

It could definitely be more efficient. 

Spoiler
My macro is super simple and I'm relying on the shape of the tile and the next direction that flows from the tile to find the next pieces of the pipe.
image.png
estherb47
15 - Aurora
15 - Aurora

For part 2, I did go with a spatial route. Really enjoyed this challenge, and it was the second this year when I got the answer on the first and then second try.

Spoiler
Used the data from part 1 to assign centroids to each point. Realized quickly that I needed to use Integer as Lat/Lon for the number of points, and then generated the pipe.

Took an outer join from all of the points and the completed pipe to show what wasn't on the pipe, and then spatially matched these to the pipe, using Target Within Universe.

My first answer was wrong, so thought to look for patterns in the contained points. Lo and behold, one was zero distance from the pipe, and the rest were offset from the pipe. Filtered that zero distance out, and go the correct answer.
Tokimatsu
12 - Quasar

I used spatial tools.

Spoiler
スクリーンショット 2024-01-05 151749.png

Labels