Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2021 Day 14 (BaseA Style)

jdunkerley79
ACE Emeritus
ACE Emeritus

Discussion thread for day 14 of the Advent of Code - https://adventofcode.com/2021/day/14

 

 

33480c3d-16ee-4b01-80c0-35c85f2a7d9f.jpg

16 REPLIES 16
bflick
8 - Asteroid

My computer definitely hates me for brute forcing part 2.

Spoiler
Workflow:
bflick_0-1639461205150.png


Macro:

bflick_1-1639461211860.png

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

@bflick your computer might hate you, but it's clearly faster than my computer. Brute force might take me until Christmas at this rate...

clmc9601
13 - Pulsar
13 - Pulsar

Agreed, @NicoleJohnson! I've realized the hard way that exponentially increasing records process exponentially slower, even in Alteryx. This reminded me suspiciously of trying to brute force one of the previous day's challenges, so I stopped and redesigned my macro instead.

 

Spoiler
I realized tokenizing and concatenating billions of characters wasn't my friend for the second part of the challenge. Instead, I realized I could focus on counting the number of letters added per iteration. If I could keep track of the pairs and the resulting combinations, the full string itself didn't actually matter to find the answer.
WorkflowWorkflow

Macro v2Macro v2Macro v1Macro v1

 

cgoodman3
14 - Magnetar
14 - Magnetar

@NicoleJohnson I'm currently at iteration 25 and forecast that it will complete in December 2026!

 

Time to refactor for a solution.

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
bflick
8 - Asteroid

Took some inspiration from @clmc9601  and optimized. Counting letters instead of creating a string.

Spoiler
Workflow:
bflick_0-1639489090980.png


Macro

bflick_1-1639489097393.png

 

Similar to the lanternfish counted resulting pairs and output the new letters created by each step. 
afv2688
16 - Nebula
16 - Nebula

It is ugly but it works XD and efficiently!, less than half a second 🙂

 

Spoiler
Untitled.png
patrick_digan
17 - Castor
17 - Castor

I was happy with how mine turned out, especially my macro.

Spoiler
I just looked at each pair and counted, similar to others it appears. My macro ended up being really simple. It runs in a second or so.
patrick_digan_0-1639516190654.png

patrick_digan_1-1639516217843.png

 

 

 
LiuZhang
9 - Comet
Spoiler
Part 1Part 1Part 2Part 2workflowworkflow

Used a lot of if else statement for part 1, was pride of the macro until hit by part 2.

Picked idea from above when @bflick mentioning about counting letters instead (don't really understand @clmc9601 's workflow), but got there eventually.

dsmdavid
11 - Bolide

Also tried to brute force part 2 for a while, then opted for some counting too. Keen to see how other people "counted".

Spoiler
dsmdavid_0-1639528561355.png

and the iterative:

dsmdavid_1-1639528622255.png

 

https://github.com/dsmdavid/AdventCode2021

Labels