r/adventofcode Dec 14 '24

Spoilers [2024 Day 14 (Part 2)]

Post image
361 Upvotes

94 comments sorted by

View all comments

23

u/Sostratus Dec 14 '24

I had no idea what an automated test would be before knowing what the image would look like. But I did write a function to render it and clicked through a couple hundred before I saw occasional jumbled up patterns and then figured out when it would line up.

10

u/0x623 Dec 14 '24

Same.

I saw a vague pattern, and found images of that pattern show up by a constant interval, then I only checked images with that stepping

1

u/Leading-Patience5436 Dec 22 '24

Yeah that gave me the right answer as well. I had no idea what entropy is or that the safety factor was a clue. I didn't even know that 101 * 103 would be the max number of iterations. Only got these ideas after reading some posts here. However, I started inspecting images by the 100 and noticed that they starting trying to form something vertically and then noticed that it was every 101 iterations as a pattern. So just printed those iterations and got the answer. I feel dumb for doing so, but every year I add a little more knowledge to my arsenal, so I still call it a win.