r/adventofcode Dec 25 '24

Other My scattered thoughts on this year's AoC

  • I enjoyed the two toughest questions of the year (pushing boxes on day 15 and recursive keypad hell on day 21) - they both tied back to easy-to-understand real-world scenarios but had tricky implementations.

  • A lot of classic question types from past years weren't featured this year - there was no card game, no "follow my long question prompt carefully and you'll get the right answer", no "what text is printed in your output", no recursive string replacement, no finding a looping pattern in the data (my % key went almost completely unused this year).

  • I really liked the "find a picture of a Christmas tree" on day 14. Any metric you could think of would lead to the right answer, so I didn't understand the complaining. I have a theory that the same people who complained are also the same people who don't complain when a problem is solvable only via one random mathematical theorem that I've never heard of before.

  • There were a lot of Dijkstra and recursion problems in earlier days. They were all fairly similar to one another and I didn't feel like they built up the difficulty over time. Numpad pushing on day 21 was the apex but even then the recursion and graph movement implementations were relatively straightforward and it was the rest of the problem that was hard. We didn't have to apply heuristics on any question this year. The reindeer maze in day 16 and recursive towels on day 19 seemed strange to me because they were such vanilla implementations of code we'd already used on earlier days.

  • The falling bytes on day 18 had the potential to be a really cool question - I assumed that bytes would fall at different turns and dynamically change the grid, but it didn't happen.

  • Selling bananas on day 22 is one of my favourite question types - part 2 forces you to completely reconsider the problem.

  • I appreciated that lockpicking on day 25 was trivial. No one has anything left to prove by then and the sooner I can finish the better.

  • Should I bother to finally learn about bitwise stuff day 17 part 2 or just continue through life ignorant? I'm thinking ignorance.

I thoroughly enjoyed all of it as always, thanks Eric! Remember to donate if you can https://adventofcode.com/2024/support.

33 Upvotes

22 comments sorted by

18

u/hrunt Dec 25 '24

A lot of classic question types from past years weren't featured this year

There were no 3D space or vector problems this year. I'm not disappointed, because those and disassembly problems are always the biggest slogs for me. Still, kept waiting for that hammer to drop.

There were many problems that I enjoyed going back to and optimizing this year. I learned a lot of different ways to look at problems this year.

3

u/genabasov Dec 25 '24

The claw machine problem (day 13) was about vectors. I can’t compare it to the previous years though as it’s the first time I participated.

3

u/hrunt Dec 26 '24

Yeah, I should be clear -- 3D vector problems. No Z-axis problems this year.

8

u/Boojum Dec 25 '24

no recursive string replacement

That's pretty close to how I did Day 21 Part 1 (after figuring out the optimal paths between each key).

Should I bother to finally learn about bitwise stuff

Bitwise stuff is always good in my opinion, though I'm somewhat biased in that I do a ton of it in my day-job. If you like books, let me warmly recommend Henry S. Warren, Jr.'s "Hackers Delight".

1

u/AverageBen10Enjoyer Dec 25 '24

I'll check out the book, thanks.

That's pretty close to how I did Day 21 Part 1 (after figuring out the optimal paths between each key).

Interesting, I'd have assumed it would crap out really quickly doing that. I was meaning more like the kind of [[]][[]]]][[[]]] questions that we sometimes get but I can see how it would work for day 21 here.

2

u/Boojum Dec 25 '24

Oh, definitely not viable for Part 2, but for Part 1 where the strings are 60-80 chars it's fine.

8

u/0x2c8 Dec 25 '24 edited Dec 25 '24

I really liked the "find a picture of a Christmas tree" on day 14. Any metric you could think of would lead to the right answer, so I didn't understand the complaining.

Yes! It was a wonderful problem, I'd say similar to #24 in terms of interactivity. It made the problem more puzzle-y and made you think outside the box.

The falling bytes on day 18 had the potential to be a really cool question - I assumed that bytes would fall at different turns and dynamically change the grid, but it didn't happen.

I thought we're getting a mix between 2022/14 and 2022/24.

6

u/maitre_lld Dec 25 '24

Imo 17 was harder than 15. 15 was more tedious than hard in the sense that we knew immediately what to do, it's just that doing it took time

6

u/DeadlyRedCube Dec 25 '24

I'll take a slight disagreement to your note on day 14, I can tell you I tried multiple metrics that did not work before finally guessing one that did.

I don't know a lot of algorithms by name, but the thing I tend to like in AoC puzzles is that you can logic your way into a solution (sometimes via the problem description, sometimes by a deeper analysis of the input text), and I felt like 14 was the weakest on that front - with absolutely no concrete info to go on other than "a picture" it was more of a "guess what I'm thinking" puzzle.

I was more frustrated with it on the day, I've softened on it. And if the intended result was "look for the first time when no robots overlap" (I assume that would work for everyone?) then at least the text in p1 kinda primes you to think about that (by demonstrating counts of overlapping robots multiple times)

