I just finished Day 19… I thought the final fix was going to be more complicated but it turned out I just had to set the opposite boundary in the previously processed piece of the puzzle.
solution here
(if i only post the link it always downloads stuff… or previews and I don’t want that)
I’ve been enjoying the feedback I’ve been getting on Mastodon and the clues. It’s quite friendly and far less overrun than the subreddit.
Might read Day 20 now. But we still need to straighten the Xmas Tree and I need more sleep. I already took a 2 hour nap this afternoon and it wasn’t enough.
1 Like
there is a lot of xmas in day 19 … at least in my code. I like to use chars this year a lot.
1 Like
lagging behind now because of a few busy days after work was over and “vacation time” began…
in any case, day 20 is the worst so far. so fiddly. It took me 3 attempts to grok the basic demands from the text and I still don’t quite understand the result that is demanded. this has to be one of the worst puzzles in the 2 years I have done this. (I’ll get it eventually but it’s a real mess to implement)
1 Like
19, 20 and 21 have been the biggest slogs for me.
Day 22
Ah, that was a bit more fun. Not just another “now do it with a hyoooge number” part 2, but a genuinely different approach to the data.
Dropping from day 11 (but I did it better this time with a Z-sort and then a drop as far as it’ll go, rather than cycling a one-step drop across the whole grid). Ranges from day 5. Custom structs. A BFS queue.
Top 5 scores for “did part 1 but didn’t do part 2”:
21: 52%
12: 33%
5: 28%
19: 27%
10: 26%
I got part one of day 20 after writing some unit tests… this is mostly a parsing problem.
and I fixed my initial small bug in part 2 and then I think after 10 seconds when my laptop started huffing and chuffing I decided that I am not doing this.
edit: I have an idea what I am supposed to do. the thing in question is what I decided to call an Endpoint and its predecssor is a conjunction with four inputs (that piece of shitty parsing cost me hours, really having to take a 2nd pass over the input is annoying) and they are probably each on a cycle that needs to synchronize and we’re back to whatever day that was with the smallest common multiple… and my code is not really keen on tracking four different cycles
1 Like
(non-spoilery for yashima, spoilery if you haven’t done day 20)
What exactly do you need to track? Because if you can just shove that into a high-level-accessible variable from way down deep in the processing loop where it happens…
Also: I’m glad I picked this year to learn a parser library. I mean, I’m still wrestling with it a bit, but I can be completely sure I have a working parser by the time I tackle the actual problem. (And if I change the data structure I’m using, I change the processing of the parser output rather than the whole parse section.)
1 Like
I am a bit lazy I think–on the other hand reading the next day it’s more like "do I really want to try and understand a fresh problem or tackle one I at least know how to do? If my hunch for 20.2 is right, I need to track when the four inputs for the final conjunction send the HIGH pulse (it’s high right?), and since they haven’t synchronized within the first few hundred “Nopes” (each 10k button presses I output “Nope”), I am assuming it’s another one of those “we need a short hand” and the only thing I can think of is a cycle which I would need to track. and I sooo dislike the cycle detection stuff. But I guess it’s that or doing some “step counting” for day 21. maybe I should check day 22
I haven’t really had much downtime these last couple of days… all is prepped now though and tomorrow I have a day off from stress I hope.
and re day 20 parsing issues: today needed a second pass over the data after parsing at least how I structured it, to ensure all the conjunction stuff was tracked properly–my data structure was probably just giving me issues here.
1 Like
I went with 21.1 and that was … one of my fastest solutions ever to program I think. Also short code. If I had not forgot to add nodes to “visited” I’d have been writing this down as fast as I can type
and of course part 2 is … ouch.
1 Like
21.2 is… hmm. In a non-spoilery way, there are some important characteristics of the full input that are not present in the test data. Which makes it easier (possible) to solve, but left a bad taste in my mouth.
21.2: even playing around with the steps I take and watching what happens… even analyzing the numbers … and seeing correlations. I think that’s more math than I can get into my head right now. maybe also not when I have had more sleep… …
I think I will first try the part 2 of the flipflops tomorrow as I am reasonably sure I know how that goes.
then I might try to visualize 22.1 and maybe by the time I have not understood auf 22 works, I am ready to slink back and try 21.2 again. maybe some inspiration hits me. or maybe not.
I won’t have much time for coding during the next few days anyway. So it might just end here for me.
1 Like
Somehow after I had … given up … I managed to solve 22.1 and 22.2 today. Part two made my brain hurt for a moment, but on the 3rd attempt to grapple the Stackoverflow from the recursion I figured it out.
I think I might try the last few puzzles after all.
23 doesn’t look so hard… or maybe it is and I just don’t know yet.
Unfinished attempts:
- 12.2 because there has to be something better than memoization libraries to speed up the brute force attack.
- 20.2 because I can see some of what is happening but I am not sucessfully finding the cycles because during each putton press that final conjunction is triggered at different pulses and maybe… I need to find the one where the order of triggers is right… huh… there might be an idea here. Or not.
- 21.2 because I am too lazy to do the math and calculate that “wannabe circle”. In theory I know most of what I would have to do and I just don’t want to write the code. It feels like dozens of chances for off-by-one errors
Merry coding
This year was fun. I will do it again next year.
1 Like
I had a distracting and tiring day yesterday so I’ve stopped at 22 for now, but will return to them as I recover.
12.2 all the working code I’ve seen has used memoisation in some form
There’s a trick to 20.2.
21.2 is the one I liked least in an aesthetic sense.
1 Like
Congratz. I’ll take some time for coding tomorrow I think.
1 Like