Advent of Code

Same, I only looked after.

Not a fan of Day 13 part 2.

I got the right answer that works on all the test inputs. However, my actual problem input is intentionally so large that the solution will take forever to find. You have to optimize the answer to actually reach the answer.

The problem is that the clever optimizations you need to get the answer aren’t a computer thing, they are a math thing. It’s a particular theorem. I read about it online, and while I understand what I read enough to see how it is applicable to the problem, I can’t understand it enough to actually implement it. It is math beyond my ability.

Give me more problems like day 8 please. I’m a computer expert, not a math expert.

A much smarter person made this amazing visualization that demonstrates a smarter and faster way to do it that I would never have come up with.

It me. Go slow and make sure it works.

Every programming challenge attempts to expand until it is Project Euler. Those challenges which cannot so expand are replaced by ones which can.

had time again to have a go at it, and solved it, in about 45-ish lines of javascript :smiley:
(I already had the plan 4 days ago, but it was 3am and I was tired…)

(solution is at the end here)

Got a little bit punished on Day 15 part 2, and had to re-do with some caching for more speed. Also got slightly held up by a weird thing printing out the wrong answer even though my code produced the correct answer, and my little test framework passed.

Really liked day 16. Part 1 very nice. Part 2, you saw it coming. However much part 2 seemed very difficult when you first think about it, when you actually go to implement it, the answer appears. More like this please.

We got there on day 19! Took awhile, but somehow I stumbled into a correct answer mostly on my own. Only had to google for stuff like regex syntax. I didn’t particularly like the puzzle for day 19, but I had a lot of satisfaction in that I was able to get the right answer with very little help from the Internet.

Spent far too long this morning pondering how I would need to change my day 19 code in order to accommodate recursive rules, when I should have just run it; my solution to part 1 already supported recursions! It just took me a while to convince myself.

Having a great time working through these puzzles this year after the past few years of quickly falling off the bandwagon for whatever reason. I’m actually taking a bunch of vacation days around the holidays this year and am tempted to spend some of them going back and whittling away at previous years’ puzzles.

Day 20 report. Did part 1 in about an hour. I can imagine how to do part 2, but it will take me so long to code it and debug it. I just became full of dread when I realized how many hours it will take me to write the code. Maybe there’s a clever way to do it faster, but I don’t know it. I gave up simply because I don’t want to spend that many hours of my life on that.

Is the first one that defeated you?

Depending on your definition of defeated, yes. You’ll have to take me at my word that I absolutely know how to do this, it would just take me all day using the methods that I can think of.

Compare that to day 13 part 2 where I actually coded a correct answer, but it didn’t execute fast enough. Then I had to watch a little visualization someone made (seen above in this thread) before I realized how to make my code fast enough to actually finish.

There has yet to be one where I’m 100% unambiguously defeated in that I have no idea how to even write code that could get the right answer.

Day 20 Part 2 spoilers

In Day 20 part 1 I just had to identify the 4 corner pieces. So all I did was give unique IDs to each piece-edge, and then find the four pieces that had two piece-edges that were unique to themselves and no other pieces.

Part 2 actually required putting the puzzle together properly, which I neglected to do in part 1. That means I would have to write code to:

  1. Figure out which piece goes where in the grid.
  2. Rotate each piece into the correct orientation.
  3. Remove the edges of each piece.
  4. Combine the innards of each piece into the final puzzle image.
  5. Search the resulting image for sea monsters.
  6. The correct orientation of the final image is not specified, so I would have to rotate and flip the final puzzle (or the sea monster) to every possible orientation until I could find at least 1 sea monster, perhaps indicating that that was the correct orientation. I’m assuming the puzzle input is nice and no sea monters appear when the puzzle is oriented incorrectly.

Some of these individual steps are as much work as all of part 1.

I used a similar strategy for day 20 part 1. I’m progressing through part 2 but I agree it’s a hell of a slog. Came here to give myself a mental break and see how other people were feeling about it. Glad I’m not the only one who hit this one and was disappointed by how tedious it seems to be.

AoC Day 21. Not hard actually. I just got stuck for a long time because an incorrect unique constraint in my data structure resulted in 5 of the input lines being lost.
It took me a long time to realize what the problem was because I kept looking for errors in my algorithsm, which were all correct. Once, I recovered the missing data, everything worked.
Had code that could solve part 2, but just did it by hand, since it was faster.

AoC Day 22, very nice. :crab:

I liked AoC Day 23 well enough. One complaint with the wording of the problem.

However, it was yet another performance based part 2. Pretty sure my answer is correct, but it is too slow, and I have no clue how to make it faster.

Last time this happened I at least had a few ideas. This time, less ideas.

It doesn’t let you do Day 25 part 2 until you finish all the parts of all the other days. There are two part 2s I didn’t do, and probably am not going to do anytime soon. I guess I’m done.

Speed runner and puzzle streamer tries advent of code.

https://www.youtube.com/watch?v=llGOCZCxO2s

Peter Norvig’s code samples for this year’s AoC

I saw this yesterday and I very much appreciated that we both had very similar solutions for the sea monster problem part 2.

Family holiday preparations kept me from doing Part 2 on the night it was released, and unfortunately I didn’t feel like coming back to it later: it seemed too tedious for too little reward. I thought it was inelegant that a solid block of # pixels would be considered a sea monster with waves.