Author Topic: Advent of Code  (Read 112578 times)

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #300 on: 16 December, 2016, 06:25:35 am »
After day 15's relatively easy problem, what's the betting day 16 is going to be a stinker?

So, day 16 was another easy one.  After this much respite, I'm getting anxious about what Mr Wastl has in store for us next.

(click to show/hide)
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

red marley

Re: Advent of Code
« Reply #301 on: 16 December, 2016, 06:59:13 am »
Quite sensibly, our toughest one this year (Day 11) was at the weekend. Last year, arguably the toughest one was Day 19 (molecules), also at the weekend. So perhaps we should brace ourselves for a toughie either tomorrow or the day after. I'm sure he wouldn't be so cruel as to set a time consuming challenge the following weekend given we may have other commitments on Sunday morning.

Ben T

Re: Advent of Code
« Reply #302 on: 16 December, 2016, 09:48:24 am »
Recently went back and did Day 24 of last year and thought that was pretty hard (partitioning).
https://github.com/bjtaylor1/AoC_2015/blob/master/Day24/UnitTest1.cs

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #303 on: 16 December, 2016, 10:20:42 am »
for 2015, day 19 part 2 was the absolute hardest IMO.
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #304 on: 16 December, 2016, 10:44:12 am »
Looking at todays (Just got to it, running part 2), it flips the checksum (almost) with each doubling, so the checksum may be calculable from the starting code without needing to calculate the entire string.

