Advent of Code 2024 Day 14 (Base A Style)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 14 of the Advent of Code - https://adventofcode.com/2024/day/14
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mixed feelings about this problem. Part 1: Another fantastic math problem - Part 2: Cool concept that was not executed well (especially based on what the actual answer is).
(NOT SPOILER): Immediately below is just a hint as to what to look for when doing Part 2:
(SPOILER) Below is my solution to this problem with explanation for Part 1 and a short accounting of how incredibly lucky I got for Part 2:
Mod( Mod( [Position] , [MapSize] ) + [MapSize], [MapSize])
The inner Mod() may output a negative number, and so by adding the modulus ([MapSize] in this case) we can correct for that guaranteeing that the output is positive. The second Mod() is needed to account for the overshooting that occurs when the inner Mod() was positive.
From there, we calculate the quadrant, then the product of quadrant counts for the final answer!
Part 2: Not knowing what the Christmas Tree was supposed to look like, I thought the entire map might be filled with all robots making a centered Christmas tree, implying that at least one would be at position (0,50). Second, it is true that all robots will be on their starting squares after 101*103 = 10403 seconds (so the answer had to be within this range), so I used Generate Rows Tool to calculate 9000 single second time stamps, then Filtered down to only those cases where that position was occupied, which left me with 426 timestamps to check based on my initial premise within that range. That position was 100% irrelevant to the Christmas tree, but by an act of pure providence, the answer happened to have a robot sitting at (0,50), and I found the tree. The timestamp that I found due to the periodicity of the problem, meant that I had an upper bound on what the solution could be, but not wanting to be bothered to verify, I submitted my answer, and it happened to be right. So... victory, I guess....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Shocking to suddenly see a Christmas tree in my results. 😂 I'm very pleased to have figured out the pattern!
Part 2: I started out by visualizing the first 600 steps to find the pattern. I use the X and Y coordinates as spatial lat/long integers. I prefer using the Report Map tool more than the charting tools.
Want help finding the pattern? I'll include an explanation below.
After looking at the first 600 steps to find the pattern, I found that my lines (y = mx + b) were as follows:
X wraparound: width of board * number of seconds + 48
Y wraparound: height of board * number of seconds + 1
I then generated the first few multiples of these lines to find the intersection.
 
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Part 2 is the worst Advent puzzle I have ever seen. Not the hardest, the worst. They may be going a bit harder than is reasonable on "problem cannot be solved by AI."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I sense too strong smell of 'anti-AI' from part2. Thanks to @AkimasaKajitani for hints.
Find the timing when all robots locates at distinct positions(different 500 positions), and check how they look like. In my data, there were two.
(EDIT)
How to somewhat quantitatively derive answers without relying on visual aid.
Sum up the distance to the nearest robot for all 500 robots, and plot it by elapsed times.(Create spatial objects and use the Find Nearest tool)
Shorter distance means robots come closer and longer distance does robots locate far each other.
Obviously there exist a single minimum point that implies they come closer to make Christmas tree.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Today's AoC was interesting.
P1 can be solved if think carefully without rushing. However, I rushed through it, so it took me more time than I expected.
For P2, I used Map Tool and Render Tool to create a PDF for each loop and checked them. However, after outputting 5000 loops and reviewing just a few hundred pages, my hand started cramping. During this process, I noticed that vertical and horizontal stripes occasionally appeared. By analyzing their patterns, I discovered that these stripes appeared at intervals matching the number of tiles in the horizontal and vertical numbers.
The attached PDF contains only the extracted periods of these intervals. I was able to spot the Christmas tree after reviewing just 130 pages, without having to go through thousands of pages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Today I learned another meaning of Easter Egg .
For Part2, I saw two vertical lines every 101 seconds.
So I added a filter to check only these images, and found a tree pattern in the 77th cycle of 101 seconds.
My image
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Enjoyed Part 1! Thanks to @DaisukeTsuchiya for the hint on the key to Part 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I didn't use any reporting tools...
Assuming you arranged the characters to see the patter in Part 1, group by times, and then try to identify which iteration has a situation where there are most number of consecutive rows which have adjacent columns captured by a robot in acending or descending order, I got a Christmas Tree which was reversed. It's not fool proof as they could have purposely left multiple trees with one level missing, but this worked for me! Hope you find the easter egg too.
