Discussion thread for day 11 of the Advent of Code - https://adventofcode.com/2023/day/11
I'm just wondering if we upload WF here right after we finish, somebody can download, and use them to get answers immediately for just collecting stars...That might be not fair for everybody living in different time zone so I'll upload screenshot meanwhile😅
I am quite satisfied with the solution I came up with today, it feels very intuitive and simple (although I have little doubt someone will post a much denser workflow at some point). It took me a while to work out the kinks and bugs, but it works now and that's what counts. I am inclined to agree with @gawa, so I will include only a screenshot of my solution for now.
Edit: Adding my workflow now that top 15 have solved at least part 1.
When I created Part 1, I thought this logic might not work for Part 2, but I still had to create a new logic for Part 2.
My solution.
I built out an entire solution for Part 1 that worked on my sample data and not my real data. Instead of spending time troubleshooting, I decided I didn't like my approach and started from scratch. While this slowed me down substantially for Part 1, it paid off for Part 2.
ETA: I personally don't have a problem with people uploading their workflows and choose to do so. If someone wants to compete in bad faith, they will. Even if we didn't upload any workflows here, Reddit is full of scripts people could run to get answers and then work through the Alteryx later. I'd rather just post my workflow in the spirit of learning and fun competition, but that's my two cents
Had to reconstrct the logic for Part 2...
Three things I learned from the AoC of 2023
1. Brutal Force does not work, so dont tempt.
2. One day without AoC is actually making me feel life is so much easier..
3. I tends to be stupid when doing AoC. Was trying to develop a macro for the combination of only 2 lists of numbers..
Intersting problem.
Designer Cloud Solution.
Also I tidied up my Designer Desktop solution of Part 2.
Day 11 completed! Despite claiming that I would brute force part 2 at any cost in the WhatsApp group, about 90 minutes into generating over 2billion rows, I realised that this could actually be done in a much simpler way and decided to implement that instead... smart, eh?
Day 11 finished.
My solution:
No macro/generate rows! 0.9 sec for p1/p2
Solved!! Time to head back to D10
My Solution
I liked this one, Part 1 and Part 2 just need to adjust the multiplier in the circled tool
It's so hard to resist the urge to go back and "fix" part 1 when you find a better solution in part 2!
no macro day is a happy day.
A nice, tiny break from making iterative macros!
In other news, my efforts/desire to limit the number of tools I slap on the canvas is going the same way as my efforts to reduce the number of cookies I'm consuming this season: not particularly well. I'll pick up on both of these things in the new year 😅
I post again with solution in yxzp.
Hello Manhattan distance my old friend!
This runs in a few seconds on my machine - so I didn't spend too much time optimizing
Solution:
A few things help here:
I was a bit lazy – and built 2 macros for the bulk-out, one to move rows, and one to move columns – but it was less brain tax.
The prep macro is a little more complex – it splits out rows; columns to make downstream processing easier
The Bulk-out macros:
I suspect I could have done this better – but this goes through each row which is empty from the largest to the smallest, and shuffles them downwards. This way you can iterate from the end. If I had spent more time on this – there is probably a non-iterative solution, but this runs lightning quick already.
Very much enjoyed this challenge. In years past, the "shortest distance" challenges didn't make sense. This one did, and I'm thrilled that my part 2 runs in .3 seconds!
Straight math, no macros, no spatial. I do wonder if you could spatially match points to a line, maybe with a buffer or trade area, and count the number of points to take a spatial approach. Don't have the energy to poke through workflows to see.
Here is my Day 11 solution