(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #305 on: 16 December, 2016, 12:28:16 pm »
for 2015, day 19 part 2 was the absolute hardest IMO.

That's where I got stuck. This year I've skipped a second part. Maybe I should go back and look at the 2015 ones
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

red marley

Re: Advent of Code
« Reply #306 on: 16 December, 2016, 02:21:09 pm »
I didn't really dig today's (Day 16). Just grinding though some standard string manipulation, which is more or less tedious depending on your language of choice.

I was wrong about this. Looking elsewhere (no links here to avoid obvious spoilers), there are some really elegant ways of processing the input that stop this being such an iterative task. If anyone's feeling like they've done too much proper work today, there's plenty of scope for thinking about some nifty optimisations. I should never have doubted Mr Wastl. What makes these challenges great is their hidden depths.

Ben T

Re: Advent of Code
« Reply #307 on: 16 December, 2016, 04:16:35 pm »
I didn't really dig today's (Day 16). Just grinding though some standard string manipulation, which is more or less tedious depending on your language of choice.

I was wrong about this. Looking elsewhere (no links here to avoid obvious spoilers), there are some really elegant ways of processing the input that stop this being such an iterative task. If anyone's feeling like they've done too much proper work today, there's plenty of scope for thinking about some nifty optimisations. I should never have doubted Mr Wastl. What makes these challenges great is their hidden depths.

That's fine, although my viewpoint would be that if iteration works fast enough then any further optimisation is straying from science into art :)
I was hoping he was going to say that the memory would be something like many GB, not 272.

for 2015, day 19 part 2 was the absolute hardest IMO.

That's where I got stuck. This year I've skipped a second part. Maybe I should go back and look at the 2015 ones

Having done 2016 day 11, 2015 day 19 part 2 wasn't that hard as it's a similar principle:
(click to show/hide)

Re: Advent of Code
« Reply #308 on: 16 December, 2016, 07:28:37 pm »
I didn't really dig today's (Day 16). Just grinding though some standard string manipulation, which is more or less tedious depending on your language of choice.

I was wrong about this. Looking elsewhere (no links here to avoid obvious spoilers), there are some really elegant ways of processing the input that stop this being such an iterative task. If anyone's feeling like they've done too much proper work today, there's plenty of scope for thinking about some nifty optimisations. I should never have doubted Mr Wastl. What makes these challenges great is their hidden depths.

That's fine, although my viewpoint would be that if iteration works fast enough then any further optimisation is straying from science into art :)
I was hoping he was going to say that the memory would be something like many GB, not 272.

for 2015, day 19 part 2 was the absolute hardest IMO.

That's where I got stuck. This year I've skipped a second part. Maybe I should go back and look at the 2015 ones

Having done 2016 day 11, 2015 day 19 part 2 wasn't that hard as it's a similar principle:
(click to show/hide)
(click to show/hide)
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #309 on: 17 December, 2016, 08:29:22 am »
And day 17 appears. I may have to think a little.
"By creating we think. By living we learn" - Patrick Geddes

Oaky

  • ACME Fire Safety Officer
  • Audax Club Mid-Essex
    • MEMWNS Map
Re: Advent of Code
« Reply #310 on: 17 December, 2016, 04:45:22 pm »
(click to show/hide)
You are in a maze of twisty flat droves, all alike.

85.4 miles from Marsh Gibbon

Audax Club Mid-Essex Fire Safety Officer
http://acme.bike

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #311 on: 17 December, 2016, 06:28:31 pm »
Finally got round to part 1. Part 2 is running, hopefully without an infinite loop.

ETA: hopes were in vain but infinity was removed and results obtained.
"By creating we think. By living we learn" - Patrick Geddes

Ben T

Re: Advent of Code
« Reply #312 on: 17 December, 2016, 07:02:33 pm »
On Day 17 part 2,
(click to show/hide)

red marley

Re: Advent of Code
« Reply #313 on: 17 December, 2016, 07:19:15 pm »
(click to show/hide)

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #314 on: 17 December, 2016, 08:02:45 pm »
(click to show/hide)
 
"By creating we think. By living we learn" - Patrick Geddes

red marley

Re: Advent of Code
« Reply #315 on: 17 December, 2016, 08:40:15 pm »
I thought I'd do a bit of analysis of challenge difficulty, as measured by leaderboard completion time, to see what we have in store for the rest of 2016 (my guess: a toughie tomorrow and a more challenging final week)

Ben T

Re: Advent of Code
« Reply #316 on: 18 December, 2016, 12:08:36 am »
The times (and thus points) are definitely skewed though because it makes no observation of when you started it.
Did someone finish it early because they're better at coding or just because they could be bothered to get up early...
For instance, I have to be at my desk in the week, so usually start it at 9 am, but didn't even look at today's till at least 4pm.

red marley

Re: Advent of Code
« Reply #317 on: 18 December, 2016, 05:58:15 am »
Except that the leaderboard from which those stats were derived is only the first 100 finishers. Looking at the reddit discussions it is clear that all those who feature in the top 100 will have started the second the day's puzzle was released (with the exception of day 1, 2015 which I excluded).

red marley

Re: Advent of Code
« Reply #318 on: 18 December, 2016, 07:02:52 am »
Day 18 (trapped tiles)

(click to show/hide)

(Edited to provide a more seasonal image of the tile layout [and a design for some rather natty Christmas underpants])

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #319 on: 18 December, 2016, 07:52:39 am »
(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes

Re: Advent of Code
« Reply #320 on: 18 December, 2016, 11:00:28 am »
I've just caught up with day 17. Reading the question fully would have save some time.
(click to show/hide)
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Ben T

Re: Advent of Code
« Reply #321 on: 18 December, 2016, 11:01:47 am »
Did you manage to skip any rows, i.e. avoid having to do every single 400,000 transformations, or doesit just improve the speed at which you can generate each row from the next.
I thought if it repeated at, say, 100,000, then you could simply multiply the result at that point by 4. But it doesn't.

The ones I really like are where an optimization is essential rather than just pretty.

red marley

Re: Advent of Code
« Reply #322 on: 18 December, 2016, 02:23:00 pm »
Did you manage to skip any rows, i.e. avoid having to do every single 400,000 transformations, or doesit just improve the speed at which you can generate each row from the next.

(click to show/hide)

red marley

Re: Advent of Code
« Reply #323 on: 19 December, 2016, 08:11:45 am »
Day 19 (present nabbing)

Great problem today. I like it because it can be tackled from several different angles (with varying degrees of efficiency). A little more challenging in part because if you calculate the wrong result it is not immediately obvious why, so debugging can be more difficult (DAMHIKT).

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Advent of Code
« Reply #324 on: 19 December, 2016, 08:17:37 am »
Actualy part 1 is analytic

(click to show/hide)
"By creating we think. By living we learn" - Patrick Geddes