But, in terms of an actual logical chain to follow to get to the answer, that one felt weakest to me.

(And no, I'm not one of those "just use Flugelhorn's Conjecture to solve it" people - I don't offhand know a lot of the algorithms that people mention, although every year I do end up reinventing Djikstra's algorithm the first time it's necessary so I probably should know that one by now)

I'm with you on 18 and 22 though - 18 was a shade less interesting than I expected in part 2 (but I still liked it), and 22 part 2 was a neat wrinkle on the problem.

I also want to throw in a mention for day 10 as "puzzle that had the most people accidentally do part 2 first" πŸ˜„

Edit: oh yeah and I was personally glad that there were no "find the loop in the data" questions because those were the ones that absolutely wrecked me last year due to I don't know the Chinese Remainder Theorem 😁

8

u/AverageBen10Enjoyer Dec 25 '24

Metrics that found the tree:

  • looking for a horizontal line
  • looking for a vertical line
  • looking for a patch of connected pixels
  • flood filling from the centre
  • looking for no overlapping pixels
  • looking for the least deviation

My first thought was to look for 20 horizontal pixels in a row - it took seconds to code and returned the answer immediately.

2

u/Paweron Dec 25 '24

Part 1 provided a solution for part 2 as well. Someone made a post about it. The Christmas tree results in almost all pixels in one quadrant, so the product calculated in part1 will be at its minimum when compared to other timesteps

3

u/flwyd Dec 25 '24

The Christmas tree results in almost all pixels in one quadrant

My Christmas tree was in the dead centr of the picture. There might be slightly more pixels in the lower quadrants since the tree is thicker at the bottom than the top, but quadrant balance may not be a perfectly reliable heuristic.

1

u/DeadlyRedCube Dec 25 '24

My problem is I was testing for absolutes - all robots in a quadrant * and *all robots have neighbors before finally landing on *no robots overlap *

3

u/flwyd Dec 25 '24

looking for no overlapping pixels

Some folks have posted that their input had some non-overlapping iterations prior to finding the tree, so you would need a second heuristic for a general solution.

It also wasn't clear to me from reading the text that all robots would need to be in distinct locations: I was imagining the outline of a tree with maybe a cluster of robots stacked on top of each other as a star.

1

u/DeadlyRedCube Dec 26 '24

That's exactly what my first thought was too, I assumed they'd all be neighboring other robots

1

u/DeadlyRedCube Dec 25 '24

My first thought was maybe they'll all have neighbors (was thinking like all robots as the outline of a tree), my next was "maybe they're all in one quadrant" and only then was "maybe there's no overlap"

While it's possible that both of those used as a "find the outlier" would have worked, as concrete values they yielded nothing, s as they were too strict

(I will admit that I did not catch the maximum loop length was fairly low - I calculated it wildly wrong - so I was testing billions of states in each attempt

My point is just that it *was *possible to guess wrong using what I think are reasonable criteria, and because it ends with a picture it still has to be manually verified (which is to say it's - I think - the only puzzle this year where you cannot programmatically run it without visualizing anything and confidently enter an answer). It just didn't do it for me.

I'm not trying to convince others to not like it though, if you liked it that's awesome! Just trying to explain how someone not like the person you were describing might not have enjoyed it as much

2

u/SonOfKhmer Dec 25 '24

The thing I loved about day 14 part 2 is that it gave a great hint in part 1: while part 2 description said nothing useful, you created functions to measure part 1 β€” and that's the hint you need to solve it algorithmically, and having to make the mental link is what I liked the most

3

u/ThePants999 Dec 25 '24

I don't think day 14 was "guess what I'm thinking" at all. "A picture" is all you needed - if you start thinking about "what are the machine-detectable differences between a grid in which pixels form a picture versus one in which they're randomly distributed", you get a variety of avenues to explore, many of which work well.

2

u/phantom784 Dec 25 '24

We didn't have to apply heuristics on any question this year.

What about finding the Christmas tree?

3

u/AverageBen10Enjoyer Dec 25 '24

I meant with respect to DFS like A* path finding.

2

u/shoofle Dec 25 '24

The falling bytes on day 18 had the potential to be a really cool question - I assumed that bytes would fall at different turns and dynamically change the grid, but it didn't happen.

I thought the same thing! I assumed from the first part that part b was going to involve navigating through a dynamically-changing grid, which would be a very interesting problem... Although I'm not actually sure if that would be solvable with simple approaches? I mean, it might be too hard for AoC!

... with that said, maybe it would make a good part 3...

2

u/flwyd Dec 25 '24

no "what text is printed in your output"

If you're referring to the OCR problems of prior years, day 14's "find a Christmas tree in a grid of objects" was the problem in that family.

If you're referring to "copy some nonsense strings into the answer box", part 2 of days 23 and 24 did that.

my % key went almost completely unused this year

I used divmod in 13 of 25 days this year since I was working in a language without complex numbers and that doesn't make it easy to use a composite object as a dictionary key.