Fork me on GitHub

@misha yeah one of the important things is to have the set of what valids moves really are. Thats why the 3 dim solution really shines. It's easy to create a set of all the valid points of [x y tool] (including valid tool switches) and always filter you possible moves by them,


Ugh, finally finished day 15. That round-counting thing is a pain to weave in, I just ended up ignoring the edge case (last unit's turn finishes the match), and that worked fine for my input.


And actually used earmuffs for the time to weave in the elf attack values! It's kinda gross, but I don't need to extend or maintain this later, so...


I got a super late start today. Part 1 was trival. Part 2… seems like it’s too late for thatt


For day 23 part-2. I came up with something: In theory you can only check points that are in the surface of at least one sphere. The problem is that given a point (p) and a radius (r) the points that are in the surface of that sphere are in the order of r*r. and radius are quite large in the input


There is a theory the points with the most spheres coincide with one of the corners. But my data don't seem to support that..


not necessarily the corner, but with the surface of one. But yeah, I read some theories about corners being enough, but I don't think is correct


With my input the corners approach doesn't seem to work


With mine neither, but the surface is huge 😞


yes is too much. Maybe the edges?


There are still huge though


Im gonna try to find the best corner, and then walk to origin