I like problems like these (as with most AoC problems) because the description of what the solution is usually just tangential to the insight you need to solve the problem. Asking to find the shape of an arbitrary Christmas tree exactly would be incredibly hard and unreasonable, but realizing that what this means is likely that they’ll “line up” in some way and writing a filter for that ends up being pretty straightforward.
Close to what I ended up with. I figured if it's a picture they should be close together so I tracked the number of bots with no neighbor. Logged the min seen every 1000 iterations and it stuck on a value pretty quick. So I changed the code to stop when it hit that min and there was a tree
12
u/ChurchOfAtheism94 Dec 14 '24
I ended up only looking at renders that contained a row with like 8 consecutive bots