Fork me on GitHub
#adventofcode
<
2018-12-15
>
Average-user04:12:11

I havent had time to do day 14 and day 15 is coming

quoll05:12:53

I just looked at Day 15. It feels like CS homework. ā€œImplement an A* algorithm.ā€ Not really fun

taylor06:12:30

yeah I donā€™t think I have time in my life to do this one :man-tipping-hand:

taylor06:12:40

reminds me of a http://codingame.com competition but less fun

norman08:12:58

I think itā€™s a fun problem, but thereā€™s really too much going on here to finish quickly. Iā€™m 2 hours in and Iā€™m not quite getting the move selection right. I think I need finish in the morning.

gklijs09:12:50

It would have been more fun if the explanation was less explicit and the actual algorithm a bit more easy. Still it's doable, so I'll will.

gklijs10:12:19

Just looked at the times for the first 100 to get it right, around 15 minutes for almost any day, but today over 2 hours

meikemertsch15:12:21

My brain is fried. I have a solution but it works really slow for bigger dungeons. I suspect one line of code to be the culprit for making it so slow. Does anyone have the time to check this with me?

meikemertsch15:12:09

(filter (sets/union free enemies)) This is the line of code I suspect will cause trouble for large sets ā€œfreeā€. ā€œenemiesā€ is usually small.

meikemertsch15:12:55

oh. and sets is (:require [clojure.set :as sets])

Ben Grabow16:12:31

I tried out tufte yesterday and it seems easy to use out of the box for profiling. https://github.com/ptaoussanis/tufte Wrap the code you want to profile in the p macro and you should be able to see what's hogging the most time.

helios15:12:28

wow, it's almost 10 hours after the game and then only 835 people solved it completely, compared to the thousands from yesterday šŸ˜„

helios15:12:32

it's a PITA problem šŸ˜„

gklijs15:12:29

I just got the first part, almost the second but have to go, was the first time I was one of the first thousand to solve the first

gklijs15:12:56

And with all that state very happy to do it with java..

magic_bloat16:12:33

I've been doing it for about 4 hours, still bug fixing part 1. Grrr.

drowsy17:12:33

i finally finished day 15 and it's pretty rough and slow, but I'm definitly not eager to touch it any further... https://github.com/IamDrowsy/advent-of-cljc/blob/slow/src/aoc/y2018/d15/iamdrowsy.cljc

mfikes23:12:24

Wow. I might save day 15 for some other day. WTF.

markw23:12:12

Opened up laptop last night, read day 15, closed laptop.

ā˜ļø 4
šŸ˜ 4
mfikes23:12:27

That problem will likely cost $1000 to solve, in terms of time. You could buy a new laptop.

markw23:12:28

meanwhile stuck on part 2 of day 13, Iā€™ve looked at this over and over and canā€™t find the bugā€¦ any help would be appreciated! https://gist.github.com/Solaxun/1b4b7ada84b936d43fbee04ede0062f4

Ben Grabow23:12:46

Line 66, :locs should be :loc. If you have any collisions that should happen on the first tick they'll get missed. I don't see anything else obviously wrong, so hopefully that's it.

markw23:12:49

you have GOT to be kidding meā€¦ i looked for hours and missed that

markw23:12:59

that was it.

Ben Grabow00:12:48

When I'm debugging these problems, especially with a loop, I'll do a println of each loop parameter and run through the first ~5 iterations manually checking that everything looks right. Usually I'll use the small sample data set from the problem description too. Would have caught this typo.

Ben Grabow00:12:04

Glad I could help you fix it!

markw00:12:12

Thanks for the help ā€¦ yeah belive it or not i did do several runs with the sample input

markw00:12:21

i had helper functions not shown in the gist for printing the track

markw00:12:41

but no collisions happened on the first tick so I didnā€™t notice

Ben Grabow00:12:27

I mean print c, cs, full? and new-cars inside your loop, to ensure you got the mechanics of the loop correct. Often mistakes will not manifest obviously in the intended output, but if you look directly at the internal implementation the problem will be more obvious.

markw00:12:43

yeah fair point ā€¦ printing full? i would have noticed the nil at the start

markw00:12:59

i was focusing on printing all the wrong things

markw00:12:22

thanks for the help, who knows how long i would have stared at that aimlessly

šŸŽ… 4
markw23:12:54

Day 15 reminds me of day 11 from 2016 IIRC - the elevator problem

markw23:12:23

that and the molecules for 2015 were just a beating