Discussion thread for day 14 of the Advent of Code - https://adventofcode.com/2024/day/14
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:
Shocking to suddenly see a Christmas tree in my results. 😂 I'm very pleased to have figured out the pattern!
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."
Solved!
My Viz
I think part 2 is set as an easter egg so the condition is intended.
I sense too strong smell of 'anti-AI' from part2. Thanks to @AkimasaKajitani for hints.
(EDIT)How to somewhat quantitatively derive answers without relying on visual aid.
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.
Today I learned another meaning of Easter Egg .
My image
Enjoyed Part 1! Thanks to @DaisukeTsuchiya for the hint on the key to Part 2.
if [newgrid_px] < 0 THEN [User.maxx] + [newgrid_px] Else [newgrid_px] ENDIf​
Day 14 in the bag! Used @ScottLewis' tip for part 2 - looking for a line of 6 points returned a single output which was my Christmas tree! Not very neat so maybe my flow is off slightly but we picked up 2 stars!
Part 1 was pretty straightforward... Part 2 wasn't too bad once I figured out which logic to apply to it... and determined that it wasn't going to be ALL the robots that would align so shifted which metric I was tracking. 14 down, 11 to go!
Day14. More in spoiler
I update WF for P2 without checking thousands loops.
At first I could not imagine the goal picture.
Solved. I'm not sure how I feel about Part 2. I wouldn't have gotten there without the help from everyone. I definitely would've preferred more guidance on what "make a Xmas tree" actually looked like, since I assumed it was set in the middle of the graph
This was challenging but fun!
Formula Examples:For Part 2, I iterated 10,000 times and then found the iteration with the smallest standard deviation between points. I got a lot of inspiration for this solution and visualization from some previous year solutions from @phottovy and @cgoodman3 that they highlighted recently. Without that, I would have spun my wheels trying to figure this one out. Just goes to show how much of a learning opportunity Advent of Code is!There's probably a way to get the macro to exit early instead of hardcoding the iterations, but this only ran in 25.6 seconds so I'm OK with it the way it is
@Tokimatsu Very brilliant idea.I did same approach but went to calculate the area of Christmas Tree.
Just part 1 for me. Part 2 seems mad.
before see the picture, i totally have no idea about what the Christmas tree.I thought is a words "CHRISTMAS TREE" like most of the time.
Loving the number of spatial challenges this year.
Past AOC challenges were definitely helpful with this one!
I may have skipped a couple, but managed to get an answer for day 14.
As I'm running out of time, I'll come back for the 2nd star.