Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2021 Day 12 (BaseA Style)

jdunkerley79
ACE Emeritus
ACE Emeritus

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

 

 

858465.jpg

8 REPLIES 8
bflick
8 - Asteroid

A real pathfinding mission. Reminder that regex functions have to be specified as case sensitive! Hopefully saves you a little time. Iterative macros for the win yet again.

Spoiler
An interesting twist on building out hierarchy trees. My main challenges were dealing with duplicates and building it all dynamically without field names.
Main Workflow:
bflick_0-1639288911163.png


Challenge 1 Macro:

bflick_1-1639288931506.png


Challenge 2 Macro

bflick_2-1639288939315.png

 

clmc9601
13 - Pulsar
13 - Pulsar

Thankful for dynamic rename and dynamic select!

 

Spoiler
I used an iterative macro to add segments to the chain and evaluate whether the current path obeyed the small-cave-once criteria and/or was finished on the current iteration. I made a slight adjustment to the filter logic for the second challenge.

Screen Shot 2021-12-11 at 11.01.05 PM.png
Screen Shot 2021-12-11 at 11.01.35 PM.png

 

patrick_digan
17 - Castor
17 - Castor

Happy with my solution today. Although part 2 took slightly longer as I didn't realize only 1 small cave could be visited twice (I was letting them all be visited twice).

Spoiler
Workflow:
patrick_digan_0-1639313395718.png

Macro for part 2. Similar to part 1 with only minor changes to let 1 small cave be visited twice:

patrick_digan_1-1639313440899.png

 

AkimasaKajitani
17 - Castor
17 - Castor

Today is iterative day.

 

Spoiler
The difference from macro 1 and macro 2 is only the filtering way and adding parameter.

AkimasaKajitani_0-1639319699468.png


Macro for star1

AkimasaKajitani_4-1639320006934.png

 



Macro for star2

AkimasaKajitani_5-1639320037652.png

 

GitHub

https://github.com/AkimasaKajitani/AdventOfCode/tree/main/2021

cgoodman3
14 - Magnetar
14 - Magnetar
Spoiler
This is a challenge which highlights how it is tricky being able to debug iterative macros, as the example inputs don't end up duplicating small caves on the first iteration so needed a bit of blind building of the conditional part of the macro.
In addition I found that I needed to cap the number of iterations at 3 more than part 1 solve to get the answer as I had some logic which was causing it to cycle back and forth (i.e. iteration - 1 would filter out repeating caves, but then it would keep adding on the pairing and it would need removing again), so I didn't have a suitable exit condition.

cgoodman3_0-1639319005439.png


Macro for part 1

cgoodman3_1-1639320260799.png


Macro for part 2
Slight modification to deal with the allowing a visiting one small cave once.

cgoodman3_2-1639320352071.png

 

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
SeanAdams
17 - Castor
17 - Castor

This took MUCH longer than it should have - the thing that tripped me up was allowing 1 double visit to a small cave rather than a blanket rule for all caves.

 

Really enjoyed the fact that I got to use the Arrange tool for this one.

 

 

Spoiler
Recipe:
- Set up a list of unique caves; and unique paths
- Starting with the start node repeat the following:
      - Join to all the possible nodes based on the paths available
      - Remove any that go through start or end-nodes more than once
      - remove any that go through small caves more than once
      - add back anything where you only double-visit a specific small cave once

SeanAdams_0-1639590527878.png

 

The loop piece:

SeanAdams_1-1639590683749.png

 

 

 

PangHC
12 - Quasar
Spoiler
it take longer than usual.

i change lot of macro input and retry again and again.
keep find wrong answer, like do not check the small character.
in part 2, forget to check small character more than 2. etc...

Workflow:
Pang_Hee_Choy_0-1639709946833.png
for input, split start point and other. (which include end point) 
transpose them, and keep the original relation. (to get the opposite link later.)

*put ID for easier reference later.

 

Macro
Pang_Hee_Choy_1-1639710158356.png

Join first to get all the possible entry.
verify the new chain, whether is small and count is 1.
verify whether is "-end"

Part2:
verify again the count >2 whether are only have 1 small link appear twice.


caitlynmcintyre
9 - Comet

I liked this one a lot(:

 

Spoiler
caitlynmcintyre_0-1640063161406.png


Inside the Macro:

caitlynmcintyre_1-1640063192625.png

Part 1 just used diff logic for continuing the loop

caitlynmcintyre_2-1640063231846.png

 

Labels
Top Solution Authors