Fork me on GitHub
#adventofcode
<
2018-12-24
>
Average-user02:12:28

Maybe there is a way of transforming the set of points, into an equivalent one, with points closer and smaller radius

Average-user02:12:38

And then check the surfaces

fellshard04:12:38

I considered starting from a 'center of mass', maybe see if 'all nanobots weighted same' and 'all nanobots weighted by radius' made any sense

gklijs08:12:31

I solved it now, by first picking the best corner, then from there looping both logarithmic and linearly till it doens't improve anymore.

👍 4
gklijs11:12:09

Turned out best corner had little value, just searching from the origin went almost the same time. 3 cycles more to find the correct answer, but not the 6000 evaluations to find the best corner.

Average-user15:12:46

In my case, there is no neighbor of the best corner that has is in range of the same or grater amount of nanobots, so a walk is not possible I think

gklijs17:12:43

It's no walk I do, it's about 13 cycles of jumping all over the place from 2^0-2^30 and that in all detections.

gdevincenzi19:12:20

hey folks! beginner clojurist here. If someone could give me a few pointers on how to improve my day 9 code, I would be very thankful. I can't seem to find a fast enough approach. https://github.com/gdevincenzi/advent-of-code-2018/blob/puzzle09/p09/zipper.clj

misha20:12:40

@gdevincenzi "trick" to day9 was deque (double-ended queue) data structure

gdevincenzi20:12:17

I'm not sure how to implement one in a functional way, but will try to find out more about it

misha20:12:07

someone has a deque implementation as a lib. I used mutable java one: https://github.com/akovantsev/adventofcode/blob/master/src/adventofcode/2018/day09.clj

misha20:12:14

was a very good reminder how actually careful you should be with mutable things, god bless rich

gklijs22:12:11

You don't need deque for day 9, it's just pointers forward, and sometimes you need to know witch state you where in to get back.

Average-user02:12:57

They are talking about day 9

gklijs11:12:52

That's what I meant