Now that it's live, don't forget to accept your certification badge on Credly today! Learn more here.
We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email for assistance.

General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

Advent of Code 2020 - BaseA Style (Day 20)

15 - Aurora

Discussion thread for day 20 of the Advent of Code :

8 - Asteroid

I really enjoyed Part 1 today. Part 2 is going to take a little longer though..... 🐍


Part 1 solution:





16 - Nebula
16 - Nebula

Like @Steph_Maddrell solved part 1 quickly. Part 2 I can get sample to work but something in my vast workflow doesn't work for it....


As it stands...
- Works out all the joins between tiles
- Works out all 8 versions of each tile
- Builds the grid layout (correct for sample at least)
- Creates the big jigsaw puzzle



16 - Nebula
16 - Nebula

That was a slog (not winning tool golf...) to get a solution out - Part 2 below:



11 - Bolide

Part I was accessible...



Part II... still working on it. It works for the sample dataset. But somewhere with my main dataset it breaks. I suspect it's the tiling of the main puzzle, but who knows. Right now I have a massive workflow with 9 macros that fails to retrieve the answer...



11 - Bolide


It's not pretty, but works (with some caveats)...



I spent way more time than I should have in this. Anything that involves having some type of "spatial vision" or rotating things in my mind I'm clueless.


My thought process on this one:


Part I was relatively easy because there were no "confusing edges" (e.g. edges shared by more than 2 tiles). With the corners identified, I decided to pick one corner and start growing the board from that.
Pick one tile, get the matching tile, then go across and get the next tile and so on. I was trying to keep track of thinks like...
If tile A is not flipped, and the edge at Row_01 is matching tile B, not flipped, at Row_10, then tile B does not need to be rotated.
If tile A is not flipped, and the edge at Row_01 is matching tile B, flipped, at Col_01, then tile B needs to be flipped and rotated 3 times (or -1, but I sticked to +ve).
But I was doing something wrong (don't know what yet) and, although the array with the positions was correct, the orientation wasn't, so it was failing when building the big puzzle.
Some colour coded tiles (the sample input)Some colour coded tiles (the sample input)

I eventually decided to stop sinking more time debugging that and chose to use the array with the positions to grow the board once more. This time, starting wtih one corner, then getting the adjacent tile with no prior information, get all the possible rotations and choose the rotation that fits. This makes it rather slow (~ 1min), but still faster than debugging the whole thing.

In order to find the seamonsters...
I took one seamonster (length 20), rotated it and flipped it to all possible orientations, chose one "#" at random and decided that was the "origin" of the seamonster. Then calculated offset in rows/columns for all the remaining parts of the seamonster.
I then evaluated whether each '#' in the map was a potential origin for a seamonster (that is, all the corresponding offseted rows and columns contain a # as well).

The only thing is... there's still something not quite completely working, meaning that it DOES matter which corner you start building from (in other words, I needed to run it a couple of times to make sure that seamonsters were found!

I also built more macros than I care...😅