Discussion thread for day 14 of the Advent of Code - https://adventofcode.com/2023/day/14
Passing the turning point Day13, 2nd half of AoC has started from today.
If you are stuck in part2, collapse spoiler 👇
Today was very interesting, and it was very satisfying getting to reuse a macro I built for Day 13. I definitely like how simple all the standard macros make the workflows look. I may add explanation of algorithm tomorrow. This problem is much simpler, but the solution is quite elegant.
Edit: Added my workflow
Algorithm:
Step | Data | Original Length | Next Instruction |
0 | ..O..OO..O | 10 | ReplaceChar([Data],'O','') |
1 | ...... | 10 | PadLeft([Data], [Length], 'O') |
2 | OOOO...... | 10 |
So the next question is how can we handle cube shaped rocks ("#")? Since #'s don't slide, then the space between 2 #'s would qualify as a string of unimpeded "round" rocks with empty spaces around them (see above). This means if we split our string with Text to Columns over all #'s (however, split to rows - not columns), then we now have a large list of strings that we can perform our "West" Slide on. After Summarizing via Concatenation, to replace the #'s that we removed, we will have successfully slid all rocks West.
Workflows:
Probably my favorite puzzle so far! Just the right amount of trickery!
part 2 take 20~mins with AMP engine on.
Today's one is interesting.
My workflow is very messy.
My solution.
This puzzle reminds me Day17 in 2022(TETRIS!!).
I really enjoyed today's challenge - very interesting! I'm adding this to my list of problems to keep working at - I don't love my P2 approach and know that I could implement some logic for earlier stopping, just need a fresh brain to tackle it!
@CoG
I was really wondering how di you put it off with 2 Fofrmula tools. Thank you so much for explaining it in detail.
My approach is more like bubble floating up.
I also seperate the Rows based on # after converting # as 9, O as 6, and . as 3.
then we can use one Sort tool to do the magic. Number is easier to handle than the Letter 😂
And you and @gawa mentioned about the patterns and I plotted it for only 100 cycles with test data and it is beautiful.